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

Asynchronously receive over UART

I would like to receive data on UART asynchronously and handle the RX event in the backend in an IRQ handler. The application is - a user will be shown a menu and asked to enter a character. It is a kind of CLI. On receiving the character response, a corresponding task will be executed in the handler based on which character was received

Can I get a suggestion on how to do this reception in the backend as part of IRQ handler as all examples are leading to explicitly calling receive function ( like nrfx_uart_rx or app_uart_get ) 

Parents Reply
  • Once I call the nrfx_uart_rx function, the Rx will happen continuously over the back-end(like a separate thread running continuously in an infinite loop) when interrupt arrives each time. It is non-blocking as I am providing event_handler(which acts like an ISR) in nrfx_uart_init.

    Am I right?

    I had confusions with the examples as everytime the 'read' or 'get' functions are called in the examples explicitly.

Children
No Data
Related