CAN Interrupts somehow stop happening

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User8570
Level 3
Level 3
Working with the XMC4500 chip, I have two CAN Nodes setup and they have multiple MOs to transmit/receive data. Connecting the XMC4500 to a high load bus (>60%) if there is some Error Frames, at some point the Interrupt stop entering to the handler. I am checking for status and also clearing any possible errors:


void can_recv_interrupt()
{
uint32_t tmp;
// received CAN Frame on EPS CAN
if (CAN_NODE_GetStatus(&EPS_CAN) & XMC_CAN_NODE_STATUS_LAST_ERROR_CODE)
{
//CAN_NODE_ClearStatus(&EPS_CAN,XMC_CAN_NODE_STATUS_LAST_ERROR_CODE );
}
else
{
if (check_for_pending_frame(&EPS_CAN, &EPS_CAN_LMO_01_Config))
{
copy_eps_can_frame(&EPS_CAN_LMO_01_Config);
}
}
// Check for Node error
if ( CAN_NODE_GetStatus(&EPS_CAN) & XMC_CAN_NODE_STATUS_ALERT_WARNING )
{
//Clear the flag
CAN_NODE_DisableEvent(&EPS_CAN,XMC_CAN_NODE_EVENT_ALERT);
}



}


Both CAN Nodes TX/RX CAN and both are not entering to the respective ISRs at some point which it is when some error frame are detected.
0 Likes
1 Reply
SunYajun
Employee
Employee
10 replies posted 5 replies posted Welcome!
There can be many sources of an error on a CAN bus. Since CAN is used in critical applications it is important that it continues to operate at all times.
in the CAN protocol the fault confinement checks critical aspects which is achieved by identifying a defect node and switching it from bus when it is permanent failures.
from problem description below it seems there is not permanent failures.
please try to use a lower priority for LEC interrupts, and be aware of following text in the User’s manual Table 21-12 Encoding of the LEC Bit field
111B CPU write to LEC:
Whenever the CPU writes the value 111 to LEC, it takes the value 111.
Whenever the CPU writes another value to LEC, the written LEC value
is ignored.
0 Likes