fix USB doesn't work after waking up from low power mode
This commit is contained in:
parent
e7d97ceb04
commit
eb2a2996e6
1 changed files with 5 additions and 1 deletions
|
|
@ -183,7 +183,11 @@ static inline void enter_low_power_mode_prepare(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void lpm_wakeup(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);
|
if (bluetooth_transport.init) bluetooth_transport.init(true);
|
||||||
|
|
||||||
chSysLock();
|
chSysLock();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue