USB MCU only responds during debugging or with USB plugged in
04/96/2016 | 12:29 AM
My USB MCU (EFM8UB1, for example), while using the USB Library, has peripherals that should be active during all times. However, these peripherals only seem to work during a debug session or when the device is connected to a USB cable. What is happening?
It is likely that the USB Library is configured to put the device into Suspend mode when it is not connected to a USB cable. This will cause all other peripherals to stop functioning, since Suspend will disable all of the device's clocks that supply other peripherals. The debugger also has the ability to remove the device from Suspend mode, allowing peripherals to resume operation.
The USB Library can be configured to avoid Suspend mode, even when USB is disconnected. This can be accomplished by modifying usbconfig.h.