SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
Interrupts can be generated on two interrupt lines: INT0 and INT1. These lines can be enabled by setting the DCAN_CTL[1] IE0 and [17] IE1 bits, respectively. The interrupts are level triggered at the chip level.
The DCAN provides three groups of interrupt sources: message object interrupts, status change interrupts, and error interrupts (see Figure 24-170, Error and Status Change Interrupts and Figure 24-171, Message Objects Interrupts).
The source of an interrupt can be determined by the interrupt identifiers DCAN_INT[15:0] INT0ID/[23:16] INT1ID. When no interrupt is pending, the register will hold the value zero.
Each interrupt line remains active until the dedicated field in the interrupt register DCAN_INT[15:0] INT0ID/[23:16] INT1ID again reach zero (this means the cause of the interrupt is reset), or until IE0/IE1 are reset.
The value 0x8000 in the INT0ID field indicates that an interrupt is pending because the CAN core has updated (not necessarily changed) the Error and Status register (DCAN_ES). This interrupt has the highest priority. The software can update (reset) the status bits [9] WAKEUPPND, [4] RXOK, [3] TXOK and [2:0] LEC by reading DCAN_ES, but a write access of the software will never generate or reset an interrupt.
Values between 1 and the number of the last message object indicates that the source of the interrupt is one of the message objects, INT0ID resp. INT1ID will point to the pending message interrupt with the highest priority. The Message Object 1 has the highest priority; the last message object has the lowest priority.
An interrupt service routine that reads the message that is the source of the interrupt may read the message and reset the message object’s IntPnd at the same time (DCAN_IF1CMD/DCAN_IF2CMD[19] CLRINTPND bit). When IntPnd is cleared, DCAN_INT will point to the next message object with a pending interrupt.