04.03.2013 Views

RL78/D1A User's Manual: Hardware - Renesas

RL78/D1A User's Manual: Hardware - Renesas

RL78/D1A User's Manual: Hardware - Renesas

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Under development<br />

Preliminary document<br />

Specifications in this document are tentative and subject to change.<br />

<strong>RL78</strong>/<strong>D1A</strong> CHAPTER 14 CAN CONTROLLER<br />

14.10.3 Automatic block transmission (ABT)<br />

The automatic block transmission (ABT) function is used to transmit two or more data frames successively with no CPU<br />

interaction. The maximum number of transmit message buffers assigned to the ABT function is eight (message buffer<br />

numbers 0 to 7).<br />

By setting OPMODE [2:0] bits of the C0CTRL register to 010B, "normal operation mode with automatic block<br />

transmission function" (hereafter referred to as ABT mode) can be selected.<br />

To issue an ABT transmission request, define the message buffers by software first. Set the MA0 bit (1) in all the<br />

message buffers used for ABT, and define all the buffers as transmit message buffers by setting MT [2:0] bits to 000B. Be<br />

sure to set the ID for each message buffer for ABT even when the same ID is being used for all the message buffers. To<br />

use two or more IDs, set the ID of each message buffer by using the C0MIDLm and C0MIDHm registers. Set the<br />

C0MDLCm and C0MDATA0m to C0MDATA7m registers before issuing a transmission request for the ABT function.<br />

After initialization of message buffers for ABT is finished, the RDY bit needs to be set (1). In the ABT mode, the TRQ<br />

bit does not have to be manipulated by software.<br />

After the data for the ABT message buffers has been prepared, set the ABTTRG bit to 1. Automatic block transmission<br />

is then started. When ABT is started, the TRQ bit in the first message buffer (message buffer 0) is automatically set to 1.<br />

After transmission of the data of message buffer 0 has finished, TRQ bit of the next message buffer, message buffer 1, is<br />

set automatically. In this way, transmission is executed successively.<br />

A delay time can be inserted by program in the interval in which the transmission request (TRQ) is automatically set<br />

while successive transmission is being executed. The delay time to be inserted is defined by the C0GMABTD register.<br />

The unit of the delay time is DBT (data bit time). DBT depends on the setting of the C0BRP and C0BTR registers.<br />

Among transmit objects within the ABT-area, the priority of the transmission ID is not evaluated. The data of message<br />

buffers 0 to 7 are sequentially transmitted. When transmission of the data frame from message buffer 7 has been<br />

completed, the ABTTRG bit is automatically cleared to 0 and the ABT operation is finished.<br />

If the RDY bit of an ABT message buffer is cleared during ABT, no data frame is transmitted from that buffer, ABT is<br />

stopped, and the ABTTRG bit is cleared. After that, transmission can be resumed from the message buffer where ABT<br />

stopped, by setting the RDY and ABTTRG bits to 1 by software. To not resume transmission from the message buffer<br />

where ABT stopped, the internal ABT engine can be reset by setting the ABTCLR bit to 1 while ABT mode is stopped and<br />

ABTTRG bit is cleared to 0. In this case, transmission is started from message buffer 0 if the ABTCLR bit is cleared to 0<br />

and then the ABTTRG bit is set to 1.<br />

An interrupt can be used to check if data frames have been transmitted from all the message buffers for ABT. To do so,<br />

the IE bit of the C0MCTRLm register of each message buffer except the last message buffer needs to be cleared (0).<br />

If a transmit message buffer other than those used by the ABT function (message buffer 8 to 15) is assigned to a<br />

transmit message buffer, the message to be transmitted next is determined by the priority of the transmission ID of the<br />

ABT message buffer whose transmission is currently held pending and the transmission ID of the message buffers other<br />

than those used by the ABT function.<br />

Transmission of a data frame from an ABT message buffer is not recorded in the transmit history list (THL).<br />

R01UH0317EJ0004 Rev. 0.04 897<br />

Feb. 22, 2013

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!