This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UART receive in background without callback on nRF52 SDK11

Hi, I'm looking for an easy way to use the UART in blocking mode (or something similiar) with a receive buffer that is filled in background:

  • If possible using EasyDMA for better performance and easier software design
  • TX data may either block until all data has been sent or may return immediately and provide an additional function call to check if all data has been sent successfully.
  • RX data shall received in background and stored in a buffer/FIFO. It shall be possible to read data of arbitrary size from the receive buffer without stopping reception.
  • No callbacks or event handlers shall be used (synchroneous control flow in application).

In the past, on the nRF51, we used the app_uart library with FIFO support. Looking at the SDK11 documentation on infocenter.nordicsemi.com, I couldn't find any information about this library (although the directory is still there in the SDK11 archive). Is app_fifo still working on SDK11 on nRF52? Does it take advantage of the EasyDMA feature?

Looking at nrf_drv_uart.h, double buffering is mentioned to provide support for continuous data reception in non-bocking mode. But what does happen if the last received data byte does not fill the buffer to 100%? Will the driver wait for more bytes until the buffer is full, not giving any opportunity to receive data from the partially filled buffer? In other words, is there any possibility to receive "byte streams" of arbitrary length using UART with EasyDMA (something like app_uart with FIFO feature using EasyDMA)?

Parents
  • @bat13: Oh, that's bad news :( But I can't imagine that the Nordic folks would create a device that is not capable of receiving arbitrary data... maybe the product specification is not complete yet. I also had a look at the UARTE documentation and I think some parts are still missing. Hopefully, some Nordic employees will give some feedback soon...

    I have looked a bit into the UARTE specification, I'm posting my current assumptions in a separate reply to this thread, hopefully it will be recognized by some Nordic employees ;)

Reply
  • @bat13: Oh, that's bad news :( But I can't imagine that the Nordic folks would create a device that is not capable of receiving arbitrary data... maybe the product specification is not complete yet. I also had a look at the UARTE documentation and I think some parts are still missing. Hopefully, some Nordic employees will give some feedback soon...

    I have looked a bit into the UARTE specification, I'm posting my current assumptions in a separate reply to this thread, hopefully it will be recognized by some Nordic employees ;)

Children
No Data
Related