750
SAM4CP [DATASHEET]
43051E–ATPL–08/14
Figure 36-13. 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
resynchronizes on the next valid edge.The minimum time threshold to estimate the bit value is three quarters 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 36-14
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 the US_CSR is raised. It is cleared by writing a 1 to
the RSTSTA in the US_CR. See
Figure 36-15
for an example of Manchester error detection during data phase.
Figure 36-14. Preamble Pattern Mismatch
Figure 36-15. Manchester Error Flag
When the start frame delimiter is a sync pattern (ONEBIT field to 0), both command and data delimiter are supported. If a
valid sync is detected, the received character is written as RXCHR field in the US_RHR and the RXSYNH is updated.
RXCHR is set to 1 when the received character is a command, and it is set to 0 if the received character is a data. This
mechanism alleviates and simplifies the direct memory access as the character contains its own sync field in the same
register.
As the decoder is setup to be used in unipolar mode, the first bit of the frame has to be a zero-to-one transition.
Manchester
encoded
data
Txd
1
2
3
4
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
Manchester
encoded
data
Txd
SFD
Preamble Length
is set to 4
Elementary character bit time
Manchester
Coding Error
detected
sampling points
Preamble subpacket
and Start Frame Delimiter
were successfully
decoded
Entering USART character area