BAT32G1x9 user manual | Chapter 22 CAN control
936 / 1149
Rev.1.02
22.10.3
Automatic Block Transfer (ABT).
The Automatic Block Transfer (ABT) feature is used to successfully transmit two or more data frames
in succession without CPU interaction. The maximum number of transmit packet buffers allocated to the
ABT function is 8 (packet buffer numbers 0 to 7).
By setting the OPMODE [2:0] bit of the CnCTRL register to 010B, the "Normal Operating Mode with
Automatic Block Transfer" (referred to here as ABT mode) can be selected.
To issue an ABT transfer request, first go through a software-defined packet buffer. Set bit MA0 (1) in
all packet buffers used for ABT and define all buffers as transmission packet buffers by setting mt[2:0] bit to
000B. Make sure that the ABT has the ID set for each packet buffer, even if the same ID is used for all
packet buffers. To use two or more IDs, set the ID of each packet buffer using the CnMIDLm and
CnMIDHm registers. Before issuing a transfer request for the ABT function, set CnMDLCm and
CnMDATA0m to CnMDATA7m.
After the initialization of the packet buffer of the ABT is complete, you need to set the RDY bit to 1. In
ABT mode, the TRQ bit is not operated by software.
After preparing the data for the ABT message buffer, set the ABTTRG bit to 1. Then start the
automatic block transfer. When starting ABT, the TRQ bit in the first packet buffer (packet buffer 0) is
automatically set to 1. After the data transfer of packet buffer 0 is completed, the TRQ bit of the next packet
buffer is automatically set, and the packet buffer 1 is automatically set. In this way, the transfers are
performed sequentially.
The program can insert a delay time within the interval of the transfer request (TRQ) that is automatically
set when performing a continuous transfer. The delay time to insert is defined by the CnGMABTD register.
The unit of delay time is DBT (Data Bit Time). DbT depends on the setting of the CnBRP and CnBTR registers.
In the transfer object within the ABT region, the priority of the transport ID is not evaluated. Data from
packet buffers 0 to 7 are transmitted sequentially. When the data frame transfer from packet buffer 7 is
complete, the ABTTRG bit is automatically cleared to 0 and the ABT operation is complete.
If the RDY bits of the ABT packet buffer are cleared during ABT, no data frames are transmitted from
that buffer, ABT stops, and the ABTTRG bits are cleared. After that, the RDY and ABTTRG bits can be set
to 1 by software to resume transmission from the packet buffer stopped by ABT. In order not to resume
transmission from the packet buffer that stopped the ABT, the internal ABT engine can be reset by setting
the ABTCLR bit to 1 when the ABTRG bit is stopped and the ABTRG bit is cleared to 0. In this case, if the
ABTCLR bit is cleared to 0 and then the ABTTRG bit is set to 1, the transfer is initiated from the packet
buffer 0. .
Interrupts can be used to check whether data frames are transmitted from all packet buffers of the
ABT. To do this, it is necessary to clear that the IE bit of the CnMCTRLm register of each packet buffer
except the last one is 0.
If a transmit packet buffer other than the ABT function (packet buffer 8 to 15) is allocated to the
transmit packet buffer, the next packet to be transmitted is prioritized by the transmit ID of the transmit ABT
packet buffer that is currently in a suspended state and is the transmit ID of the packet buffer other than the
buffer used by the ABT function.
Data frames transmitted from the ABT packet buffer are not recorded in the Transmission History List
(THL).