
CHAPTER 19 CAN CONTROLLER
Preliminary User’s Manual U16541EJ1V0UM
680
19.10.3 Automatic block transmission (ABT)
The automatic block transmission (ABT) function can transfer data frames successively with no CPU interaction.
The maximum number of transmit message buffers assigned to the ABT function is 8 (message buffer numbers 0 to
7). The ABT function is selected by setting the OPMODE[2:0] bit string.
For the ABT function, the message buffers must be initialized before a transmission request by the CPU is
submitted in the ABT mode. For all message buffers used for ABT, the CAN module assignment (MAx) has to be set
and the MT[2:0] bits have to be set to 000B. If several data blocks are sent in separate messages but with the same
identifier, all message buffers in the ABT area have to be set with the same identifier. If two or more data frames with
different identifiers are sent, the identifier needs to be set by the C0MIDLm/C0MIDHm register. The C0MDLCm
register and the C0MDATA0m to C0MDATA7m registers have to be set before a transmission request for the ABT
function is submitted. After initialization of a message buffer for ABT is finished, the RDY bit needs to be set (1). In
the ABT mode, the TRQ bit does not have to be manipulated by software.
After all the data for the message buffer in the ABT area has been prepared, the ABTTRG bit can be set (1). Then
the automatic block transmission of the message buffer with RDY = 1 is started. The ABT function sets TRQ of the
first message buffer (message buffer 0) automatically, and the transmission of a message is started.
After the
transmission of message buffer 0 has finished, TRQ of message buffer 1 is set (1) automatically, and the message is
transmitted.
However the ABT function enables delaying the setting of the next TRQ automatically by a
programmable period. This delay is defined by the C0GMABTD register. The unit of the LSB of that register is the
DBT (data bit time). The DBT depends on the setting in the C0BRP register and the C0BTR register.
When the ABT function encounters a message buffer with RDY = 0, the ABTTRG bit is cleared (0) and the ABT
operation is finished. In this situation, the RDY bit of the buffer where the ABT mode stopped can be set and the
ABTTRG bit can be set (1) again. Then the ABT function will continue the ABT mode from the message buffer at
which it stopped previously. If it is not necessary to continue the ABT mode at the buffer where the ABT mode
previously stopped, clear (0) the ABTTRG bit via the ABTCLR bit. The internal ABT engine is reset by when the
ABTCLR bit is set (1). If ABTTRG is set (1) again now, the transmission is started from message buffer 0.
The transmission of data frames from all the message buffers in the ABT area can be controlled by using the
transmission complete interrupt. The IE bit of the C0MCTRLm register of each message buffer in use except the last
message buffer needs to be cleared (0). In this case, the application will get a transmission complete interrupt when
all messages in the ABT area have been sent.
Normally, the transmission of message buffers except those used by the ABT function (message buffer 8 to nmax) is
defined by the priority of the identifier. In this case the sequence of transmitted messages is evaluated between the
identifier of the message buffer in the ABT area waiting for transmission and all other identifiers not belonging to the
ABT area.
When the ABT function is activated, the transmission of data frames from message buffers in the ABT area is not
recorded in the transmission history list (THL).
19.10.4 Transmission request abort process
(1) Transmission request abort in normal operation mode
The user can clear the TRQ bit in the C0MCTRLm register to abort a transmit request. The TRQ bit will be
cleared immediately if the abort was successful. Whether the message was really transmitted or not can be
checked using the TSTAT bit in the C0CTRL register or the THL.
(2) Transmission request abort in normal operation mode with automatic block transmission (ABT)
It can become necessary to abort an already started automatic block transmission (ABT). In this case, the
user has to clear the ABTTRG bit in the CGMABT register (0).
If the last transmission was successful, the ABT mode is left with the internal ABT pointer pointing to the next
message buffer to be transmitted.