AnsweredAssumed Answered

RT1064EVK board, CANFD  with FLEXCAN_ErrorStatus

Question asked by 何 春虎 on Feb 14, 2020
Latest reply on Feb 20, 2020 by 何 春虎

The CANFD function of the RT1064EVK board USES the evkmimxrt1064_canfd_interrupt_transfer example in SDK2.7. J11 on the board is not connected to anything else. After the program runs, the callback function keeps reporting the status of kStatus_FLEXCAN_ErrorStatus.In the fsl_flexcan.c file:

 

void FLEXCAN_TransferHandleIRQ(CAN_Type *base, flexcan_handle_t *handle)
{
/* Assertion. */
assert(NULL != handle);

status_t status;
uint32_t result = 0xFFU;
uint32_t EsrStatus = 0U;

do
{
/* Get Current FlexCAN Module Error and Status. */
EsrStatus = FLEXCAN_GetStatusFlags(base);

/* To handle FlexCAN Error and Status Interrupt first. */
if (0U != (EsrStatus & ((uint32_t)kFLEXCAN_TxWarningIntFlag | (uint32_t)kFLEXCAN_RxWarningIntFlag |
(uint32_t)kFLEXCAN_BusOffIntFlag | (uint32_t)kFLEXCAN_ErrorIntFlag)))
{
status = kStatus_FLEXCAN_ErrorStatus;
/* Clear FlexCAN Error and Status Interrupt. */
FLEXCAN_ClearStatusFlags(base, (uint32_t)kFLEXCAN_TxWarningIntFlag | (uint32_t)kFLEXCAN_RxWarningIntFlag |
(uint32_t)kFLEXCAN_BusOffIntFlag | (uint32_t)kFLEXCAN_ErrorIntFlag);
}
else if (0U != (EsrStatus & (uint32_t)kFLEXCAN_WakeUpIntFlag))

 

CANFD cannot operate normally. What is the reason?

Outcomes