The communication between the UART peripheral and the nrf52840 works fine until some device connects to the nrf device via BLE. Using a digital logic analyzer I'm able to identify that the nrf52840 only puts the first character of the string in the UART bus.
My setup:
- nrf52840
- esp8266
- nRF52 SDK v16.0.0
- SoftDevice S140
UART's tx function:
void esp8266_tx(char *str){ uint8_t i = 0; uint8_t err_code; while(str[i] != '\0'){ while(app_uart_put(str[i++]) != NRF_SUCCESS); } err_code = app_uart_put(0xD); //CR if(err_code != NRF_SUCCESS){ NRF_LOG_INFO("error @ esp8266_sendAT: %d", err_code); NRF_LOG_FLUSH(); }; err_code = app_uart_put(0xA); //LF if(err_code != NRF_SUCCESS){ NRF_LOG_INFO("error @ esp8266_sendAT: %d", err_code); NRF_LOG_FLUSH(); }; nrf_delay_ms(300); app_uart_flush(); }