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

nrf_drv_uart_tx silently fails on UARTE1 with SDK15

Hi,

I've got some code (at https://github.com/espruino/Espruino/blob/master/targets/nrf5x/jshardware.c#L1201-L1318) where I use nrf_drv_uart to access the UART. I don't use nrf_serial because my application has its own IO buffering that I want to use.

This has worked great on multiple SDKs and multiple devices, however I just came to port it to UARTE1.

This was a bit more painful than expected because I had to fiddle with a bunch of sdk_config stuff to get it compiling without errors (related to it expecting NRF_UART1), but now it compiles and runs.

Receive works perfectly, and the very first transmit works too (and even fires the callback to say that it has finished). However subsequent transmits fail to do anything. nrf_drv_uart_tx is called and it returns with no error codes, but it just doesn't cause anything to be sent on UART1.

Any ideas what the issue could be?

thanks!

Parents
  • Do I understand you correctly that the first transfer will generate a NRF_DRV_UART_EVT_TX_DONE in uart_event_handle, and you start subsequent transfers from here?

    Have you tested starting subsequent transfers from other parts of the code? I would recommend that you always check the error codes from nrf_drv_uart calls.

    Can you provide the state of the registers in UARTE1 peripheral when this issue occurs?

Reply
  • Do I understand you correctly that the first transfer will generate a NRF_DRV_UART_EVT_TX_DONE in uart_event_handle, and you start subsequent transfers from here?

    Have you tested starting subsequent transfers from other parts of the code? I would recommend that you always check the error codes from nrf_drv_uart calls.

    Can you provide the state of the registers in UARTE1 peripheral when this issue occurs?

Children
Related