Product Specs

Table Of Contents
35 UARTE Universal asynchronous receiver/
transmitter with EasyDMA
Page
335
The RX buffer is located at the address specified in the RXD.PTR register. The RXD.PTR register is double-
buffered and it can be updated and prepared for the next STARTRX task immediately after the RXSTARTED
event is generated. The size of the RX buffer is specified in the RXD.MAXCNT register and the UARTE will
generate an ENDRX event when it has filled up the RX buffer, see Figure 95: UARTE reception on page
335.
For each byte received over the RXD line, an RXDRDY event will be generated. This event is likely to occur
before the corresponding data has been transferred to Data RAM.
The RXD.AMOUNT register can be queried following an ENDRX event to see how many new bytes have
been transferred to the RX buffer in RAM since the previous ENDRX event.
Data RAM
0x20000000
1
0x20000001
2
0x20000002
3
4
0x20000003
0x20000004
5
0x20000010
6
7
0x20000011
0x20000012
8
9
0x20000013
0x20000014
0x20000020
0x20000021
0x20000022
0x20000023
0x20000024
1 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6
7 8 9 10 11
12
Figure 95: UARTE reception
The UARTE receiver is stopped by triggering the STOPRX task. An RXTO event is generated when the
UARTE has stopped. The UARTE will make sure that an impending ENDRX event will be generated before
the RXTO event is generated. This means that the UARTE will guarantee that no ENDRX event will be
generated after RXTO, unless the UARTE is restarted or a FLUSHRX command is issued after the RXTO
event is generated.
Important: If the ENDRX event has not already been generated when the UARTE receiver has
come to a stop, which implies that all pending content in the RX FIFO has been moved to the RX
buffer, the UARTE will generate the ENDRX event explicitly even though the RX buffer is not full. In
this scenario the ENDRX event will be generated before the RXTO event is generated.
To be able to know how many bytes have actually been received into the RX buffer, the CPU can read the
RXD.AMOUNT register following the ENDRX event or the RXTO event.
The UARTE is able to receive up to four bytes after the STOPRX task has been triggered as long as these
are sent in succession immediately after the RTS signal is deactivated. This is possible because after the
RTS is deactivated the UARTE is able to receive bytes for an extended period equal to the time it takes to
send 4 bytes on the configured baud rate.
After the RXTO event is generated the internal RX FIFO may still contain data, and to move this data to RAM
the FLUSHRX task must be triggered. To make sure that this data does not overwrite data in the RX buffer,
the RX buffer should be emptied or the RXD.PTR should be updated before the FLUSHRX task is triggered.
1
2
3
4
-
-
-
12
11
10
Lifeline
EasyDMA
RXD
ENDR X_STARTRX = 1
RXD.PTR = 0x20000000
RXD.MAXCNT = 5
STARTRX
RXD.PTR = 0x20000010
RXSTARTED
RXDRDY
RXDRDY
RXDRDY
RXDRDY
RXDRDY
ENDR X
RXDRDY
STARTRX
RXD.PTR = 0x20000020
RXSTARTED
RXDRDY
RXDRDY
RXDRDY
RXDRDY
ENDR X
RXDRDY
RXSTARTED
RXDRDY
STARTRX
RXD.PTR = 0x20000030