diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-11-03 09:54:07 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-11-03 09:54:07 +0000 |
commit | 8202283e9d71f20b7107af1e96e5fc3f43217416 (patch) | |
tree | f6505a284f899e5c300f39ebd814eec7776762a3 /os | |
parent | 18278d42968070d60923d65fda4afca0d0570fc5 (diff) | |
download | ChibiOS-8202283e9d71f20b7107af1e96e5fc3f43217416.tar.gz ChibiOS-8202283e9d71f20b7107af1e96e5fc3f43217416.tar.bz2 ChibiOS-8202283e9d71f20b7107af1e96e5fc3f43217416.zip |
Tentative fix for wakeup in STM32 CAN driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4796 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/platforms/STM32/can_lld.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/can_lld.c b/os/hal/platforms/STM32/can_lld.c index 32d273c6f..d21d44285 100644 --- a/os/hal/platforms/STM32/can_lld.c +++ b/os/hal/platforms/STM32/can_lld.c @@ -131,6 +131,8 @@ CH_IRQ_HANDLER(STM32_CAN1_SCE_HANDLER) { CAN1->MSR = CAN_MSR_ERRI | CAN_MSR_WKUI | CAN_MSR_SLAKI;
/* Wakeup event.*/
if (msr & CAN_MSR_WKUI) {
+ CAND1.state = CAN_READY;
+ CAND1.can->MCR &= ~CAN_MCR_SLEEP;
chSysLockFromIsr();
chEvtBroadcastI(&CAND1.wakeup_event);
chSysUnlockFromIsr();
|