Page 1 of 1

SPI flash programming

Posted: Fri Jan 08, 2016 1:49 am
by drewcg
In some threads related to u-boot it was mentioned flashing the SPI chip with an external programmer. Can this be done in circuit? Won't applying power to Vcc enable the processor? Any suggestions for how to flash using an external programmer?

Thank you

Re: SPI flash programming

Posted: Sun Jan 10, 2016 8:08 am
by dl9sec
Hi,
I would say yes. I am currently experimenting with that on another RT5350 board.
E.g. this programmer should work: https://www.flashrom.org/Teensy_3.1_SPI ... WH_Flasher
together with a suitable clip (e.g. http://www.ebay.de/itm/Test-Clip-Progra ... SwNgxWEroL).
I am running the programmer on a breadboard.
The VoCore board should be powered, but the CPU held in reset applying a low to POR_N. At the programmer only the SPI pins and GND should be connected.

I will try this the next few days and can give you feedback...

Regards, Thorsten

Edit:
Confirm. It really works as described above. Apply the following signals from the programmer to the flash:
1: SPI CS, 2: SPI MISO, 3: +3V3, 4: GND, 5: SPI MOSI, 6: SPI CLK, 7: +3V3, 8: +3V3. The +3V3 are provided by the booard, not by the programmer and shorted on the programmers breadboard.
I read/wrote the flash on my board (not a VoCore!) with flashrom:
flashrom -p serprog:dev=/dev/ttyACM0:1500000 -c MX25L3206E/MX25L3208E ...
Works like a charm!

Re: SPI flash programming

Posted: Mon Jan 11, 2016 2:37 am
by noblepepper
Here's how I did it, make sure you back up the factory partition first it is the only thing unique to each board that can't be duplicated by mortals. More details here on the software side.

Pulling PORST low keeps the 5350 from interfering in the process.Vonger's method #2 is intriguing but I haven't tried it.