Hello, because of my mistake, rx tx pin was not cross connected.
So i want to swap rx tx pin on nrf51822.
In the example ble_app_uart_s130_pca10028, i change the code in main.c
const app_uart_comm_params_t comm_params = { RX_PIN_NUMBER, //RX_PIN_NUMBER=11 TX_PIN_NUMBER, //TX_PIN_NUMBER=9; RTS_PIN_NUMBER, CTS_PIN_NUMBER, APP_UART_FLOW_CONTROL_ENABLED, false, UART_BAUDRATE_BAUDRATE_Baud38400 };
to
const app_uart_comm_params_t comm_params = { 9, 11, RTS_PIN_NUMBER, CTS_PIN_NUMBER, APP_UART_FLOW_CONTROL_ENABLED, false, UART_BAUDRATE_BAUDRATE_Baud38400 };
After upload the firmware, i test uart using nRF Toolbox app.
- disconnect rx tx pin physically, pairing BLE -> well paired.
- connect rx tx pin physically -> Error 6:The connection has timed out unexpectedly occur and break the pairing.
Why this error is occur?
When i try not swapped code(origin example) crossing rx tx pin on MCU,
this error is not occurred.