English
Language : 

CP3BT23 Datasheet, PDF (110/260 Pages) Texas Instruments – CP3BT23 Reprogrammable Connectivity Processor with Bluetooth and Dual CAN Interfaces
18.7.1 Highest Priority Interrupt Code
Table 42 Highest Priority Interrupt Code (ICEN=FFFF)
To reduce the decoding time for the CIPND register, the
buffer interrupt request with the highest priority is placed as
interrupt status code into the IST[3:0] section of the CSTP-
CAN Interrupt
Request
IRQ
IST3
IST2
IST1
IST0
ND register.
Buffer 10
1
1
0
1
1
Each of the buffer interrupts as well as the error interrupt
can be individually enabled or disabled in the CAN Interrupt
Enable register (CIEN). As soon as an interrupt condition
Buffer 11
Buffer 12
1
1
1
0
0
1
1
1
0
1
occurs, every interrupt request is indicated by a flag in the
CAN Interrupt Pending register (CIPND). When the interrupt
code logic for the present highest priority interrupt request
Buffer 13
Buffer 14
1
1
1
1
0
1
1
1
1
1
is enabled, this interrupt will be translated into the IST3:0
bits of the CAN Status Pending register (CSTPND). An in- 18.7.2 Usage Hints
terrupt request can be cleared by setting the corresponding The interrupt code IST3:0 can be used within the interrupt
bit in the CAN Interrupt Clear register (CICLR).
Figure 57 shows the CAN interrupt management.
CIEN
CICLR
te CIPND
Clear interrupt flags of every
message buffer individually
handler as a displacement to jump to the relevant subrou-
tine.
The CAN Interrupt Code Enable (CICEN) register is used in
the CAN interrupt handler if software is servicing all receive
buffer interrupts first, followed by all transmit buffer inter-
rupts. In this case, software can first enable only receive
buffer interrupts to be coded, then scan and service all
pending interrupt requests in the order of their priority. After
processing all the receive interrupts, software changes the
CICEN register to disable all receive buffers and enable all
transmit buffers, then services all pending transmit buffer in-
terrupt requests according to their priorities.
CICEN
18.8 TIME STAMP COUNTER
le ICODE
IRQ IST3 IST2 IST1 IST0
DS043
o Figure 57. Interrupt Management
The highest priority interrupt source is translated into the
bits IRQ and IST3:0 as shown in Table 42.
s Table 42 Highest Priority Interrupt Code (ICEN=FFFF)
The CAN module features a free running 16-bit timer (CT-
MR) incrementing every bit time recognized on the CAN
bus. The value of this timer during the ACK slot is captured
into the TSTP register of a message buffer after a success-
ful transmission or reception of a message. Figure 58
shows a simplified block diagram of the Time Stamp
counter.
CAN bits on the bus
ACK slot and buffer 0 active
+ 1 16-Bit counter
Reset
CAN Interrupt
Request
IRQ
IST3
IST2
IST1
IST0
b No Request
0
0
0
0
0
Error Interrupt 1
0
0
0
0
O Buffer 0
1
0
0
0
1
ACK slot
TSTP register
Figure 58. Time Stamp Counter
DS044
Buffer 1
1
0
0
1
0
The timer can be synchronized over the CAN network by re-
Buffer 2
1
0
0
1
1
ceiving or transmitting a message to or from buffer 0. In this
Buffer 3
1
0
1
0
0
case, the TSTP register of buffer 0 captures the current
CTMR value during the ACK slot of a message (as above),
Buffer 4
1
0
1
0
1
and then the CTMR is reset to 0000b. Synchronization can
Buffer 5
1
0
1
1
0
be enabled or disabled using the CGCR.TSTPEN bit.
Buffer 6
1
0
1
1
1
Buffer 7
1
1
0
0
0
Buffer 8
1
1
0
0
1
Buffer 9
1
1
0
1
0
109
www.national.com