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

(5) Recovery from bus-off state<br />

When the CAN module is in the bus-off state, the CAN module permanently sets its output signals (CTxD) to<br />

recessive level.<br />

The CAN module recovers from the bus-off state in the following bus-off recovery sequence.<br />

A request to enter the CAN initialization mode<br />

A request to enter a CAN operation mode<br />

(a) Recovery operation through normal recovery sequence<br />

(b) Forced recovery operation that skips recovery sequence<br />

(a) Recovery operation from bus-off state through normal recovery sequence<br />

The CAN module first issues a request to enter the initialization mode (refer to timing in Figure 14-17).<br />

This request will be immediately acknowledged, and the OPMODE bits of the C0CTRL, C1CTRL register are<br />

cleared to 000B. Processing such as analyzing the fault that has caused the bus-off state, re-defining the<br />

CAN module and message buffer using application software, or stopping the operation of the CAN module<br />

can be performed by clearing the GOM bit to 0.<br />

Next, the user requests to change the mode from the initialization mode to an operation mode (refer to timing<br />

in Figure 14-17). This starts an operation to recover the CAN module from the bus-off state. The<br />

conditions under which the module can recover from the bus-off state are defined by the CAN protocol ISO<br />

11898, and it is necessary to detect 11 consecutive recessive-level bits 128 times. At this time, the request to<br />

change the mode to an operation mode is held pending until the recovery conditions are satisfied. When the<br />

recovery conditions are satisfied (refer to timing in Figure 14-17), the CAN module can enter the<br />

operation mode it has requested. Until the CAN module enters this operation mode, it stays in the<br />

initialization mode. Completion to be requested operation mode can be confirmed by reading the OPMODE<br />

bits of the C0CTRL, C1CTRL register.<br />

During the bus-off period and bus-off recovery sequence, the BOFF bit of the C0INFO, C1INFO register stays<br />

set (to 1). In the bus-off recovery sequence, the reception error counter (REC[6:0]) counts the number of<br />

times 11 consecutive recessive-level bits have been detected on the bus. Therefore, the recovery state can<br />

be checked by reading REC[6:0].<br />

Cautions 1. If the Bus-off Recovery Sequence is interrupted by entering Initialization Mode and re-entering<br />

any Operation Mode, the Bus-off Recovery Sequence will restart from the beginning, and the<br />

waiting phase will be again 128 times 11 recessive-level bits, counted from this point.<br />

2. In the bus-off recovery sequence, REC [6:0] counts up (+1) each time 11 consecutive<br />

recessive-level bits have been detected. Even during the bus-off period, the CAN<br />

module can enter the CAN sleep mode or CAN stop mode. To start the bus-off recovery<br />

sequence, it is necessary to transit to the initialization mode once.<br />

However, when the CAN module is in either CAN sleep mode or CAN stop mode,<br />

transition request to the initialization mode is not accepted, thus you have to release<br />

the CAN sleep mode first. In this case, as soon as the CAN sleep mode is released, the<br />

bus-off recovery sequence starts and no transition to initialization mode is necessary.<br />

If the CAN module detects a dominant edge on the CAN bus while in sleep mode even<br />

during bus-off, the sleep mode will be left and the bus-off recovery sequence will start<br />

(In the state that the CAN clock is supplied, it is necessary to clear the PSMODE by<br />

software after dominant edge detection).<br />

R01UH0317EJ0004 Rev. 0.04 802<br />

Feb. 22, 2013

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

Saved successfully!

Ooh no, something went wrong!