
R8C/36T-A Group
22. Hardware LIN
Under development Preliminary document
Specifications in this document are tentative and subject to change.
R01UH0240EJ0010 Rev.0.10
Page 529 of 728
Aug 05, 2011
Figure 22.6
Header Field Reception Flowchart Example (1) (i = 0 or 1, x = 1 or 2)
Timer RJ Assign the TRJIO_0 pin to the corresponding port
Setting of bits TRJIO_0SEL0 to TRJIO_0SEL2 in the TRJ_0SR register
UART0
Assign the RXD_i pin to the corresponding port
Setting of the RXD_0SEL bit in the U_0SR register
or bits RXD_1SEL0 and RXD_1SEL1 in the U_1SR register
INTx
Assign the INTx pin to the corresponding port
Setting of the INTSR0 register
Set the hardware LIN
function to be selected
(the TIOSEL bit in the
TRJIOC register to 1).
If the wakeup function
is not necessary, the
setting of the INTx pin
can be omitted.
(1, 2)
Timer RJ
Set to pulse width measurement mode
Bits TMOD2 to TMOD0 in TRJMR register
011b
Timer RJ
Set the pulse width measurement level to low
TEDGSEL bit in TRJIOC register
0
(1, 2)
Timer RJ
Set the Synch Break width
TRJ register
Hardware LIN
Set to slave mode
MST bit in LINCT register
0
Hardware LIN
Set the LIN operation to start
LINE bit in LINCT register
1
Hardware LIN
Set the RXD input unmasking timing
(After Synch Break detection or after Synch Field measurement)
SBE bit in LINCT register
Set the count source and
TRJ register as appropriate
for the Synch Break period.
Select the timing at which to
unmask the RXD input for
UART0.
If the RXD input is selected
to be unmasked after Synch
Break detection, the Synch
Field signal is also input to
UART.
Hardware LIN
Set the LIN operation to stop
LINE bit in LINCT register
0
(1)
Timer RJ
Set the count source (f1, f2, f8, or fOCO)
Bits TCK0 to TCK2 in TRJMR register
(1)
Hardware LIN
Set interrupts to enabled
(Bus collision detection, Synch Break detection, Synch Field measurement)
Bits BCIE, SBIE, and SFIE in LINCT register
(1)
Notes:
1. When the previous communication completes normally and header field reception is
performed again with the same settings, these settings can be omitted.
2. Although the timer-associated registers (TRJMR and TRJIOC) are set before the TRJ_0SR
register is set, there is no problem with this flow for the hardware LIN.
A