
Chapter 13 Freescale’s Scalable Controller Area Network (S12MSCANV3)
MC9S12XDP512 Data Sheet, Rev. 2.13
572
Freescale Semiconductor
13.3.2.6
MSCAN Receiver Interrupt Enable Register (CANRIER)
This register contains the interrupt enable bits for the interrupt ags described in the CANRFLG register.
5:4
RSTAT[1:0]
Receiver Status Bits — The values of the error counters control the actual CAN bus status of the MSCAN. As
soon as the status change interrupt ag (CSCIF) is set, these bits indicate the appropriate receiver related CAN
bus status of the MSCAN. The coding for the bits RSTAT1, RSTAT0 is:
00
RxOK: 0
≤ receive error counter ≤ 96
01
RxWRN: 96
< receive error counter ≤ 127
10
RxERR: 127
< receive error counter
11
Bus-off1: transmit error counter
> 255
3:2
TSTAT[1:0]
Transmitter Status Bits — The values of the error counters control the actual CAN bus status of the MSCAN.
As soon as the status change interrupt ag (CSCIF) is set, these bits indicate the appropriate transmitter related
CAN bus status of the MSCAN. The coding for the bits TSTAT1, TSTAT0 is:
00
TxOK: 0
≤ transmit error counter ≤ 96
01
TxWRN: 96
< transmit error counter ≤ 127
10
TxERR: 127
< transmit error counter ≤ 255
11
Bus-Off: transmit error counter
> 255
1
OVRIF
Overrun Interrupt Flag — This ag is set when a data overrun condition occurs. If not masked, an error interrupt
is pending while this ag is set.
0
No data overrun condition
1
A data overrun detected
0
RXF2
Receive Buffer Full Flag — RXF is set by the MSCAN when a new message is shifted in the receiver FIFO.
This ag indicates whether the shifted buffer is loaded with a correctly received message (matching identier,
matching cyclic redundancy code (CRC) and no other errors detected). After the CPU has read that message
from the RxFG buffer in the receiver FIFO, the RXF ag must be cleared to release the buffer. A set RXF ag
prohibits the shifting of the next FIFO entry into the foreground buffer (RxFG). If not masked, a receive interrupt
is pending while this ag is set.
0
No new message available within the RxFG
1
The receiver FIFO is not empty. A new message is available in the RxFG
1 Redundant Information for the most critical CAN bus status which is “bus-off”. This only occurs if the Tx error counter exceeds
a number of 255 errors. Bus-off affects the receiver state. As soon as the transmitter leaves its bus-off state the receiver state
skips to RxOK too. Refer also to TSTAT[1:0] coding in this register.
2 To ensure data integrity, do not read the receive buffer registers while the RXF ag is cleared. For MCUs with dual CPUs,
reading the receive buffer registers while the RXF ag is cleared may result in a CPU fault condition.
Module Base + 0x0005
76543210
R
WUPIE
CSCIE
RSTATE1
RSTATE0
TSTATE1
TSTATE0
OVRIE
RXFIE
W
Reset:
00000000
Figure 13-9. MSCAN Receiver Interrupt Enable Register (CANRIER)
Table 13-9. CANRFLG Register Field Descriptions (continued)
Field
Description