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 />

Figure 14-72. Transmission via Software Polling<br />

No<br />

Data frame<br />

Set C0MDATAxm register<br />

Set C0MDLCm register<br />

Clear RTR bit of C0MCONFm<br />

register.<br />

Set C0MIDLm and C0MIDHm<br />

registers<br />

START<br />

CINTS0 = 1?<br />

Clear CINTS0 bit<br />

Read C0TGPT register<br />

TOVF = 1?<br />

Yes<br />

Clear TOVF bit<br />

Clear RDY bit<br />

RDY = 0?<br />

Yes<br />

Data frame or<br />

remote frame?<br />

Set RDY bit<br />

Set TRQ bit<br />

THPM = 1?<br />

Yes<br />

END<br />

Remote frame<br />

Set C0MDLCm register<br />

Set RTR bit of C0MCONFm<br />

Set C0MIDLm and C0MIDHm<br />

registers<br />

Cautions 1. The TRQ bit should be set after the RDY bit is set.<br />

2. The RDY bit and TRQ bit should not be set at the same time.<br />

Yes<br />

Remarks 1. Also check the MBON flag at the beginning and at the end of the polling routine, in order to check<br />

the access to the message buffers as well as TX history list registers, in case a pending sleep<br />

mode had been executed. If MBON is detected to be cleared at any check, the actions and<br />

results of the processing have to be discarded and processed again, after MBON is set again.<br />

2. If TOVF was set once, the transmit history list is inconsistent. Consider to scan all configured<br />

transmit buffers for completed transmissions.<br />

R01UH0317EJ0004 Rev. 0.04 928<br />

Feb. 22, 2013<br />

No<br />

No<br />

No

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

Saved successfully!

Ooh no, something went wrong!