Programming onboard flash during assembly - Page 1
Forum section: electronics / general

author: Aggressive_Doughnut
author_rank: Contributor
timestamp: February 09, 2021, 02:15:17 pm
content: Hey all, I am working on a device that needs about 30MB (bytes) of data programmed into its flash memory IC at some point before it hits the shelves/customers. I haven't had a project that needed this, so I'm not really sure how to accomplish it. They don't preprogram flash chips, so do you include something in the bed of nails to do the programming for you? I don't really see another way.

author: SMTech
author_rank: Frequent Contributor
timestamp: February 09, 2021, 03:03:34 pm
content: It depends really. You can absolutely pay a 3rd party or a flash manufacturer to preprogram something like eMMC and repackage/tape if needed. You could put a header or contact points for your test bed. Or if your using something like flash connected to ARM on a network device you could have a hardware link that sets the device to network boot and flash itself from a network image using BootP, my past experience of this was using a Ti Sitara processor, it would load a very small program off the DHCP program into memory and that in turn would program it. It meant we could plug in a whole switch load of the devices (glorified Beaglebones) and they basically programmed themselves and then ran a self diagnostic. It wasn't 100% flawless, something in the mix of DHCP settings smart switches and perhaps other network rules meant they didn't always immediately flash as you might expect, but it was certainly quicker than flashing them manually. We had the switches coupled using multiple 1Gb network ports to an oldish server, each device would flash at around the max capability of the 100Mb port on the device and kept the main image on a RAMdisk to avoid bottlenecks.I would think similar tricks could be done if you could configure your processor to boot from an SD/USB device if it had such connections, in my example above we had to move some resistors between test and release to enable booting from eMMC after programming, but a little thought before that stage could have made that a single link or a switch...

author: AndyC_772
author_rank: Super Contributor
timestamp: February 09, 2021, 03:09:13 pm
content: Quote from: Aggressive_Doughnut on February 09, 2021, 02:15:17 pm"They"...?Just order the devices from a commercial programming service, eg.https://www.actioncircuits.com/value-added-services/device-programming/

author: perieanuo
author_rank: Frequent Contributor
timestamp: February 09, 2021, 03:12:07 pm
content: hi,1. you put pads, really nasty2. you put pads routed to the microcontroller/dsp and your dsp can write the flash via some bootloader3. you buy flash programmer with really expensive socket for your flash and you make technician life miserablego with 2'nd solution, put jtag pads routed to dsp/micro, write firmware in dsp/micro, write flash/eep or whatever you want via micro firmware. literally almost everybody does this in small companiesregards, pierre

author: tunk
author_rank: Super Contributor
timestamp: February 09, 2021, 03:27:17 pm
content: I don't know how to do this, but I would guess theanswer depends on how many devices you're making?

author: Aggressive_Doughnut
author_rank: Contributor
timestamp: February 09, 2021, 03:39:19 pm
content: @AndyC_772 Very interesting, thanks! I had asked on the flash mfr forum and was told they don't do preprogramming, but I guess third party would work just fine. Have you used such a service? Are they fairly cost effective/reliable when compared to having it programmed at assembly?

author: AndyC_772
author_rank: Super Contributor
timestamp: February 09, 2021, 04:01:31 pm
content: I've not used a 3rd party programming service recently, but only because I've not had the need. My recent designs have tended to be low volume or use devices that can be ordered pre-programmed from the manufacturer.Best to ask for a quote, IMHO. I suspect you'll find it's quite costly for small quantities, but becomes much cheaper per device in bulk.If you ever get the chance to tour a facility that does this kind of production programming then it's really worthwhile IMHO - they have fully automated machines that can take entire tubes, trays or reels of parts at a time - basically a modified pick & place machine with dozens of programming sockets.

author: Reckless
author_rank: Frequent Contributor
timestamp: February 09, 2021, 05:10:29 pm
content: I always found 3rd party flash programming to be too costly to consider.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 09, 2021, 05:25:25 pm
content: Digikey have a programming service ( for US only), not sure if they cover large memories but worth asking.Microchip offer programming, but sounds like yours is bigger than anything in their rangeAlso, is there code elsewhere on your board that could program the flash from an external data source, e.g. SD card connected to a header, serial link, ethernet etc.?

author: nisma
author_rank: Regular Contributor
timestamp: February 10, 2021, 11:34:42 am
content: I'm using openpnp, so it is more easier. I have pcbb with smd pattern and after vision it is pressed against that footprint. Then rc servo look the part and nozzle can assemble other things. Siemens have a programming feeder that can load parts from normal feeder, programming it and move it to storage position ready for picking. However USB programmer are cheap from China, buy 8 and use rc servos for holding parts in place and load/unload it with pick and place or 3d printer.