Hi All
Now I am testing the example code \examples\ble_peripheral\ble_app_uart with Nordic nRF Connect app on smart phone. i do a limit change in function uart_event_handle, it shows as below
case APP_UART_DATA_READY:
UNUSED_VARIABLE(app_uart_get(&data_array[index]));
index++;
if(index > 1)
{
NRF_LOG_DEBUG("Ready to send data over BLE NUS");
NRF_LOG_HEXDUMP_DEBUG(data_array, index);
index=2;
do
{
uint16_t length = (uint16_t)index;
transdata[0]=0x31;
transdata[1]=0x32;
err_code = ble_nus_data_send(&m_nus, transdata, &length, m_conn_handle);
// err_code = ble_nus_data_send(&m_nus, data_array, &length, m_conn_handle);
if ((err_code != NRF_ERROR_INVALID_STATE) &&
(err_code != NRF_ERROR_RESOURCES) &&
(err_code != NRF_ERROR_NOT_FOUND))
{
APP_ERROR_CHECK(err_code);
}
} while (err_code == NRF_ERROR_RESOURCES);
index = 0;
}
break;
the code will upload 0x31 & 0x32 when it receive any message from uart.
i do the test like below:
i keep to send message to the evaluation board by UART.
in the very beginning, i set the time interval as 100ms and there is no any issue. the nRF Connect app can receive the message.
but after i change time interval to 10ms, the nRF Connect app only can receive two or three message from evaluation board then it will disconnect.
after i debugging the code it will show as below:
My question is why the example is stuck when i change the UART sending time interval into 10ms