JTAG (OpenOCD) with WinBond Flash Works, Fails with Macronix Flash
Posted: Wed Aug 23, 2017 4:26 am
After much debugging, I think the problem I'm having when I'm using OpenOCD (installed w/ the VisualGDB toolchain) to reflash the ESP32 is that the CPU resets when this command is called:
E:\projects\sysprogs-github\openocd-esp32\src\helper\command.c:143 script_debug(): command - ocd_flash ocd_flash init
You can see the OpenOCD debug output of the Macronix chip (left) vs the WinBond chip (right) in this diff: https://www.diffchecker.com/WXh61Q8R
Look at line 290+. Although both ICs have identical pinouts, and are connected identically, and both support QIO, it looks like applications uploaded via ESPTOOL only work if the WinBond chip is configured in DIO mode where the WinBond chip works with files uploaded in QIO mode. I've not been able to find anyplace in the source for OpenOBD where the flash mode is set/specified.
This is how they are connected:
The datasheets for the chips are:
http://www.elinux.org/images/f/f5/Winbond-w25q32.pdf
http://www.macronix.com/Lists/Datasheet ... 20v1.4.pdf
I need to
1) verify that the Macronix flash is connected correctly - or if some other configuration will enable QIO mode. It's available in a smaller footprint that we need for our application. Making sure JTAG support works is essential.
2) verify that the layout of our device is correct and the problems I'm having are indeed an openOCD software issue that can be sorted out in the future. We want to go into schematic lock soon so we can go into production with our device.
Thanks in advance!
Reza
E:\projects\sysprogs-github\openocd-esp32\src\helper\command.c:143 script_debug(): command - ocd_flash ocd_flash init
You can see the OpenOCD debug output of the Macronix chip (left) vs the WinBond chip (right) in this diff: https://www.diffchecker.com/WXh61Q8R
Look at line 290+. Although both ICs have identical pinouts, and are connected identically, and both support QIO, it looks like applications uploaded via ESPTOOL only work if the WinBond chip is configured in DIO mode where the WinBond chip works with files uploaded in QIO mode. I've not been able to find anyplace in the source for OpenOBD where the flash mode is set/specified.
This is how they are connected:
The datasheets for the chips are:
http://www.elinux.org/images/f/f5/Winbond-w25q32.pdf
http://www.macronix.com/Lists/Datasheet ... 20v1.4.pdf
I need to
1) verify that the Macronix flash is connected correctly - or if some other configuration will enable QIO mode. It's available in a smaller footprint that we need for our application. Making sure JTAG support works is essential.
2) verify that the layout of our device is correct and the problems I'm having are indeed an openOCD software issue that can be sorted out in the future. We want to go into schematic lock soon so we can go into production with our device.
Thanks in advance!
Reza