nRF52840 UARTE RX DMA pointer

Hi

Is there a possibility to read out the actual RX pointer of the DMA if the amount of chars is not reached?

Start Stop the RX is not really an option and I have no free Timer for PPI function...

https://devzone.nordicsemi.com/f/nordic-q-a/33813/nrf58232-uarte-rx-easydma-pointer

There should be a possibility to read the actual pointer value.

nrf_uarte_rx_amount_get(ext_uart.p_reg); this is returning 0 even if I received some characters. the return value is 10 if I the UARTE received 10+ chars, this is useless!

nrfx_uarte_rx(&ext_uart, ext_uart_rx_dma_buffer, 10);

Regards, Dominik

  • Most customer that have this requirement will use the Libuarte - advanced UARTE driver library, which uses a TIMER in count mode to count the received bytes using PPI and the RXDRDY event. This is the only proven and stable solution we provide for this topic.

    Dominik Eugster said:
    Should it not be enabled?

    Yes, sorry. I forgot to change it. Like I said, the code is not tested, so it there may be other small changes needed.

  • Most customer that have this requirement will use the Libuarte - advanced UARTE driver library, which uses a TIMER in count mode to count the received bytes using PPI and the RXDRDY event. This is the only proven and stable solution we provide for this topic.

    Unfortunately I have no Timer left to count the bytes and don't like to spend one just to count bytes even if I have one, I think this should be implemented in the UART logic from Nordic, I never saw that a Timer is needed to count the received bytes in DMA mode, i.e. STM32 has direct access to the counter on the fly (but also about 20 timers), but maybe there are some good reasons to use the correct logic on the nRF Chips, I will find a workaround. And of course, the focus of the nRF is on BLE which is not included on a STM32 for sure.

    Thanks for your reply, I will try and post the result, because I think a lot of users will have the same topic on UART RX with DMA.

  • I agree that it would be a nice feature to have to read out the number of received bytes from the peripheral directly, but unfortunately, this is not possible with the current implementation in the nRF52 chips.

    If you find and post a working solution, I'm sure it would be useful for some other users!

Related