CAN Controllers and Acceptance Filter
163
Philips Semiconductors
Preliminary User Manual
LPC2119/2129/2292/2294
ARM-based Microcontroller
Table 127: CAN Interrupt and Capture Register (CANICR - 0xE00x x00C)
CANICR
Name
Function
Reset Value RM Set
0
RI
1: Receive Interrupt --
this bit is set whenever the RBS bit in CANSR and the RIE
bit in CANIER are both 1, indicating that a received message is available.=.
0
0
1
TI1
1: Transmit Interrupt 1 -- this bit is set when the TBS1 bit in CANSR goes from 0
to 1, indicating that Transmit buffer 1 is available, and the TIE1 bit in CANIER is 1.
0
0
2
EI
1: Error Warning Interrupt -- this bit is set on every change (set or clear) of the Error
Status or Bus Status bit in CANSR, if the EIE bit in CAN is 1 at the time of the
change.
0
X
3
DOI
1: Data Overrun Interrupt -- this bit is set when the DOS bit in CANSR goes from
0 to 1, if the DOIE bit in CANIE is 1.
0
0
4
WUI
1: Wake-Up Interrupt: this bit is set if the CAN controller is sleeping and bus activity
is detected, if the WUIE bit in CANIE is 1.
0
0
5
EPI
1: Error Passive Interrupt -- this bit is set if the EPIE bit in CANIE is 1, and the CAN
controller switches between Error Passive and Error Active mode in either
direction.
0
0
6
ALI
1: Arbitration Lost Interrupt -- this bit is set if the ALIE bit in CANIE is 1, and the
CAN controller loses arbitration while attempting to transmit.
0
0
7
BEI
1: Bus Error Interrupt -- this bit is set if the BEIE bit in CANIE is 1, and the CAN
controller detects an error on the bus.
0
X
8
IDI
1: ID Ready Interrupt -- this bit is set if the IDIE bit in CANIE is 1, and a CAN
Identifier has been received.
0
0
9
TI2
1: Transmit Interrupt 2 -- this bit is set when the TBS2 bit in CANSR goes from 0
to 1, indicating that Transmit buffer 2 is available, and the TIE2 bit in CANIER is 1.
0
0
10
TI3
1: Transmit Interrupt 1 -- this bit is set when the TBS3 bit in CANSR goes from 0
to 1, indicating that Transmit buffer 3 is available, and the TIE3 bit in CANIER is 1.
0
0
20:16
ERRBIT
Error Code Capture: when the CAN controller detects a bus error, the location of
the error within the frame is captured in this field. The value reflects an internal
state variable, and as a result is not very linear:
00011: Start of Frame
00010: ID28:21
00110: ID20:18
00100: SRTR bit
00101: IDE bit
00111: ID17:13
01111: ID12:5
01110: ID4:0
01100: RTR bit
01011: DLC
01010: Data field
01000: CRC
11000: CRC delimiter
11001: Ack slot
11011: Ack delimiter
11011: End of Frame
10010: Intermission
10001: Active Error flag
10110: Passive error flag 10011: dominant OK bits
10111: Error delimiter
11000: Overload flag
Reading this byte enables another Bus Error Interrupt.
0
X
21
ERRDIR
When the CAN controller detects a bus error, the direction of the current bit is
captured in this bit. 1=receiving, 0=transmitting.
0
X
23:22
ERRC
When the CAN controller detects a bus error, the type of error is captured in this
field:
00=bit error, 01=Form error, 10=Stuff error, 11=other error.
0
X
28:24
ALCBIT
Each time arbitration is lost while trying to send on the CAN, the bit number within
the frame is captured into this field. 0 indicates arbitration loss in the first (MS) bit
of the Identifier … 31 indicates loss in the RTR bit of an extended frame. After this
byte is read, the ALI bit is cleared and a new Arbitration Lost interrupt can occur.
0
X