Send Uart Libuartes not woking in loop

NRF_LIBUARTE_ASYNC_DEFINE(libuarte, 0, 0, 0, NRF_LIBUARTE_PERIPHERAL_NOT_USED, 255, 3);

void send_UART(char *sdata, int len)
{
    ret_code_t ret;
    ret = nrf_libuarte_async_tx(&libuarte, sdata, len);
    APP_ERROR_CHECK(ret);
}

 while (true)
    {
        send_UART(text2,sizeof(text2));
        nrf_delay_ms(1000);
    }

I am using libuartes example. I only use send_UART (char*sdata, int len)  in main before while (true) or in void uart_event_handler(void *context, nrf_libuarte_async_evt_t *p_evt).
I can use this function in loop. (my monitor didn't show anything).  Please help me.
Thank you

  • Hi,

    Does the application work if you only call send_UART() once?

    Do you get any error codes returned from nrf_libuarte_async_tx()? If the previous transfer is not completed, you will get a NRF_ERROR_BUSY error, but a 1s delay should normally be enough to complete the transfer. Your post lacks details about configuration of the UART instance, how large the transfer is, if you are using BLE alongside the UART, etc., so I can't say for sure.

    Best regards,
    Jørgen

Related