Disable system reset on USB connect/disconnect

Post here first, or if you can't find a relevant section!
Post Reply
mcu8484
Posts: 13
Joined: Tue Oct 20, 2020 1:11 am

Disable system reset on USB connect/disconnect

Post by mcu8484 »

Does anyone know how to disable automatic system reset on USB CDC connect/disconnect in stm32duino?

Thanks
GonzoG
Posts: 372
Joined: Wed Jan 15, 2020 11:30 am
Answers: 24
Location: Prudnik, Poland

Re: Disable system reset on USB connect/disconnect

Post by GonzoG »

There is no such thing. STMs do not need to reset on USB connect like AVR Arduino boards.
If your board resets then it's rather hardware related.
mcu8484
Posts: 13
Joined: Tue Oct 20, 2020 1:11 am

Re: Disable system reset on USB connect/disconnect

Post by mcu8484 »

There is no HW triggering reset. The issue appears to be the stm32duino USB CDC driver which takes a long time (>1s) in its ISR when the USB host connects/disconnects leading to watchdog timeout reset. Disabling the watchdog is not an option.
ag123
Posts: 1492
Joined: Thu Dec 19, 2019 5:30 am
Answers: 20

Re: Disable system reset on USB connect/disconnect

Post by ag123 »

use a longer timeout for watchdog reset?
jamesyyy
Posts: 1
Joined: Wed May 31, 2023 6:11 am

Re: Disable system reset on USB connect/disconnect

Post by jamesyyy »

mcu8484 wrote: Thu May 25, 2023 4:28 am Does anyone know how to disable automatic system reset on USB CDC connect/disconnect in stm32duino?

Thanks
I'm not sure, but I can try to help you find a solution. Have you checked the documentation or forums specific to the STM32duino community? They might have some insights or suggestions on how to disable the automatic system reset on USB CDC connect/disconnect. It's worth exploring those resources to see if anyone has encountered a similar issue and found a workaround. If you need any further assistance, feel free to ask!
jacobli
Posts: 42
Joined: Fri Jun 11, 2021 3:40 am

Re: Disable system reset on USB connect/disconnect

Post by jacobli »

Do you want to directly disable automatic reset?
mcu8484
Posts: 13
Joined: Tue Oct 20, 2020 1:11 am

Re: Disable system reset on USB connect/disconnect

Post by mcu8484 »

jacobli wrote: Fri Jun 02, 2023 9:42 am Do you want to directly disable automatic reset?
Yes but I need to keep the watchdog active and not longer than 1s. I am guessing that the stm32duino USB CDC driver is doing some handshaking with the host when USB connect/disconnect but taking too long and triggers the watchdog reset.

It would be helpful if someone who knows the stm32duino USB CDC driver internals can point out a potential solution (e.g. where to insert watchdog reset call, etc.).
Post Reply

Return to “General discussion”