Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32-C3 built-in JTAG port only detected when in download mode (OCD-436) #192

Closed
miroslavpetrov opened this issue Nov 8, 2021 · 3 comments

Comments

@miroslavpetrov
Copy link

Environment

  • Development Kit: [ESP32-C3-DevKitM-1]
  • Module or chip used: [ESP32-C3-MINI]
  • Debug Adapter: [USB JTAG]
  • OpenOCD version: [v0.10.0-esp32-20210902]
  • Operating System: [MacOS and Windows]
  • Using an IDE?: [VScode]
  • OpenOCD command line: [openocd -f board/esp32c3-builtin.cfg]
  • JTAG Clock: [default]
  • ESP-IDF version: [master]

Problem Description

I am using GPIO 18 and GPIO 19 on the devkitM and a usb cable to connect to Openocd.
The problem is that the Serial/JTAG debug device is only detected by the PC or Mac when the ESP32-C3 is in download mode(powered on while GPIO9 is LOW)

 USB JTAG/serial debug unit:
  Product ID:	0x1001
  Vendor ID:	0x303a
  Version:	1.01
  Serial Number:	7C:DF:A1:66:DD:1C
  Speed:	Up to 12 Mb/s
  Manufacturer:	Espressif
  Location ID:	0x14310000 / 24
  Current Available (mA):	500
  Current Required (mA):	500
  Extra Operating Current (mA):	0

I can successfully upload firmware from both the Serial and JTAG ports but nothing else. Its impossible to debug the firmware simply because the JTAG port is not presented to the PC or Mac when the ESP32-C3 is in normal boot mode.

Is that some limitation of I am missing something? I double checked the documentation and this weird behaviour is not mentioned anywhere.

@miroslavpetrov miroslavpetrov changed the title ESP32-C3 built-in JTAG port only showing when in download mode ESP32-C3 built-in JTAG port only detected when in download mode Nov 8, 2021
@github-actions github-actions bot changed the title ESP32-C3 built-in JTAG port only detected when in download mode ESP32-C3 built-in JTAG port only detected when in download mode (OCD-436) Nov 8, 2021
@igrr
Copy link
Member

igrr commented Nov 8, 2021

Hi @miroslavpetrov, which example/application and which ESP-IDF commit are you using?

@miroslavpetrov
Copy link
Author

Hi @igrr! I am the ESP-IDF commit is d0dd9ce1b9825c29ae2b462556c4bf3965ab774b.

My application is based on the switch example in ESP Rainmaker - https://github.com/espressif/esp-rainmaker/tree/master/examples/switch

@igrr
Copy link
Member

igrr commented Dec 13, 2021

@miroslavpetrov I've overlooked this at first, but it seems that the switch example configures GPIO19 as an output: https://github.com/espressif/esp-rainmaker/blob/722635985e2b99cdade949e611f0079208f360b0/examples/switch/main/app_driver.c#L25. This is one of the USB pins on ESP32-C3, so USB interface doesn't work after the pin is reconfigured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants