Reset when the USB CDC is disconnected

matsujirushi
Posts: 1
Joined: Mon Mar 06, 2023 12:09 am

Reset when the USB CDC is disconnected

Postby matsujirushi » Mon Mar 06, 2023 12:33 am

Hi,

I am trying USB CDC of ESP32-C3.
The ESP32-C3 seems to reset when the USB CDC is disconnected from the PC's terminal software.
(Checked in "Basic Console Example". https://github.com/espressif/esp-idf/tr ... sole/basic )

Is there a way to prevent it from resetting on disconnect?

xleaderx
Posts: 1
Joined: Tue Aug 22, 2023 6:23 pm

Re: Reset when the USB CDC is disconnected

Postby xleaderx » Tue Aug 22, 2023 6:25 pm

I see that nobody answer...
I have the same issue.
Did you found any solution?

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

Re: Reset when the USB CDC is disconnected

Postby ESP_Sprite » Wed Aug 23, 2023 2:12 am

What is your setup (hw/sw)?

abellofiore
Posts: 10
Joined: Tue May 16, 2023 7:02 pm

Re: Reset when the USB CDC is disconnected

Postby abellofiore » Thu Aug 24, 2023 4:02 pm

The built-in CDC hardware looks at CTS and DTR from the host to control the boot mode and reset of the ESP32. Windows controls these lines (annoyingly) and there's really nothing you can do about this when connecting/disconnecting.
What you CAN do is NOT use the built-in CDC controller. On the ESP32-S3, you can disable it entirely in eFuse (if you want) and switch the PHY to use the CPU when your image boots up, then implement the CDC controller using TinyUSB (there are examples). Then, you can can ignore CTS DTR as you like.
If you don't disable the CDC in eFuse, on power-up, you'll see the built-in CDC briefly, then it will go away and be replaced with your SW CDC instance.

Who is online

Users browsing this forum: Google [Bot] and 192 guests