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

52832 uart question

Hello,I run the program nRF52_SDK_11.0.0\examples\peripheral\uart\pca10040\arm4 and rewrite the "main":

int main(void)
{
    //LEDS_CONFIGURE(LEDS_MASK);
    //LEDS_OFF(LEDS_MASK);
    uint32_t err_code;
    const app_uart_comm_params_t comm_params =
      {
          RX_PIN_NUMBER,
          TX_PIN_NUMBER,
          RTS_PIN_NUMBER,
          CTS_PIN_NUMBER,
          APP_UART_FLOW_CONTROL_ENABLED,
          false,
          UART_BAUDRATE_BAUDRATE_Baud38400
      };
    APP_UART_FIFO_INIT(&comm_params,
                         UART_RX_BUF_SIZE,
                         UART_TX_BUF_SIZE,
                         uart_error_handle,
                         APP_IRQ_PRIORITY_LOW,
                         err_code);
    //APP_ERROR_CHECK(err_code);

    printf("\n\rStart: \n\r");
    while (true)
    {
        printf("111122223333");
    }
}

but,I receive the data:

Start: 
11112222333311112222333311112222333311112222333311112222333311112222333311112222333311112222333311112222333311112222333311112222333311112222333311112222333311112222333311112222333311112222333311112222333311112222333311112222333311112222333311112222312123123123123121231231231231312312312312313123123123121231231231231212312312312313123131231231231212312312312313123123123123131231231231212312312312312123123123123131231231231231312312312312123123123123121231231231231312312312312313123123123121231231231231212312312312313123123123123131231231231212312312312312123123123123131231231231231312312312312123123123123121231231231231312312312312313123123123121231231231231212312312312313123123123123131231231231212312312312312123123123123131231231231231312312312312123123123123121231231231231312312312312313123123123121231231231231212312312312313123123123123131231231231212312312312312123123123123131231231231231312312312312123123123123121231231231231312312312312313123123123121231231231231212312312312313123123123123131231231231212312312312312123123123123131231231231231312312312312123123123123121231231231231312312312312313123123123121231231231231212312312312313123123123123131231231231212312312312312123123123123131231231231231312312312312123123123123121231231231231312312312312313123123123121231231231231212312312312313123123123123131231231231212312312312312123123123123131231231231231312312312312123123123123121231231231231312312312312313123123123121231231231231212312312312313123123123123131231231231212312312312312123123123123131231231231231312312312312123123123123121231231231231312312312312313123123123121231231231231212312312312313123123123123131231231231212312312312312123123123123131231231231231312312312312123123123123121231231231231312312312312313123123123121231231231231212312312

why?111222333... is changed to 123123....

Related