National Semiconductor CP3BT26 User Manual page 124

Reprogrammable connectivity processor with bluetooth, usb, and can interfaces
Table of Contents

Advertisement

ity is combined by the 4-bit TXPRI value and the 4-bit buffer
number (0...14) as shown below. The lowest resulting num-
ber results in the highest transmit priority.
7
TXPRI
Table 47 shows the transmit priority configuration if the pri-
ority is TXPRI = 0 for all transmit buffers:
Table 47 Transmit Priority (TXPRI = 0)
Buffer
TXPRI
Number
0
0
0
1
:
:
:
:
0
14
Table 48 shows the transmit priority configuration if TXPRI
is different from the buffer number:
Table 48 Transmit Priority (TXPRI not 0)
Buffer
TXPRI
Number
14
0
13
1
12
2
11
3
10
4
9
5
8
6
7
7
6
8
5
9
4
10
3
11
2
12
1
13
0
14
Note: If two buffers have the same priority (PRI), the buffer
with the lower buffer number will have the higher priority.
www.national.com
4
3
BUFFER #
PRI
TX Priority
0
Highest
1
:
:
:
:
14
Lowest
PRI
TX Priority
224
Lowest
209
194
179
164
149
134
119
104
89
74
59
44
29
14
Highest
19.6.3
Transmit Procedure
The transmission of a CAN message must be executed as
follows (see also Figure 57)
1. Configure
the
0
TX_NOT_ACTIVE. If the status is TX_BUSY, a previ-
ous transmit request is still pending and software has
no access to the data contents of the buffer. In that
case, software may choose to wait until the buffer be-
comes available again as shown. Other options are to
exit from the update routine until the buffer has been
transmitted with an interrupt generated, or the trans-
mission is aborted by an error.
2. Load buffer identifier and data registers. (For remote
frames the RTR bit of the identifier needs to be set and
loading data bytes can be omitted.)
3. Configure the CNSTAT status field to the desired value:
— TX_ONCE to trigger the transmission process of a
single frame.
— TX_ONCE_RTR to trigger the transmission of a sin-
gle data frame and then wait for a received remote
frame to trigger consecutive data frames.
— TX_RTR waits for a remote frame to trigger the trans-
mission of a data frame.
Writing TX_ONCE or TX_ONCE_RTR in the CNSTAT sta-
tus field will set the internal transmit request for the CAN
module.
If a buffer is configured as TX_RTR and a remote frame is
received, the data contents of the addressed buffer will be
transmitted automatically without further CPU activity.
Figure 57. Buffer Write Routine
124
CNSTAT
status
field
Write_buffer
Write
TX_NOT_ACTIVE
Yes
TX_BUSYx?
No
Write ID/data
Write
TX_ONCE
or
TX_ONCE_RTR
or
TX_RTR
Exit
DS041
as

Advertisement

Table of Contents
loading

Table of Contents