#386 STM32 CAN mailbox receive for second fifo

closed-fixed
2014-05-09
2013-03-03
wild-boar
No

The check for the second FIFO is not correct when specifying CAN_ANY_MAILBOX. The fix incorporates the check for mailbox 1 and 2. The patch against trunk is:

Index: os/hal/platforms/STM32/can_lld.c

--- os/hal/platforms/STM32/can_lld.c (revision 5348)
+++ os/hal/platforms/STM32/can_lld.c (working copy)
@@ -567,7 +569,7 @@

switch (mailbox) {
case CAN_ANY_MAILBOX:
- return (canp->can->RF0R & (CAN_RF0R_FMP0 | CAN_RF1R_FMP1)) != 0;
+ return ((canp->can->RF0R & CAN_RF0R_FMP0) != 0 || (canp->can->RF1R & CAN_RF1R_FMP1) != 0);
case 1:
return (canp->can->RF0R & CAN_RF0R_FMP0) != 0;
case 2:

Discussion

    • summary: CAN mailbox receive for second fifo --> STM32 CAN mailbox receive for second fifo
    • assigned_to: nobody --> gdisirio
    • priority: 5 --> 4
    • milestone: --> trunk
    • status: open --> closed-fixed
     
  • Hi,

    Fixed in repository.