Automatic in-field Due reflash

Collin80:
By default an ARM cortex M3 chip can be reprogrammed by doing a hardware erase and rebooting. This will cause the built-in ROM based bootloader to start. You can then use SAMBA to reprogram the chip over USB serial (and maybe the first serial port as well). So, I suppose it'd be possible to do this in hardware and take advantage of the built-in bootloader. This still requires hardware modification to the boards. JTAG brings with it other nice things that are advantageous when debugging so if a hardware revision is necessary why not use JTAG? With JTAG it'd be possible to put one JTAG header on the board and debug any of the processors.

But, if hardware modification is not acceptable or possible then doing firmware flashing over SPI is perfectly possible and probably the way to go if all the processors are already on the same SPI bus.

Again, you don't need any hardware modifications, just a logic analyzer to check protocol, and to connect Due's TX0/RX0 + reset+Erase to an ethernet/wireless enabled arduino mini pro with proper code! The mini pro will handle the update via serial, no complex stuff required here.

He just wants to be able to update the firmware remotely, debugging can be done on prototype that is in the office! :slight_smile:

Just for the record, i checked the Due's schematics and the only pin which is not routed is the "erase_cmd" one, so only one wire would need to be soldered/added/your_preferred_word to this additional hardware for remote flash update. This can be done by hooking directly to the T3 input for 5V, or to the ERASE button output if 3.3V.

BR