Fujitsu MB96300 series Hardware Manual page 528

F2mc-16fx 16-bit
Hide thumbs Also See for MB96300 series:
Table of Contents

Advertisement

CHAPTER 20 USART
20.7.3
Operation with LIN Function (Operation Mode 3)
USART can be used either as LIN-Master or LIN-Slave. For this LIN function a special
mode is provided. Setting the USART to mode 3 configures the data format to 8N1-LSB-
first format.
■ Operation in asynchronous LIN mode (operation mode 3)
USART as LIN master
In LIN master mode the master determines the baud rate of the whole sub bus, therefore slaves devices have
to synchronize to the master. Therefore the desired baud rate remains fixed in master operation after
initialization.
Writing a "1" into the LBR bit of the Extended Communication Control Register (ECCRn) generates a 13 -
16 bit time low-level on the SOT pin, which is the LIN synchronization break and the start of a LIN message.
Thereby the TDRE flag of the Serial Status Register (SSRn) goes "0" and is reset to "1" after the break, and
generates a transmission interrupt for the CPU (if TIE of SSRn is "1").
The length of the Synchronization break to be sent can be determined by the LBL1/0 bits of the ESCRn as
follows:
Table 20.7-2 LIN break length
LBL1
0
1
0
1
The Synch Field is sent as byte data of 0x55 after the LIN break. To prevent a transmission interrupt, the
0x55 can be written to the TDRn just after writing the "1" to the LBR bit, although the TDRE flag is "0".
The internal transmission shifter waits until the LIN break has finished and shifts the TDRn value out
afterwards. In this case no interrupt is generated after the LIN break and before the start bit.
USART as LIN slave
In LIN slave mode USART has to synchronize to the master's baud rate. If Reception is disabled (RXE = 0)
but LIN break Interrupt is enabled (LBIE = 1) USART will generate a receive interrupt, if a synchronization
break from the LIN master is detected, and indicates it with the LBD flag of the ESCRn. Writing "0" to this
bit clears the receive interrupt request. The LIN slave may need to calculate the baud rate from the synch
field. In this case, the time between the first falling edge to the fifth falling edge of the synch field is
measured by the input capture module. For this purpose, the input capture module is connected to the LIN-
USART with an internal signal. This internal signal changes from "0" to "1" at the first falling edge then "1"
to "0" at the fifth falling edge. Therefore the input capture module should be set to detect both rising and
falling edge. Also the input signal from the LIN-USART should be selected. The time measured by the input
520
LBL0
Length of Break
0
13 Bit times
0
14 Bit times
1
15 Bit times
1
16 Bit times
MB96300 Super Series Hardware Manual

Advertisement

Table of Contents
loading

Table of Contents