A Patch For FlexCAN RX FIFO ID table structure

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

A Patch For FlexCAN RX FIFO ID table structure

A Patch For FlexCAN RX FIFO ID table structure

There was a macro definition issue in the flexcan driver of ksdk 2.0, the macros of RX_FIFO_STD_MASK_TYPE_B/C were defined based on maco FLEXCAN_ID_STD(id), for example:

#define FLEXCAN_RX_FIFO_STD_MASK_TYPE_B_HIGH(id, rtr, ide) \
(((uint32_t)((uint32_t)(rtr) << 31) | (uint32_t)((uint32_t)(ide) << 30)) | \
(FLEXCAN_ID_STD(id) << 16)) /**< Standard Rx FIFO Mask helper macro Type B upper part helper macro. */

but FLEXCAN_ID_STD(id) is defined for flexCAN Message Buffer structure, so FLEXCAN_ID_STD(id)  is a value of "id" left-shifted by 18,  according to the spec.

169566_169566.pngpastedImage_1.png

while for RX FIFO ID table structure, the spec of Type B/C is different.

169567_169567.pngpastedImage_2.png

169568_169568.pngpastedImage_3.png

so we should use the value of id directly to define the type B and type C Rx Frame Identifier. For example,

#define FLEXCAN_RX_FIFO_STD_MASK_TYPE_B_HIGH(id, rtr, ide) \
(((uint32_t)((uint32_t)(rtr) << 31) | (uint32_t)((uint32_t)(ide) << 30)) | \
((id & 0x7FF) << 19)) /**< Standard Rx FIFO Mask helper macro Type B upper part helper macro. */

 

This patch doesn't affect FlexCAN operation related with message buffers , neither with RX FIFO A type ID table.

 

Please kindly refer to the attachment for details.

 

Sorry for the inconvenience that has caused.

 

-Kan

Labels (1)
Attachments
No ratings
Version history
Last update:
‎11-15-2016 07:10 PM
Updated by: