We are using on an AM335x both CAN interfaces. On the CAN interface 2 we have the problem, that the INT register (offset = 10h) has sometimes after a powerfail always no valid message (0 is set) number set after an interrupt.
The problem is from powerfail to powerfail different. When it is working after a powerfail, we have no further problems. The CAN interface 1 is working always fine. We have the same interrupt handler for interface 1 and 2 and we are using INT0 for DCAN1 and DCAN2.
In the interrupt handler all interrupts will be disabled in the CTL register.
...
/* Interrupt line 0 disable */
/* Interrupt line 1 disable */
DCANIntLineDisable (base, (DCAN_INT_LINE0 | DCAN_INT_LINE1));
/* Status change interrupt disable */
/* Error interrupt disable */
DCANIntDisable (base, (DCAN_STATUS_CHANGE_INT | DCAN_ERROR_INT));
...
In the CAN eventhandler we poll the INT Register for a valid message number, make the message handling for receive and transmit and when the INT Register value ist 0 we enable the saved interrupts again in the CTL register.
register values:
DCAN0 0x481cc000 DCAN1 0x481d0000
CTL Register: 0x0000160e 0x0000160e
Do you have an idea to solve the problem ?