Hi,
I use EasyDMA with UART.
I'm in permanent reception and the received octects go directly into a memory buffer.
When the buffer is full, the writing starts again at the beginning.
static uint8_t rxUarteBuffer[200]={0}; NRF_UARTE0->SHORTS = (UARTE_SHORTS_ENDRX_STARTRX_Enabled << UARTE_SHORTS_ENDRX_STARTRX_Pos); NRF_UARTE0->RXD.PTR = (uint32_t)((uint8_t *) rxUarteBuffer); NRF_UARTE0->RXD.MAXCNT = sizeof(rxUarteBuffer); NRF_UARTE0->TASKS_STARTRX = 1;
NRF_UARTE0->RXD.AMOUNT is useless because there is no real end of transaction.
Nevertheless there must be a way to know where the next byte will be stored ?
How can I know where the pointer is in my buffer? I don't want to count the number of bytes received per interrupt (EVENTS_RXDRDY)
Someone can help me ?
Thanks in advance.
Best regards