Skip to content

Commit e4a55c8

Browse files
committed
NUVOTON: CAN: Fix filter mask being zero
On mask being zero, it means any match, not exact match. NOTE: This fix only targets CAN (M453/M487), not CAN-FD (M467). NOTE: NUC472 CAN doesn't support filter.
1 parent 989a694 commit e4a55c8

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

targets/TARGET_NUVOTON/TARGET_M451/can_api.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,6 @@ int can_filter(can_t *obj, uint32_t id, uint32_t mask, CANFormat format, int32_t
314314
}
315315

316316
uint32_t numask = mask;
317-
if( numask == 0x0000 )
318-
{
319-
return CAN_SetRxMsg((CAN_T *)NU_MODBASE(obj->can), handle, (uint32_t)format, id);
320-
}
321317
if( format == CANStandard )
322318
{
323319
numask = (mask << 18);

targets/TARGET_NUVOTON/TARGET_M480/can_api.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,10 +363,6 @@ int can_filter(can_t *obj, uint32_t id, uint32_t mask, CANFormat format, int32_t
363363
}
364364

365365
uint32_t numask = mask;
366-
if( numask == 0x0000 )
367-
{
368-
return CAN_SetRxMsg((CAN_T *)NU_MODBASE(obj->can), handle, (uint32_t)format, id);
369-
}
370366
if( format == CANStandard )
371367
{
372368
numask = (mask << 18);

0 commit comments

Comments
 (0)