561
SAM9G45 [DATASHEET]
6438K–ATARM–12-Feb-13
RX_MPOL field in US_MAN register. Depending on the desired application the preamble pattern matching is to be
defined via the RX_PP field in US_MAN. See
Figure 33-9 for available preamble patterns.
Unlike preamble, the start frame delimiter is shared between Manchester Encoder and Decoder. So, if ONEBIT
field is set to 1, only a zero encoded Manchester can be detected as a valid start frame delimiter. If ONEBIT is set
to 0, only a sync pattern is detected as a valid start frame delimiter. Decoder operates by detecting transition on
incoming stream. If RXD is sampled during one quarter of a bit time at zero, a start bit is detected. See
Figure 33-14. The sample pulse rejection mechanism applies.
Figure 33-14. Asynchronous Start Bit Detection
The receiver is activated and starts Preamble and Frame Delimiter detection, sampling the data at one quarter and
then three quarters. If a valid preamble pattern or start frame delimiter is detected, the receiver continues decoding
with the same synchronization. If the stream does not match a valid pattern or a valid start frame delimiter, the
receiver re-synchronizes on the next valid edge.The minimum time threshold to estimate the bit value is three quar-
ters of a bit time.
If a valid preamble (if used) followed with a valid start frame delimiter is detected, the incoming stream is decoded
into NRZ data and passed to USART for processing.
Figure 33-15 illustrates Manchester pattern mismatch. When
incoming data stream is passed to the USART, the receiver is also able to detect Manchester code violation. A
code violation is a lack of transition in the middle of a bit cell. In this case, MANE flag in US_CSR register is raised.
It is cleared by writing the Control Register (US_CR) with the RSTSTA bit at 1. See
Figure 33-16 for an example of
Manchester error detection during data phase.
Figure 33-15. Preamble Pattern Mismatch
Manchester
encoded
data
Txd
1234
Sampling
Clock
(16 x)
Start
Detection
Manchester
encoded
data
Txd
SFD
DATA
Preamble Length is set to 8
Preamble Mismatch
invalid pattern
Preamble Mismatch
Manchester coding error