Search found 1 match

by kscheff
Wed Jul 10, 2024 8:58 am
Forum: ESP-IDF
Topic: ESP32-C3 How to know if USB console (GPIO18, GPIO19) is plugged in?
Replies: 6
Views: 2990

Re: ESP32-C3 How to know if USB console (GPIO18, GPIO19) is plugged in?

With framework 5.2.1

Code: Select all

*(uint_32_t*)USB_SERIAL_JTAG_FRAM_NUM_REG
returns a 12-bit counter, counting down.
In my observation the counter runs in average with ~36.5ms.
When no USB was connect it shows 0, it stops counting down when USB is unplugged.