JTAG debugging fails

meetshah10
Posts: 11
Joined: Tue Jun 14, 2022 6:30 am

JTAG debugging fails

Postby meetshah10 » Wed Jun 15, 2022 10:58 am

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

ESP_Sprite
Posts: 9709
Joined: Thu Nov 26, 2015 4:08 am

Re: JTAG debugging fails

Postby ESP_Sprite » Thu Jun 16, 2022 6:58 am

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.

meetshah10
Posts: 11
Joined: Tue Jun 14, 2022 6:30 am

Re: JTAG debugging fails

Postby meetshah10 » Thu Jun 16, 2022 10:24 am

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.

meetshah10
Posts: 11
Joined: Tue Jun 14, 2022 6:30 am

Re: JTAG debugging fails

Postby meetshah10 » Mon Jun 20, 2022 7:07 am

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 .

ESP_Sprite
Posts: 9709
Joined: Thu Nov 26, 2015 4:08 am

Re: JTAG debugging fails

Postby ESP_Sprite » Tue Jun 21, 2022 3:01 am

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?

meetshah10
Posts: 11
Joined: Tue Jun 14, 2022 6:30 am

Re: JTAG debugging fails

Postby meetshah10 » Tue Jun 21, 2022 4:50 am

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
Attachments
connection USB ro Esp32-C3.jpeg
connection USB ro Esp32-C3.jpeg (237.5 KiB) Viewed 3847 times
JTAG OUTPUT.PNG
JTAG OUTPUT.PNG (43.75 KiB) Viewed 3847 times

ESP_Sprite
Posts: 9709
Joined: Thu Nov 26, 2015 4:08 am

Re: JTAG debugging fails

Postby ESP_Sprite » Tue Jun 21, 2022 5:42 am

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.

meetshah10
Posts: 11
Joined: Tue Jun 14, 2022 6:30 am

Re: JTAG debugging fails

Postby meetshah10 » Wed Jun 22, 2022 12:19 pm

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 !!!

Who is online

Users browsing this forum: No registered users and 228 guests