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

app_uart_fifo event handler not firing

I am developing three different projects for the nRF51822 using SDK 12.3 and the app_uart_fifo code module. Details of the projects are as follows:

Project 1 - implemented on PCA10028. I use the UART to communicate with the ATSAM chip. Uses flow control and a timer interrupt to poll the UART. No softdevice.

Project 2 - implemented on custom board. I use the UART to communicate with PC for debug purposes. Uses flow control and a timer interrupt to poll the UART. No softdevice.

Project 3 - implemented on custom board. I use the UART to communicate with another IC. Does not use flow control. I only use a timer after writing data to the IC for the purpose of timing out if the IC doesn't respond. I use the APP_UART_TX_EMPTY event to start the timer and the APP_UART_DATA_READY event to stop the timer and process the received message. This project does have a softdevice.

Projects 1 and 2 work fine. 

Project 3 has an issue with the uart_event_handler in app_uart_fifo.c never being called. I have determined that the first byte I put into the fifo buffer does get transmitted, but then the NRF_DRV_UART_EVT_TX_DONE event is supposed to fire in order to transmit the remaining bytes but it does not fire.

I have triple checked that I am initializing everything consistently. I have also seen similar threads where you ask people if they have the app_fifo.c, app_uart_fifo.c, and nrf_drv_uart.c files included. I do.

I suspect my issue is something to do with the softdevice but I can't figure out what.

Related