saturn:~/work> make flash
# esptool --port /dev/ttyUSB0 --baud 115200 write_flash 0x00000 firmware/0x00000.bin 0x40000 firmware/0x40000.bin
# esptool -bz 8M -cp /dev/ttyUSB0 -cd none -cb 115200 -ca 0x00000 -cf firmware/0x00000.bin -ca 0x40000 -cf firmware/0x40000.bin
esptool -cp /dev/ttyUSB0 -cd none -cb 115200 -bz 4M -bf 26 -ca 0x00000 -cf firmware/0x00000.bin -ca 0x40000 -cf firmware/0x40000.bin
Uploading 29360 bytes from firmware/0x00000.bin to flash at 0x00000000
............................. [ 100% ]
Uploading 186068 bytes from firmware/0x40000.bin to flash at 0x00040000
................................................................................ [ 43% ]
................................................................................ [ 87% ]
...................... [ 100% ]
saturn:~/work> esptool.py --port /dev/ttyUSB0 --baud 38400 verify_flash 0x00000 firmware/0x00000.bin
Connecting...
Verifying 0x72b0 (29360) bytes @ 0x00000000 in flash against firmware/0x00000.bin...
-- verify FAILED: 28230 differences, first @ 0x00000000
A fatal error occurred: Verify failed.
saturn:~/work> esptool.py --port /dev/ttyUSB0 --baud 38400 flash_id
Connecting...
Manufacturer: e0
Device: 4016
Recall, if I use the esptool.py to flash the device, I get this error:
saturn:~/work> esptool.py --port /dev/ttyUSB0 --baud 38400 write_flash --flash_freq 20m --flash_mode dio --flash_size 4m --verify 0x00000 firmware/0x00000.bin 0x40000 firmware/0x40000.bin
Connecting...
Erasing flash...
Took 0.01s to erase flash block
Writing at 0x00000000... (3 %)
A fatal error occurred: Failed to write to target Flash after seq 0 (got result 0x1, 0x8)
I have used my scope to look at the SPI protocol between the processor and flash, and it looks good:
...so I don't think that there is anything wrong with the SPI timing.
One thing I noticed however, is that the different flash frequency parameters do not seem to change the SPI clock timing; it is consistently about 12.5 MHz.
Are there any other tools besides esptool.py and esptool-ck that you can suggest?
The power supply is stable at 3.07 VDC, the 26 MHz clock seems very stable, and the SPI protocol seems right. Is there something else I should be looking at?
Thanks.
--ken
--ken