Page 1 of 1

JTAG debugging fails

Posted: Wed Jun 15, 2022 10:58 am
by meetshah10
I am using esp32-C3 module and external JTAG debugger ESP-Prog to debug the code. I have installed and updated the required drivers needed for JTAG interface to work using ZADIG. The openOCD is also configured during the process of installation of ESP-IDF in VS CODE.
FT2232H JTAG debugger uses Dual RS232-HS interface.

Still this error comes...

Open On-Chip Debugger v0.11.0-esp32-20211220 (2021-12-20-15:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2

adapter speed: 5000 kHz

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 5000 kHz
❌ Error: JTAG scan chain interrogation failed: all ❌ zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32c3.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
❌ Error: dtmcontrol is 0. Check JTAG connectivity/board power.
Warn : target esp32c3 examination failed
Info : starting gdb server for esp32c3 on 3333
Info : Listening on port 3333 for gdb connections
[Stopped] : OpenOCD Server

Even tried to install Invoke-WebRequest 'https://dl.espressif.com/dl/idf-env/idf-env.exe' -OutFile .\idf-env.exe; .\idf-env.exe driver install --espressif in powershell but still no improvment.

references used:
https://docs.espressif.com/projects/esp ... -jtag.html

Re: JTAG debugging fails

Posted: Thu Jun 16, 2022 6:58 am
by ESP_Sprite
The C3 by default uses its own internal USB-serial-JTAG controller. You need to burn an eFuse to switch that over to an external one. Alternatively, simply connect an USB cable to GPIO18/19 to make use of the internal one.

Re: JTAG debugging fails

Posted: Thu Jun 16, 2022 10:24 am
by meetshah10
Thanks for your response

https://docs.espressif.com/projects/esp ... -jtag.html

I found out this link for efuse with two options. Can you let me know which option will lead to switching over external one. and what is the procedure to configure efuse ?

I tried to connect an USB cable to GPIO18/19 but it did not worked for me.

Re: JTAG debugging fails

Posted: Mon Jun 20, 2022 7:07 am
by meetshah10
Can you let me know which option will lead to switching over external one. and what is the procedure to configure efuse ?

I tried using USB-JTAG configuring it using GPIO 18/19 but my it does not get recognized .

Re: JTAG debugging fails

Posted: Tue Jun 21, 2022 3:01 am
by ESP_Sprite
It's in the docs. Also, you'd use espefuse.py to burn those fuses. It's odd that USB doesn't work for you; it hasn't failed yet for me; are you sure you're connecting it correctly?

Re: JTAG debugging fails

Posted: Tue Jun 21, 2022 4:50 am
by meetshah10
Jtag debugging issues

For Jtag degugging as external one we need to strap pin GPIO10 which is not at all a strapping pin in documentation.
https://docs.espressif.com/projects/esp ... /gpio.html

C:\Users\User_name\esp\esp-idf\components\esptool_py\esptool>espefuse.py -p COM11 burn_efuse JTAG_SEL_ENABLE
I used this command for burning fuse but says invalid efuse name


USB Debugging issue

I am using a TYPE C USB connector with ESP32-C3. Connections are as follows:

TYPE C ESP32-C3
D- (A7) GPIO 18
D+ (A6) GPIO 19
V_BUS (B9) 5V
GND (B1) GND

Please find the attachment

Re: JTAG debugging fails

Posted: Tue Jun 21, 2022 5:42 am
by ESP_Sprite
USBC may be your issue; you have the USB pins connected to only one pair of the USB lanes. Try again with the USB connector reversed.

Re: JTAG debugging fails

Posted: Wed Jun 22, 2022 12:19 pm
by meetshah10
I reversed the USB pins but it still my device does not got recognized might be breakout board issue , therefore I bought new one, now it works for me.
Thanks for your help !!!