beautypg.com

Lin-uart as lin slave device – FUJITSU F2MCTM-16LX User Manual

Page 456

background image

440

CHAPTER 20 LIN-UART

LIN-UART as LIN slave device

Figure 20.7-19 LIN-UART LIN Slave Flowchart

Y

N

N

Y

Y

N

Y

N

Y

N

Start

Initial setting :
Set operation mode 3
Serial data output enabled
TXE = 1, TIE = 0, RXE = 0, RIE = 1
Connection with LIN-UART and ICU

ICU data read
Baud rate regulation
Reception enabled
ICU interrupt flag clear
ICU interrupt prohibited

LBD = 1
Synch break interrupt

Identify field reception*

1

Reception prohibited
ICU interrupt enabled
Synch break interrupt
enabled

Without error?

Error processing*

2

Data Field
reception ?

Transmission data 1 set
TDR = Data 1
Transmission interrupt
enabled

ICU data read
ICU interrupt flag clear

ICU interrupt

ICU interrupt

(reception)

(transmission)

RDRF = 1
Reception interrupt

Data 1 reception*

1

Data N reception*

1

RDRF = 1
Reception interrupt

Transmission data N set
TDR = Data N
Transmission interrupt pro-
hibited

Data 1 reception*

1

Data 1 read

Data N reception*

1

Data N read
Reception prohibited

TDRE = 1
Transmission interrupt

RDRF = 1
Reception interrupt

RDRF = 1
Reception interrupt

*1: If an error occurs, perform the error processing
*2:

When fre and ore is "1", write 1 to SCR: CRE bit and clear the error flag.

When ESCR: LBD bit is "1", execute UART reset.

Note: The error is detected in each processing and take appropriate measure.

Synch Break detection clear
ECCR: LBD = 0
Synch break interrupt pro-
hibited

RDRF = 1
Reception interrupt

Sleep
mode?

Wake up
reception?

Wake up
transmission?

Reception prohibited

Wake up code transmission