[7] UARTE: RXD.AMOUNT is not updated after RXFLUSH if FIFO is empty

nRF54LS05B Engineering A Errata

This anomaly applies to Engineering A, build code QFAA-Axx.

Symptoms

Wrong number of transferred bytes is reported.

Conditions

During the handling of the RXTO event, FLUSHRX is performed and the number of transferred bytes does not exceed MAXCNT.

Consequences

UARTE operations are unreliable.

Workaround

Apply the following workaround:

/* Setup buffer to which data can be flushed. */
UARTE->DMA.RX.PTR = buf;
UARTE->DMA.RX.MAXCNT = 5;
/* Clear READY. Needed for the workaround. */
UARTE->EVENTS_DMA.RX.READY = 0;
UARTE->EVENTS_DMA.RX.END = 0;
/* Trigger flushing. */
UARTE->TASKS_FLUSHRX = 1;
/* Wait until flushing is done. */
while (UARTE->EVENTS_DMA.RX.END == 0);
/* If READY event is set then use AMOUNT value else FIFO was empty.
If not for the PAN, AMOUNT could be read without checking READY event. */
fifo_cnt = (UARTE->EVENTS_DMA.RX.READY == 1) ? UARTE->DMA.RX.AMOUNT : 0;
This workaround clears the EVENTS_DMA.RX.READY before starting the flushing, and reads EVENTS_DMA.RX.READY after the flushing to determine if FIFO had data and DMA.RX.AMOUNT has valid data.