fix USB doesn't work after waking up from low power mode

This commit is contained in:
lokher 2022-12-30 14:49:22 +08:00
parent e7d97ceb04
commit eb2a2996e6

View file

@ -183,7 +183,11 @@ static inline void enter_low_power_mode_prepare(void) {
}
static inline void lpm_wakeup(void) {
stm32_clock_fast_init();
if (usb_power_connected())
stm32_clock_init();
else
stm32_clock_fast_init();
if (bluetooth_transport.init) bluetooth_transport.init(true);
chSysLock();