Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

NRF_ERROR_BUSY in nrf_drv_uart_tx

Board: nRF52833

SoftDevice: s122

SDK version: 17.0.2

I'm trying to log my continuous sensor data from the peripheral on the serial monitor. So I took ble_app_uart_c example and enabled log to get the values on the COM port. Now I do get the values in the serial monitor but I am getting NRF_ERROR_BUSY error in nrf_drv_uart_tx function a few seconds after ble connection establishment.

How can I solve this? Thanks in advance.

Parents
  • Hello,

    I'm trying to log my continuous sensor data from the peripheral on the serial monitor. So I took ble_app_uart_c example and enabled log to get the values on the COM port.

    The default logging backend for the ble_app_uart_c example is RTT, which I would recommend that you use since the UART instance is already in use by the ble_app_uart_c application (for receiving input to send to its peer, and to output any data received from the peer). You can view RTT loggings either in the SES Debug Terminal directly, or you can download the standalone Segger RTT Viewer application.
    The likely reason for this error is that you are trying to use the UART for both the logging and the application at the same time.

    Best regards,
    Karl

  • Hi, 

    I want to log the data in the serial monitor PuTTY. How can I do that?

    Thanks in advance.

Reply Children
  • As mentioned, the issue with that is that your nRF52833 only has 1 UART instance which is currently used by the ble_app_uart to receive UART input for sending over BLE, and to output received BLE messages to your serial terminal.
    If you instead would like to use the UART instance for logging you would not be able to use it for the application at the same time, which could break the reference applications functionality.

    I do not think that PuTTY is able to receive RTT, and so I would recommend that you download the Segger RTT Viewer application instead, but if this is not an option then you can disable the UART initialization and usage in the application, and enable the loggers backend uart, for example.

    Best regards,
    Karl

Related