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

nrf52 app_uart send : data missed on pc side

I'm trying to send a set of 246 bytes by uart fifo. I have a PC side which retreive the data, but I always miss some bytes (4 to 6).

I'm checking app_uart_put return and it always return NRF_SUCCESS, otherwise the LED would lit

    for (uint8_t i = 0; i < 255; i ++) {
        err_code = app_uart_put((i ));
        
        if (err_code != NRF_SUCCESS) {
            nrf_gpio_pin_set(0);
        }
}

I configured uart with baude rate 9600 and APP_UART_FLOW_CONTROL_ENABLED

#define     RX_BUF_SIZE     2   
 #define     TX_BUF_SIZE     256      
        static const app_uart_comm_params_t comm_params = 
         { 
             .rx_pin_no  = RX_PIN_NUMBER, 
             .tx_pin_no  = TX_PIN_NUMBER, 
             .rts_pin_no = NULL, 
             .cts_pin_no = NULL, 
             //Below values are defined in ser_config.h common for application and connectivity 
             .flow_control = APP_UART_FLOW_CONTROL_ENABLED, 
             .use_parity   = false, 
             .baud_rate    = UART_BAUDRATE_BAUDRATE_Baud9600 
         }; 

what could be the cause ?

Parents Reply Children
No Data
Related