Dear Devzoners,
I have a question about triggering received data via UART with the nrf_libuarte_drv.
Prehistory:
We started using the libuarte async driver, but due to data losses (because of timer restarting after each receive event) we are looking another solution. I started testing the libuarte driver (no async), unfortunately there is no working example. Nordic offers only the libuarte-async example.
My problem with using libuarte (async):
I can see how the received data is written to the given dma buffer, this buffer I can set with nrf_libuarte_drv_rx_start(&m_uarte1_sync,m_readbuffer,64,false). As described somewhere in Nordic's info center, I get an NRF_LIBUARTE_DRV_EVT_RX_BUF_REQ and NRF_LIBUARTE_DRV_EVT_RX_DATA if the buffer is full.
But we have different length of messages, some are 8 bytes, some are 15 bytes long etc.
I would need to know before NRF_LIBUARTE_DRV_EVT_RX_DATA, if something was written to the dma buffer. I found that I can use MYPERIPHERAL->WRITER.AMOUNT, but there is no WIRTER in the UARTE1 instance.
I found RXD.AMOUNT within NRF_UARTE_Type, but it gives me only 0 or 64 (my buffer size).
My question:
Does anybody knows, how I can trigger changes on the dma buffer? Is there a event pointer or something else?
Best regards,
Jeff