All boards are powered presently from USB (500mA each port) and monitoring the voltage it remains stable at around 5.12 volts. Max current is around 110mA during the flashing. On the breadboard I have a 10uF cap on each of VIN and 3.3V rails.
I enabled some debugging before the call to spi_flash_write and this was the output with the error. I am only showing the write before after the error.
Code: Select all
write addr: 0x00234e58, len: 0x05b4
write addr: 0x0023540c, len: 0x05b4
write addr: 0x002359c0, len: 0x05b4
E:M 5856
write addr: 0x00235f74, len: 0x05b4
It fails almost 99% of the time at the same memory location and occasionally a few others.
The 4Mbyte FLASH is set for 40MHz and DIO mode.