Thanks for reading my question.
I use SDK14 , PCA10040, S132 and modified a little bit of uarte driver, but that should not affect what I said below.
I set the DMA buffer to 10 bytes, did not use the double buffer, and then sent to the UARTE 3 bytes, 10ms timer interrupt generated when the trigger TASK_STOPRX.
Followed by the END RX interrupt, I read the amount = 3, RXTO interrupt, I also read the amount = 3, and then in the RXTO interrupt, the PTR will be given a new buffer, MAXCNT = 10, and then trigger TASK_FLUSHRX, Followed by the END RX interrupt, I read the amount even equal to 3? And the new buffer has not been changed, that is, before the implementation of FLUSHRX, RX FIFO should be empty, and the last END RX interrupt, since the FIFO certainly no cache, should not return amount = 0?
1、According to my understanding, I should have been notify DMA buffer has overflowed, and then I go to use TASK_FLUSHRX instructions, but I really want to see a similar interrupt or event? Did i miss something?
2、But when I send 12 bytes to the UARTE instead of 3 bytes, the final END RX can be successfully returned amount = 2, that is, FLUSH function normal work.If the DMA buffer does not overflow, the implementation of FLUSHRX will be a problem?What is the way I know if the current DMA buffer overflow?