FlexCAN_Library icon indicating copy to clipboard operation
FlexCAN_Library copied to clipboard

Fix for reading extended frames without filters

Open maxpfeif opened this issue 6 years ago • 0 comments

Was unable to receive extended CAN frames, with the existing initialization and default filter masking.

The MK66 datasheet, page 1749, footnote three indicates that unless EACEN is set to 1, we won't be able to pass extended frames.

"If the CTRL2[EACEN] bit is negated, the IDE bit of Mailbox is always compared with the IDE bit of the incoming frame."

The assignment of default masking for each MB is 0, only standard IDs may pass. Setting CTRL2[EACEN] to 1 bypasses this comparison problem and allows standard and extended IDs through with the default masking scheme, as I believe is intended.

I tested this transmitting and receiving both extended and standard IDs. Before this change, only standard IDs would pass, after both standard and extended IDs would pass. I did not test any message filtering with specific mailboxes.

maxpfeif avatar Feb 16 '19 22:02 maxpfeif