
M0A21/M0A23 Series
May 06, 2022
Page
618
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
Read Interrupt Pointer
NewDat = 1
Message Num = Interrupt Pointer
NO
YES
Case Interrupt Pointer
0x8000 else 0x0000
START
END
Status Change
Interrupt Handling
Write Message Num to IFn Command Register
(Read Message to IFn Registers,
Reset NewDat = 0, Reset IntPnd = 0)
Read IFn to Message Control
Read Data from IFn Data A,B
EoB = 1
Message Num = Message Num + 1
YES
NO
Figure 6.16-6 Application Software Handling of a FIFO Buffer
Handling Interrupts
If several interrupts are pending, the CAN Interrupt Register will point to the pending interrupt with the
highest priority, disregarding their chronological order. An interrupt remains pending until the application
software has cleared it.
The Status Interrupt has the highest priority. Among the message interrupts, interrupt priority of the
Message Object decreases with increasing message number.
A message interrupt is cleared by clearing the IntPnd bit (CAN_IFn_MCON[13]) of the Message Object.
The Status Interrupt is cleared by reading the Status Register.
The interrupt identifier, IntId, in the Interrupt Register, indicates the cause of the interrupt. When no
interrupt is pending, the register will hold the value zero. If the value of the Interrupt Register is different
from zero, then there is an interrupt pending and, if IE (CAN_CON[1]) is set, the CAN_INT interrupt
signal is active. The interrupt remains active until the Interrupt Register is back to value zero (the cause
of the interrupt is reset) or until IE is reset.