Error: JTAG scan chain interrogation failed: all ones

manorin
Posts: 3
Joined: Fri Dec 18, 2020 2:49 pm

Error: JTAG scan chain interrogation failed: all ones

Postby manorin » Fri Dec 18, 2020 2:55 pm

I've been trying to program the ESP32-WROOM-32E and ESP-DevKitC-v4 (based on 32E) modules over JTAG (both on MacOS 10.15.4 and Windows 10) for the past two days and every single try has failed following the same error. It's worth mentioning that I erased the flash memories of these modules entirely before any attempt to program them over JTAG. This eliminates the possibility that the JTAG pins might be reconfigured for other purposes by the existing firmware.

I've used both SEGGER JLink and ESP-Prog during my tests using the standard JTAG pins, i.e. TMS, TDO, TDI, TCK, GND and Vref. After running this command:

Code: Select all

openocd -f board/esp32-wrover-kit-3.3v.cfg
I get:

Code: Select all

Open On-Chip Debugger  v0.10.0-esp32-20201202 (2020-12-02-17:38)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : FreeRTOS creation
Info : FreeRTOS creation
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : J-Link V10 compiled Apr 23 2020 16:49:14
Info : Hardware version: 10.10
Info : VTarget = 3.339 V
Info : clock speed 1000 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 : Listening on port 3333 for gdb connections
As stated in the ESP-IDF JTAG Debugging page, such an error is most probably referring to a problem in pin connections.
However, I have checked them multiple times and I have no clue where this error originates from. I have gone through similar issues, but none has really been helpful for my case.

An interesting thing is, when I hold the EN button on the DevKit and run the command above, the error changes from

Code: Select all

Error: JTAG scan chain interrogation failed: all ones
to

Code: Select all

Error: JTAG scan chain interrogation failed: all zeros
This also happens when I ground the TDO.

I get the exact same behavior no matter which debugger, JLink or ESP-Prog, I use. I'd be grateful if anyone has any advice.

Thanks.

mikemoy
Posts: 626
Joined: Fri Jan 12, 2018 9:10 pm

Re: Error: JTAG scan chain interrogation failed: all ones

Postby mikemoy » Fri Dec 18, 2020 6:49 pm

An interesting thing is, when I hold the EN button on the DevKit and run the command above,
Not really. Holding the EN down hold it into a reset state.
how about providing your JTAG pinot to the module.

manorin
Posts: 3
Joined: Fri Dec 18, 2020 2:49 pm

Re: Error: JTAG scan chain interrogation failed: all ones

Postby manorin » Fri Dec 18, 2020 7:15 pm

Thanks @mikemoy for your reply.

True that. Here is the JTAG pinout (based on https://github.com/espressif/esp-iot-so ... AG_pin.png):

2x5 JTAG header pin number -----> ESP32 Module IO number
-------------------------------------------------------------------------
1 -> Module's 3v3
2 -> IO 14
3 -> Module's GND
4 -> IO 13
6 -> IO 15
8 -> IO 12

manorin
Posts: 3
Joined: Fri Dec 18, 2020 2:49 pm

Re: Error: JTAG scan chain interrogation failed: all ones

Postby manorin » Mon Dec 21, 2020 8:29 am

I've realized that my case is the same as the one described in this post https://www.esp32.com/viewtopic.php?t=12600. The module is pre-programmed with the AT firmware which interferes with the JTAG pins.

Does this mean that we have no choice other than using a USB to serial programmer? Isn't there a way to erase this stock firmware by JTAG?

Thank you for your help.

Timo Engelmann
Posts: 1
Joined: Tue Jan 26, 2021 10:18 pm

Re: Error: JTAG scan chain interrogation failed: all ones

Postby Timo Engelmann » Tue Jan 26, 2021 10:38 pm

Hi there,

I had the same problem with a ESP32 adapter board.
ESP32_error_report.jpg
ESP32_error_report.jpg (193.98 KiB) Viewed 17867 times
After some hours without success I found a customer comment on Amazon:
ESP32_wrong_label.jpg
ESP32_wrong_label.jpg (64.88 KiB) Viewed 17867 times
And this was the soultion for my problem.
Maybe it is helpful for other users.

Timo

Who is online

Users browsing this forum: No registered users and 110 guests