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

APP_UART_PUT issue: NRF_ERROR_BUSY

Hello everyone,

I am facing an issue with UART communication from my nRF52832 to my GPS module.

I precise that communication in the other way works very well (I get data from the GPS module)

When I try to send commands to the GPS using app_uart_put I got stuck with the error NRF_ERROR_BUSY.

Here is the code I am using:

void uart_send_command (const char *command, uint8_t sum)
{
    uint8_t index;
    uint32_t error;
    while(app_uart_put('$')!=NRF_SUCCESS);
    for (index = 0;index<sum;index++)
    {
        do
        {
           error = app_uart_put(command[index]);
           if((error !=NRF_SUCCESS) && (error !=NRF_ERROR_BUSY))
           {
              NRF_LOG_INFO("Failed sending UART message. Error 0x%x. ", error);
              APP_ERROR_CHECK(error);
           }
        }while(error = NRF_ERROR_BUSY);
    }
    app_uart_put('\r');
    app_uart_put('\n');
}

Any ideas about the problem?

Thanks!

Parents Reply Children
No Data
Related