diff --git a/os/hal/platforms/STM32/can_lld.c b/os/hal/platforms/STM32/can_lld.c index ec9665da8..79094054a 100644 --- a/os/hal/platforms/STM32/can_lld.c +++ b/os/hal/platforms/STM32/can_lld.c @@ -138,11 +138,15 @@ CH_IRQ_HANDLER(CAN1_SCE_IRQHandler) { msr = CAN1->MSR; CAN1->MSR = CAN_MSR_ERRI | CAN_MSR_WKUI | CAN_MSR_SLAKI; /* Wakeup event.*/ +#if CAN_USE_SLEEP_MODE if (msr & CAN_MSR_WKUI) { + CAND1.state = CAN_READY; + CAND1.can->MCR &= ~CAN_MCR_SLEEP; chSysLockFromIsr(); chEvtBroadcastI(&CAND1.wakeup_event); chSysUnlockFromIsr(); } +#endif /* CAN_USE_SLEEP_MODE */ /* Error event.*/ if (msr & CAN_MSR_ERRI) { canstatus_t flags; diff --git a/readme.txt b/readme.txt index 3431a8211..76a7d263d 100644 --- a/readme.txt +++ b/readme.txt @@ -79,6 +79,7 @@ ***************************************************************************** *** 2.4.4 *** +- FIX: Fixed CAN_USE_SLEEP_MODE compilation problem (bug 3606616). - FIX: Fixed misplaced brace in icu_lld.c (bug 3605832). - FIX: Fixed bug prevents calling adcStartConversionI() within ISR (bug 3605053).