aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-12-06 14:09:22 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-12-06 14:09:22 +0000
commitaa9f517f87125bbe7e9520c838627cde509ffa8c (patch)
treed9c8583fbd2bc0d40b01f27414e8cf8738881d28 /os/hal/platforms
parentaac691f35fc7090baa51e31d80aab4f495ddcaa3 (diff)
downloadChibiOS-aa9f517f87125bbe7e9520c838627cde509ffa8c.tar.gz
ChibiOS-aa9f517f87125bbe7e9520c838627cde509ffa8c.tar.bz2
ChibiOS-aa9f517f87125bbe7e9520c838627cde509ffa8c.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1378 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms')
-rw-r--r--os/hal/platforms/STM32/can_lld.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/can_lld.c b/os/hal/platforms/STM32/can_lld.c
index 7a9970c30..3c8a17b84 100644
--- a/os/hal/platforms/STM32/can_lld.c
+++ b/os/hal/platforms/STM32/can_lld.c
@@ -59,6 +59,8 @@ CH_IRQ_HANDLER(Vector8C) {
/* No more events until a message is transmitted.*/
CAN1->TSR = CAN_TSR_RQCP0 | CAN_TSR_RQCP1 | CAN_TSR_RQCP2;
+ while (chSemGetCounterI(&CAND1.cd_txsem) < 0)
+ chSemSignalI(&CAND1.cd_txsem);
chEvtBroadcastI(&CAND1.cd_txempty_event);
CH_IRQ_EPILOGUE();
@@ -77,6 +79,8 @@ CH_IRQ_HANDLER(Vector90) {
if ((rf0r & CAN_RF0R_FMP0) > 0) {
/* No more receive events until the queue 0 has been emptied.*/
CAN1->IER &= ~CAN_IER_FMPIE0;
+ while (chSemGetCounterI(&CAND1.cd_rxsem) < 0)
+ chSemSignalI(&CAND1.cd_rxsem);
chEvtBroadcastI(&CAND1.cd_rxfull_event);
}
if ((rf0r & CAN_RF0R_FOVR0) > 0) {