hello,
I have a project base on S32 design studio for ARM R1,S32K146 Microcontroller 100pins LQFP.The project need 3 FlexCAN channels. So I initialized FlexCAN driver(canCom0,canCom1 and canCom2).
Then I found a bug when I debug CAN SDK(086) API, The canCom2 only have max 16 RXIMR,but the SDK use 32 to initial RXIMR.
the function"status_t FLEXCAN_EnableRxFifo(CAN_Type * base, uint32_t numOfFilters)" 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);
}
when initialized third FlexCAN(canCom2), the CAN_RXIMR_COUNT is 32,but the "sizeof(base->RXIMR[i])" si 16.The number of RXIMR registers is not equal to the number of message buffer for third instance. so base->RXIMR[] overflow. The program goes wrong.
thanks.