Datasheet

V850ES/JG3-H, V850ES/JH3-H CHAPTER 20 CAN CONTROLLER
R01UH0042EJ0500 Rev.5.00 Page 994 of 1513
Aug 12, 2011
20.10.3 Automatic block transmission (ABT)
The automatic block transmission (ABT) function is used to transmit two or more data frames successively with no CPU
interaction. The maximum number of transmit message buffers assigned to the ABT function is eight (message buffer
numbers 0 to 7).
By setting the C0CTRL.OPMODE2 to C0CTRL.OPMODE0 bits to 010B, “normal operation mode with automatic block
transmission function” (hereafter referred to as ABT mode) can be selected.
To issue an ABT transmission request, define the message buffers by software first. Set the C0MCONFm.MA0 bit (1)
in all the message buffers used for ABT, and define all the buffers as transmit message buffers by setting the
C0MCONFm.MT2 to C0MCONFm.MT0 bits to 000B. Be sure to set the ID for the message buffers for ATB for each
message buffer, even when that ID is being used for all the message buffers. To use two or more IDs, set the ID of each
message buffer by using the C0MIDLm and C0MIDHm registers. Set the C0MDLCm and C0MDATA0m to C0MDATA7m
registers before issuing a transmission request for the ABT function.
After initialization of message buffers for ABT is finished, the C0MCTRLm.RDY bit needs to be set (1). In the ABT
mode, the C0MCTRLm.TRQ bit does not have to be manipulated by software.
After the data for the ABT message buffers has been prepared, set the C0GMABT.ABTTRG bit to 1. Automatic block
transmission is then started. When ABT is started, the TRQ bit in the first message buffer (message buffer 0) is
automatically set to 1. After transmission of the data of message buffer 0 is finished, the TRQ bit of the next message
buffer, message buffer 1, is set automatically. In this way, transmission is executed successively.
A delay time can be inserted by program in the interval in which the transmission request (TRQ bit) is automatically set
while successive transmission is being executed. The delay time to be inserted is defined by the C0GMABTD register.
The unit of the delay time is DBT (data bit time). DBT depends on the setting of the C0BRP and C0BTR registers.
During ABT, the priority of the transmission ID is not searched in the ABT transmit message buffer. The data of
message buffers 0 to 7 is sequentially transmitted. When transmission of the data frame from message buffer 7 has been
completed, the ABTTRG bit is automatically cleared to 0 and the ABT operation is finished.
If the RDY bit of an ABT message buffer is cleared during ABT, no data frame is transmitted from that buffer, ABT is
stopped, and the ABTTRG bit is cleared. After that, transmission can be resumed from the message buffer where ABT
stopped, by setting the RDY and ABTTRG bits to 1 by software. To not resume transmission from the message buffer
where ABT stopped, the internal ABT engine can be reset by setting the C0GMABT.ABTCLR bit to 1 while ABT mode is
stopped and the ABTTRG bit is cleared to 0. In this case, transmission is started from message buffer 0 if the ABTCLR bit
is cleared to 0 and then the ABTTRG bit is set to 1.
An interrupt can be used to check if data frames have been transmitted from all the message buffers for ABT. To do so,
the C0MCTRLm.IE bit of each message buffer except the last message buffer needs to be cleared (0).
If a transmit message buffer other than those used by the ABT function (message buffers 8 to 31) is assigned to a
transmit message buffer, the priority of the message to be transmitted is determined by the priority of the transmission
message buffer of the ABT message buffer whose transmission is currently held pending and the transmission message
buffer of the message buffers other than those used by the ABT function.
Transmission of a data frame from an ABT message buffer is not recorded in the transmit history list (THL).