LIN Controller (LINFlex) RM0046
528/936 Doc ID 16912 Rev 5
Note that the LINFlex does not need to check if the next edge occurs slower than expected.
This is covered by the check for deviation error on the full synch byte.
Clock gating
The LINFlex clock can be gated from the Mode Entry module (MC_ME). In LIN mode, the
LINFlex controller acknowledges a clock gating request once the frame transmission or
reception is completed.
21.8.3 8-bit timeout counter
LIN timeout mode
Resetting the LTOM bit in the LINTCSR enables the LIN timeout mode. The LINOCR
becomes read-only, and OC1 and OC2 output compare values in the LINOCR are
automatically updated by hardware.
This configuration detects header timeout, response timeout, and frame timeout.
Depending on the LIN mode (selected by the LINCR1[MME] bit), the 8-bit timeout counter
will behave differently.
LIN timeout mode must not be enabled during LIN extended frames transmission or
reception (that is, if the data field length in the BIDR is configured with a value higher than 8
data bytes).
LIN Master mode
The LINTOCR[RTO] field can be used to tune response timeout and frame timeout values.
Header timeout value is fixed to HTO = 28-bit time.
Field OC1 checks T
Header
and T
Response
and field OC2 checks T
Frame
(see Figure 261).
When LINFlex moves from Break delimiter state to Synch Field state (see Section , LIN
status register (LINSR)):
â—Ź OC1 is updated with the value of OC
Header
(OC
Header
= CNT + 28),
â—Ź OC2 is updated with the value of OC
Frame
(OC
Frame
=CNT+28+RTOĂ—9 (frame
timeout value for an 8-byte frame),
â—Ź the TOCE bit is set.
On the start bit of the first response data byte (and if no error occurred during the header
reception), OC1 is updated with the value of OC
Response
(OC
Response
= CNT + RTO Ă— 9
(response timeout value for an 8-byte frame)).
On the first response byte is received, OC1 and OC2 are automatically updated to check
T
Response
and T
Frame
according to RTO (tolerance) and DFL.
On the checksum reception or in case of error in the header or response, the TOCE bit is
reset.
If there is no response, frame timeout value does not take into account the DFL value, and
an 8-byte response (DFL = 7) is always assumed.
LIN Slave mode
The LINTOCR[RTO] field can be used to tune response timeout and frame timeout values.
Header timeout value is fixed to HTO.