Fujitsu F2MCTM-16LX Computer Hardware User Manual


 
441
CHAPTER 20 LIN-UART
20.8 Notes on Using LIN-UART
Notes on using LIN-UART are given below.
Notes on Using LIN-UART
Enabling operations
In LIN-UART, the serial control register (SCR) has TXE (transmission) and RXE (reception) operation
enable bits. Both, transmission and reception operations, must be enabled before the communication starts
because they have been disabled as the default value (initial value). The operation can also be canceled by
disabling these bits.
Communication mode setting
Set the communication mode while the system is not operating. If the mode is changed during transmission
or reception, the transmission or reception is stopped and possible data will be lost.
Transmission interrupt enabling timing
The default (initial value) of the transmission data empty flag bit (SSR: TDRE) is "1" (no transmission data
and transmission data write enable state). A transmission interrupt request is generated as soon as the
transmission interrupt request is enabled (SSR: TIE=1). Be sure to set the TIE flag to "1" after setting the
transmission data to avoid an immediate interrupt.
Changing operation settings
It is strongly recommended to reset LIN-UART after changing operation settings. Particularly if (for
example) start-/stop-bits added to or removed from the data format.
If settings in the serial mode register (SMR) are desired, it is not useful to set the UPCL bit to 1 at the same
time to reset LIN-UART. The correct operation settings are not guaranteed in this case. Thus it is
recommended to set the bits of the SMR and then to reset them again plus the UPCL bit.
Using LIN operation mode 3
The LIN features are available in mode 3 (transmitting, receiving synch break), but using mode 3 sets the
UART data format automatically to LIN format (8N1, LSB first). Note that the length of the synch break
for transmission is variable but for reception it is fixed 11-bit time.
LIN slave settings
Set the baud rate before receiving the first LIN synch break for the slave operation. This is needed to detect
the minimum of 13-bit time of a LIN synch break surely.
Software compatibility
Although this LIN-UART is similar to other LIN-UART in other microcontrollers, it is not software
compatible to them. The programming models may be the same, but the structure of the registers differ.
Furthermore, the setting of the baud rate is now determined by a reload value instead of selecting a