Hardware Reference
In-Depth Information
Name
Address
Description
CAN x TIDR0
CAN x TIDR1
CAN x TIDR2
CAN x TIDR3
CAN x TDSR0
CAN x TDSR1
CAN x TDSR2
CAN x TDSR3
CAN x TDSR4
CAN x TDSR5
CAN x TDSR6
CAN x TDSR7
CAN x TDLR
CAN x TBPR
CAN x TSRH
CAN x TSRL
$_0
$_1
$_2
$_3
$_4
$_5
$_6
$_7
$_8
$_9
$_A
$_B
$_C
$_D
$_E
$_F
CAN foreground transmit buffer x identifier register 0
CAN foreground transmit buffer x identifier register 1
CAN foreground transmit buffer x identifier register 2
CAN foreground transmit buffer x identifier register 3
CAN foreground transmit buffer x data segment register 0
CAN foreground transmit buffer x data segment register 1
CAN foreground transmit buffer x data segment register 2
CAN foreground transmit buffer x data segment register 3
CAN foreground transmit buffer x data segment register 4
CAN foreground transmit buffer x data segment register 5
CAN foreground transmit buffer x data segment register 6
CAN foreground transmit buffer x data segment register 7
CAN foreground transmit buffer x data length register
CAN foreground transmit buffer x priority register
CAN foreground transmit buffer x timestamp register high
CAN foreground transmit buffer x timestamp register low
1. x can be 0, 1, 2, 3, or 4.
2. The absolute address of each register is equal to the sum of the base address of the CAN foreground
transmit buffer x and the address field of the corresponding register.
Table 13.2b CAN foreground transmit buffer x variable names
13.9.3 Transmit Storage Structure
The design of the MSCAN transmit-structure achieves two goals.
Providing the capability to send out a stream of scheduled messages without
releasing the bus between the two messages
Prioritizing messages so that the message with the highest priority is sent out first
As shown in Figure 13.37, the MSCAN has a triple transmit buffer scheme that allows
multiple messages to be set up in advance and achieve a real-time performance. Only one of the
three transmit buffers is accessible to the user at a time. A transmit buffer is made accessible to
the user by writing an appropriate value into the CAN x TBSEL register.
The procedure for transmitting a message includes the following steps:
1. Identifying an available transmit buffer by checking the TXEx flag associated with the
transmit buffer
2. Setting a pointer to the empty transmit buffer by writing the CAN x TFLG register to
the CAN x TBSEL register, making the transmit buffer accessible to the user
3. Storing the identifier, the control bits, and the data contents into one of the transmit
buffers
4. Flagging the buffer as ready by clearing the associated TXE flag
After step 4, the MSCAN schedules the message for transmission and signals the success-
ful transmission of the buffer by setting the associated TXE flag.
If there is more than one buffer scheduled for transmission when the CAN bus becomes
available for arbitration, the MSCAN uses the local priority setting to choose the buffer with
the highest priority and sends it out. The buffer having the smallest priority field has the
 
Search WWH ::




Custom Search