English
Language : 

CP3BT23_14 Datasheet, PDF (141/324 Pages) Texas Instruments – CP3BT23 Reprogrammable Connectivity Processor with Bluetooth and Dual CAN Interfaces
CP3BT23
www.ti.com
SNOSCX3A – JULY 2013 – REVISED JANUARY 2014
When the BUFFLOCK function is enabled (see Figure 18-22), it is not necessary to check for new
messages received during the read process from the buffer, as this buffer is locked after the reception of
the first valid frame. A read from a locked receive buffer can be performed as shown in Figure 18-22.
Interrupt Entry Point
Read buffer (id/data/control)
Write RX_READY
Clear RX_PND
Exit
DS039
Figure 18-22. Buffer Read Routine (BUFFLOCK Enabled)
For simplicity only the applicable interrupt routine is shown:
1. Read the ID/data and object control (DLC/RTR) from the message buffer.
2. Write RX_READY into CNSTAT.
3. Clear interrupt pending bit and exit.
18.5.3 RX Buffer States
As shown in Figure 18-22, a receive procedure starts as soon as software has set the buffer from the
RX_NOT_ACTIVE state into the RX_READY state. The status section of CNSTAT register is set from
0000b to 0010b. When a message is received, the buffer will be RX_BUSYx during the copy process from
the hidden receive buffer into the message buffer. Afterwards this buffer is RX_FULL. The CPU can then
read the buffer data and either reset the buffer status to RX_READY or receive a new frame before the
CPU reads the buffer. In the second case, the buffer state will automatically change to RX_OVERRUN to
indicate that at least one message was lost. During the copy process the buffer will again be RX_BUSYx
for a short time, but in this case the CNSTAT status section will be 0101b, as the buffer was RX_FULL
(0100b) before. After finally reading the last received message, the CPU can reset the buffer to
RX_READY.
18.6 TRANSMIT STRUCTURE
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. After successful transmission, the CAN module will reset the buffer status to
TX_NOT_ACTIVE. If the transmission process fails, the buffer condition will remain TX_BUSYx for
retransmission 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 message identifier (see Section 18.10.5) 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 appropriate 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).
Copyright © 2013–2014, Texas Instruments Incorporated
Submit Documentation Feedback
Product Folder Links: CP3BT23
CAN Module 141