English
Language : 

K60P100M100SF2RM Datasheet, PDF (1562/1809 Pages) Freescale Semiconductor, Inc – K60 Sub-Family Reference Manual
Application information
In most applications since the total amount of lost data is known, the application will
desire to return the system to a known state. Prior to the S1[OR] flag being cleared all
received data will be dropped. To do this the software would:
1. Remove data from the receive data buffer. This could be done by reading data from
the data buffer and processing it if the data in the FIFO was still valuable when
though the overrun event occurred or using the CFIFO[RXFLUSH] bit to clear the
buffer.
2. Clear the S1[OR] flag. Note that if data was cleared using the CFIFO[RXFLUSH]
bit, then clearing the S1[OR] flag will result in the SFIFO[RXUF] flag asserting
because the only way to clear the S1[OR] requires reading additional information
from the FIFO. Care should be taken to disable the SFIFO[RXUF] interrupt prior to
clearing the OR flag and then clearing the SFIFO[RXUF] flag after the OR flag has
been cleared.
Note that in some applications if an overrun event is responded to fast enough, the lost
data can be recovered. For example when C7816[ISO_7816E] is asserted,
C7816[TTYPE]=1 and C7816[ONACK] = 1 the application may reasonably be able to
determine if the lost data will be resent by the device. In this scenario flushing the
receiver data buffer might not be required. Rather, if the S1[OR] flag is cleared the lost
data may be resent and hence recoverable.
When LIN break detect (LBKDE) is asserted the S1[OR] flag has significantly different
behavior than in other modes. The S1[OR] bit will be set, regardless of how much space
is actually available in the data buffer, if a LIN break character has been detected and the
corresponding flag (S2[LBKDIF]) is not cleared before the first data character is received
after the S2[LBKDIF] asserted. This behavior is intended to allow software sufficient
time to read the LIN break character from the data buffer to ensure that a break character
was actually detected. The checking of the break character was used on some older
implementations and is hence supported for legacy reasons. Applications that do not
require this checking can simply clear the S2[LBKDIF] without checking the stored value
to ensure it is a break character.
51.8.5 Overrun NACK considerations
When C7816[ISO_7816E] is enabled and C7816[TTYPE] = 0 the retransmission feature
of the 7816 protocol can be used to help avoid lost data when the data buffer overflows.
Using C7816[ONACK] the module can be programmed to issue a NACK on an overflow
event. Assuming that the device (smartcard) has implemented retransmission, the lost
data will be retransmitted. While useful, there is a programming implication which may
require special consideration. The need to transmit a NACK must be determined and
1562
K60 Sub-Family Reference Manual, Rev. 6, Nov 2011
Freescale Semiconductor, Inc.