cp3ub26 National Semiconductor Corporation, cp3ub26 Datasheet - Page 117

no-image

cp3ub26

Manufacturer Part Number
cp3ub26
Description
Reprogrammable Connectivity Processor With Usb And Can Interfaces
Manufacturer
National Semiconductor Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
cp3ub26G18NEP/NOPB
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
cp3ub26G18NEPX
Manufacturer:
Texas Instruments
Quantity:
10 000
CNSTAT status section will be 0101b, as the buffer was
RX_FULL (0100b) before. After finally reading the last re-
ceived message, the CPU can reset the buffer to
RX_READY.
18.6
To transmit a CAN message, software must configure the
message buffer by changing the buffer status to
TX_NOT_ACTIVE. The buffer is configured for transmission
if the ST[3] bit of the buffer status code (CNSTAT) is set. In
TX_NOT_ACTIVE status, the buffer is ready to receive data
from the CPU. After receiving all transmission data (ID, data
bytes, DLC, and PRI), the CPU can start the transmission
by writing TX_ONCE into the buffer status register. During
the transmission, the status of the buffer is TX_BUSYx. Af-
ter successful transmission, the CAN module will reset the
buffer status to TX_NOT_ACTIVE. If the transmission pro-
cess fails, the buffer condition will remain TX_BUSYx for re-
transmission until the frame was successfully transmitted or
the CPU has canceled the transmission request.
To Send a Remote Frame (Remote Transmission Request)
to other CAN nodes, software sets the RTR bit of the mes-
sage identifier (see Storage of Remote Messages on page
126) and changes the status of the message buffer to
TX_ONCE. After this remote frame has been transmitted
successfully, this message buffer will automatically enter
the RX_READY state and is ready to receive the appropri-
ate answer. Note that the mask bits RTR/XRTR need to be
set to receive a data frame (RTR = 0) in a buffer which was
configured to transmit a remote frame (RTR = 1).
To answer Remote Frames, the CPU writes TX_RTR in the
buffer status register, which causes the buffer to wait for a
remote frame. When a remote frame passes the accep-
If the transmit process fails or the arbitration is lost, the
transmission process will be stopped and will continue after
the interrupting reception or the error signaling has finished
(see Figure 46). In that case, a new buffer select follows and
the TX process is executed again.
Note: The canceled message can be delayed by a TX re-
quest of a buffer with a higher priority. While TX_BUSY is
high, software cannot change the contents of the message
buffer object. In all cases, writing to the BUSY bit will be ig-
nored.
current buffer
next buffer
TX_BUSY
TX_BUSY
TRANSMIT STRUCTURE
BUS
IDLE
BUS
1 BIT
SOF
CPU write TX_ONCE
in buffer status
ARBITRATION FIELD
12/29 BIT
+
CONTROL
+
6 BIT
Figure 46. Data Transmission
(IF PRESENT)
DATA FIELD
n × 8 BIT
117
tance filtering mask of one or more buffers, the buffer status
will change to TX_ONCE_RTR, the contents of the buffer
will be transmitted, and afterwards the CAN module will
write TX_RTR in the status code register again.
If the CPU writes TX_ONCE_RTR into the buffer status, the
contents of the buffer will be transmitted, and the successful
transmission the buffer goes into the “wait for Remote
Frame” condition TX_RTR.
18.6.1
After writing TX_ONCE into the buffer status, the transmis-
sion process begins and the BUSY bit is set. As soon as a
buffer gets the TX_BUSY status, the buffer is no longer ac-
cessible by the CPU except for the ST[3:1] bits of the CN-
STAT register. Starting with the beginning of the CRC field
of the current frame, the CAN module looks for another buff-
er transmit request and selects the buffer with the highest
priority for the next transmission by changing the buffer
state from TX_ONCE to TX_BUSY. This transmit request
can be canceled by the CPU or can be overwritten by anoth-
er transmit request of a buffer with a higher priority as long
as the transmission of the next frame has not yet started.
This means that between the beginning of the CRC field of
the current frame and the transmission start of the next
frame, two buffers, the current buffer and the buffer sched-
uled for the next transmission, are in the BUSY status. To
cancel the transmit request of the next frame, the CPU must
change the buffer state to TX_NOT_ACTIVE. When the
transmit request has been overwritten by another request of
a higher priority buffer, the CAN module changes the buffer
state from TX_BUSY to TX_ONCE. Therefore, the transmit
request remains pending. Figure 46 further illustrates the
transmit timing.
18.6.2
The CAN module is able to generate a stream of scheduled
messages without releasing the bus between two messag-
es so that an optimized performance can be achieved. It will
arbitrate for the bus immediately after sending the previous
message and will only release the bus due to a lost arbitra-
tion.
If more than one buffer is scheduled for transmission, the
priority is built by the message buffer number and the prior-
ity code in the CNSTAT register. The 8-bit value of the prior-
Transmit Priority
Transmit Scheduling
Begin selection of next buffer
if new tx_request
16 BIT
FIELD
CRC
FIELD
2 BIT
ACK
7 BIT
EOF
www.national.com
3 BIT
IFS
DS040

Related parts for cp3ub26