760
SAM4CP [DATASHEET]
43051E–ATPL–08/14
Figure 36-30. T = 0 Protocol without Parity Error
Figure 36-31. T = 0 Protocol with Parity Error
Baud Rate
Clock
Receive Error Counter
The USART receiver also records the total number of errors. This can be read in the Number of Error (US_NER) register.
The NB_ERRORS field can record up to 255 errors. Reading US_NER automatically clears the NB_ERRORS field.
Receive NACK Inhibit
The USART can also be configured to inhibit an error. This can be achieved by setting the INACK bit in US_MR. If INACK
is to 1, no error signal is driven on the I/O line even if a parity bit is detected.
Moreover, if INACK is set, the erroneous received character is stored in the Receive Holding Register, as if no error
occurred and the RXRDY bit does rise.
Transmit Character Repetition
When the USART is transmitting a character and gets a NACK, it can automatically repeat the character before moving
on to the next one. Repetition is enabled by writing the MAX_ITERATION field in the US_MR at a value higher than 0.
Each character can be transmitted up to eight times; the first transmission plus seven repetitions.
If MAX_ITERATION does not equal zero, the USART repeats the character as many times as the value loaded in
MAX_ITERATION.
When the USART repetition number reaches MAX_ITERATION and the last repeated character is not acknowledge, the
ITER bit is set in the US_CSR. If the repetition of the character is acknowledged by the receiver, the repetitions are
stopped and the iteration counter is cleared.
The ITER bit in US_CSR can be cleared by writing a 1 to the RSTIT bit in the US_CR.
Disable Successive Receive NACK
The receiver can limit the number of successive NACKs sent back to the remote transmitter. This is programmed by
setting the bit DSNACK in the US_MR. The maximum number of NACKs transmitted is programmed in the
MAX_ITERATION field. As soon as MAX_ITERATION is reached,no error signal is driven on the I/O line and the ITER
bit in the US_CSR is set.
36.6.4.3 Protocol T = 1
When operating in ISO7816 protocol T = 1, the transmission is similar to an asynchronous format with only one stop bit.
The parity is generated when transmitting and checked when receiving. Parity error detection sets the PARE bit in the
US_CSR.
D0
D1
D2
D3
D4
D5
D6
D7
RXD
Parity
Bit
Baud Rate
Clock
Start
Bit
Guard
Time 1
Next
Start
Bit
Guard
Time 2
D0
D1
D2
D3
D4
D5
D6
D7
I/O
Parity
Bit
Start
Bit
Guard
Time 1
Start
Bit
Guard
Time 2
D0
D1
Error
Repetition