DocID13284 Rev 2 281/564
UM0404 High-speed synchronous serial interface
SSCBR (F0B4h / 5Ah) ESFR Reset Value: 0000h
12.4 Error detection mechanisms
The SSC is able to detect four different error conditions. Receive Error and Phase Error are
detected in all modes, while Transmit Error and Baud rate Error only apply to slave mode.
When an error is detected, the respective error flag is set. When the corresponding Error
Enable bit is set, also an error interrupt request will be generated by setting SSCEIR (see
Figure 116). The error interrupt handler may then check the error flags to determine the
cause of the error interrupt. The error flags are not reset automatically (like SSCEIR), but
rather must be cleared by software after servicing. This allows servicing of some error
conditions via interrupt, while the others may be polled by software.
Note: The error interrupt handler must clear the associated (enabled) error flag(s) to prevent
repeated interrupt requests.
A Receive Error (Master or Slave mode) is detected, when a new data frame is completely
received, but the previous data was not read out of the receive buffer register SSCRB. This
condition sets the error flag SSCRE and, when enabled via SSCREN, the error interrupt
request flag SSCEIR. The old data in the receive buffer SSCRB will be overwritten with the
new value and is irretrievably lost.
A Phase Error (Master or Slave mode) is detected, when the incoming data at pin MRST
(master mode) or MTSR (slave mode), sampled with the same frequency as the CPU clock,
changes between one sample before and two samples after the latching edge of the clock
signal (see “Clock Control”). This condition sets the error flag SSCPE and, when enabled
via SSCPEN, the error interrupt request flag SSCEIR.
A Baud Rate Error (Slave mode) is detected, when the incoming clock signal deviates from
the programmed Baud rate by more than 100%, it either is more than double or less than
half the expected Baud rate. This condition sets the error flag SSCBE and, when enabled
via SSCBEN, the error interrupt request flag SSCEIR. Using this error detection capability
requires that the slave's Baud rate generator is programmed to the same Baud rate as the
master device.
This feature detects false additional, or missing pulses on the clock line (within a certain
frame).
Note: If this error condition occurs and bit SSCAREN = ‘1’, an automatic reset of the SSC will be
performed in case of this error. This is done to re-initialize the SSC, if too few or too many
clock pulses have been detected.
A Transmit Error (Slave mode) is detected, when a transfer was initiated by the master
(shift clock gets active), but the transmit buffer SSCTB of the slave was not updated since
the last transfer. This condition sets the error flag SSCTE and, when enabled via SSCTEN,
the error interrupt request flag SSCEIR. If a transfer starts while the transmit buffer is not
updated, the slave will shift out the 'old' contents of the shift register, which normally is the
data received during the last transfer.
This may lead to the corruption of the data on the transmit/receive line in half-duplex mode
(open drain configuration), if this slave is not selected for transmission. This mode requires
1514131211109876543210
Baud Rate
RW