Does anyone know how to disable automatic system reset on USB CDC connect/disconnect in stm32duino?
Thanks
Disable system reset on USB connect/disconnect
Re: Disable system reset on USB connect/disconnect
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.
If your board resets then it's rather hardware related.
Re: Disable system reset on USB connect/disconnect
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.
Re: Disable system reset on USB connect/disconnect
use a longer timeout for watchdog reset?
Re: Disable system reset on USB connect/disconnect
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!
Re: Disable system reset on USB connect/disconnect
Do you want to directly disable automatic reset?
Re: Disable system reset on USB connect/disconnect
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.).