4 direct access to serial pins, Direct access to serial pins – FUJITSU F2MCTM-16LX User Manual
Page 448
432
CHAPTER 20 LIN-UART
20.7.4
Direct Access to Serial Pins
LIN-UART allows the user to directly access to the transmission pin (SOTn) or the
reception pin (SINn).
■
LIN-UART Direct Pin Access
The LIN-UART provides the ability for the software to access directly to serial input or output pin. The
software can always monitor the incoming serial input pin (SINn) by reading the SIOP bit of the ESCR. If
direct write to the serial output pin (SOTn) is allowed (ESCR: SOPE = 1) when the serial output is enabled
(SMR: SOE = 1) after "0" or "1" is written to the SIOP bit of the ESCR register, the SOTn value can be set
arbitrarily.
In LIN mode, this function can be used for reading back the own transmission and is used for error
handling if something is physically wrong with the single-wire LIN-bus.
Notes:
•
Direct access is enabled only when the transmission is not ongoing (transmission shift register is
empty).
•
Write a value to the SIOP bit of ESCR register before enabling the transmission (SMR: SOE = 1). This
prevents the signal of the unexpected level from being outputted because the SIOP bit retains the
previous value.
•
During a Read-Modify-Write instruction the SIOP bit returns the actual value of the SOTn pin in the
read cycle instead of the value of SINn during a normal read instruction.