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

UART IRQ stops firing after string received and one character transmitted

  1. I can send a CR terminated string through the UART using tx fifo OK.
  2. BUT, if I receive a string from the UART rx OK first, and then try to send a string, only the 1st character is transmitted through the UART tx, then the uart IRQ stops firing (UART0_IRQHandler handler not firing), and I never see TX ready (NRF_UART_EVENT_TXDRDY).
  3. I am using teraterm pro terminal to communicate (send/receive) using COM1 at 9600baud With the NRF51 board.
  4. I am using Eclipse for code development, and J-Link RTT.
  5. I can watch the receive buffer never getting cleared out, and so am wondering if I am missing some actions that should be done after receiving completed.
  6. The string I am trying to send goes into the tx fifo OK.
Parents
  • I assume you are using app_uart_fifo.c (and not app_uart.c)?

    When you receive a byte you should retrieve it from the fifo with app_uart_get(..).

    Are you doing any other operations in your code that may block the uart interrupt from firing? The uart interrupt will by default run at APP_PRIORITY_LOW. Are you using HW flow control and have you monitored these lines (specifically CTS)?

Reply
  • I assume you are using app_uart_fifo.c (and not app_uart.c)?

    When you receive a byte you should retrieve it from the fifo with app_uart_get(..).

    Are you doing any other operations in your code that may block the uart interrupt from firing? The uart interrupt will by default run at APP_PRIORITY_LOW. Are you using HW flow control and have you monitored these lines (specifically CTS)?

Children
No Data
Related