Device-level Interrupt
Configurations:
- Initialize PIE and PIE Vector
Table. Enable Global and Real-time Interrupts.
- Configure the interrupt handler
in the PIE Vector Table. Enable interrupt in the interrupt controller.
Module-level Interrupt
Configurations
- Enable Error and Status
interrupts, using the CAN Control Register (CAN_CTL). Enable Message Object
interrupts while setting up Message Objects individually.
- Select interrupt line where each
message object interrupt is to be routed using the register (CAN_IP_MUX21),
where each bit corresponds to a single message object.
- Interrupt Service Routine (ISR) :
Read Interrupt Register (CAN_INT) to determine the source of the interrupt
(status/error/particular message object). Clear the Interrupt by writing to CAN
Error and Status Register (CAN_ES) or by clearing the IntPnd bit in the
corresponding Message Object. Clear the Global Interrupt Flag for the
corresponding Interrupt Line.
- Acknowledge the interrupt via
PIEACK.