JTAG-OpenOCD problem
Posted: Fri May 18, 2018 11:04 am
Hi,
We have developed our own board based on the ESP32-WROVER module and I am trying to get JTAG capability on it but something is preventing it from working correctly on my WINDOWS10 machine.
The hardware is a custom development board with the same FT2232H on it as on the ESP32-WROVER-KIT board.
The four JTAG connections from the FT2232H to our ESP32-WROVER module are a carbon copy of what is shown in ESP32-WROVER-KIT_SCH3, with the exception of the exception of the S_TDI arrangement shown in the JTAG section of that schematic.
Is that S_TDI circuit essential? If it is I can still add it.
I have checked out the hardware umpteen times and I am absolutely sure there are no shorts, no signal interruptions and all necessary pull-up and pull-down resistors. The four JTAG signals from the FT2232H ( TCK, TDI, TDO and TMS ) are definitely connected to the correct pins on the WROVER module.
The drivers for the TF2232H device all installed correctly and indicate proper functioning, in fact: the USB <=> serial port on channel B works perfectly. The standard driver for CHANNEL A was replaced with another one using the Zadig application as specified in the documentation.
The ESP32 version of OpenOCD is installed as it should and I use an msys32 script to start it, the only change compared to the standard "esp32-wrover.cfg" file is that I have lowered the adapter_khz value to 200 instead of 20000 hoping that that might solve something.
OpenOCD starts as expected but keeps reporting the following:
Starting OpenOCD
Open On-Chip Debugger 0.10.0-dev (2018-04-18-12:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 200 kHz
esp32 interrupt mask on
force hard breakpoints
Info : clock speed 200 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : esp32: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32: Core was reset (pwrstat=0xFF, after clear 0xFF).
Error: cpu0: esp32_fetch_all_regs (line 165): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 165): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 165): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: Exception reading pc!
I trawled all through this forum, and anything else I could find on the internet, and it looks like everything should be OK but it is not.
I am really at the end of my wits now so any help/suggestion would be very much appreciated.
We have developed our own board based on the ESP32-WROVER module and I am trying to get JTAG capability on it but something is preventing it from working correctly on my WINDOWS10 machine.
The hardware is a custom development board with the same FT2232H on it as on the ESP32-WROVER-KIT board.
The four JTAG connections from the FT2232H to our ESP32-WROVER module are a carbon copy of what is shown in ESP32-WROVER-KIT_SCH3, with the exception of the exception of the S_TDI arrangement shown in the JTAG section of that schematic.
Is that S_TDI circuit essential? If it is I can still add it.
I have checked out the hardware umpteen times and I am absolutely sure there are no shorts, no signal interruptions and all necessary pull-up and pull-down resistors. The four JTAG signals from the FT2232H ( TCK, TDI, TDO and TMS ) are definitely connected to the correct pins on the WROVER module.
The drivers for the TF2232H device all installed correctly and indicate proper functioning, in fact: the USB <=> serial port on channel B works perfectly. The standard driver for CHANNEL A was replaced with another one using the Zadig application as specified in the documentation.
The ESP32 version of OpenOCD is installed as it should and I use an msys32 script to start it, the only change compared to the standard "esp32-wrover.cfg" file is that I have lowered the adapter_khz value to 200 instead of 20000 hoping that that might solve something.
Code: Select all
#!/bin/bash
echo "Starting OpenOCD"
cd /C/msys32/home/ESPdev/esp/openocd-esp32
bin/openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover.cfg
Starting OpenOCD
Open On-Chip Debugger 0.10.0-dev (2018-04-18-12:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 200 kHz
esp32 interrupt mask on
force hard breakpoints
Info : clock speed 200 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : esp32: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32: Core was reset (pwrstat=0xFF, after clear 0xFF).
Error: cpu0: esp32_fetch_all_regs (line 165): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 165): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 165): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: Exception reading pc!
I trawled all through this forum, and anything else I could find on the internet, and it looks like everything should be OK but it is not.
I am really at the end of my wits now so any help/suggestion would be very much appreciated.