wang shizhen

SDK Bug in CAN FIFO

Discussion created by wang shizhen on Feb 2, 2018
Latest reply on Feb 2, 2018 by Ana Aldescu

Hello:

   I has a project that need the FIFO of CAN. CAN 0 FIFO work fine, but when i use CAN1 FIFO,the programe will enter DefaultISR.

  I found a bug when I debug CAN SDK(085 or 086) API, The CAN 1 only have max 16 RXIMR,but the the SDK use 32 to initial RXIMR:

 

FLEXCAN_DRV_Init-->FLEXCAN_EnableRxFifo:

code:

for (i = 0; i < CAN_RXIMR_COUNT; i++)
{
/* RX individual mask */
base->RXIMR[i] = (CAN_RXIMR_MI_MASK << CAN_ID_EXT_SHIFT) & (CAN_ID_STD_MASK | CAN_ID_EXT_MASK);
}

the CAN_RXIMR_COUNT is 32.

 

The CAN1 FIFO program will work fine when I change CAN_RXIMR_COUNT to 16 .

 

kind regards

Outcomes