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

nRF52 SDK 12.2 UART w/o flow control fails (works on 12.1)

I try to start uart like this:

  uartParams.baud_rate = UART_BAUDRATE_BAUDRATE_Baud115200;
  uartParams.tx_pin_no = tx;
  uartParams.rx_pin_no = rx;
  uartParams.use_parity = false;
  uartParams.flow_control = APP_UART_FLOW_CONTROL_DISABLED;

  uartBuffers.rx_buf = rxBuffer;
  uartBuffers.rx_buf_size = sizeof(rxBuffer);
  uartBuffers.tx_buf = txBuffer;
  uartBuffers.tx_buf_size = sizeof(txBuffer);

  auto error = app_uart_init(&uartParams, &uartBuffers, uart_evt_handler, APP_IRQ_PRIORITY_HIGH);
  if (error != NRF_SUCCESS) {
    DEBUG_ERROR<< "Failed to init uart for esp8266 use: " << error;
    return false;
  }

This has worked perfectly on SDK 12.1, but 12.2 fails with error 8 (bad state). Bad state should not be possible at all when flow control is off if I read the app_uart_init documentation correctly... Have I missed someting? :\

Parents Reply Children
No Data
Related