0> <info> app: Blinky example started. 0> <info> app: err_code = 8 0> 0> <error> app: ERROR 8 [NRF_ERROR_INVALID_STATE] at ..\..\..\main.c:191 0> PC at: 0x0002AA25 0> <error> app: End of error report
i use debug mode and run the sample 2 channels ADC function
the code is like below
:
uint32_t err_code=0;
//static uint32_t cnt=0;
//nrf_saadc_value_t saadc_val;
uint16_t u16_saadc_val = 0;
uint16_t u16_saadc_val_1 = 0;
nrf_gpio_pin_toggle(LED_1);
nrf_drv_saadc_sample();
//NRF_LOG_INFO("err_code = %d\r\n", err_code);
//NRF_LOG_INFO("m_buffer_pool[0] = %d,\tm_buffer_pool[1] = %d\r\n", m_buffer_pool[0], m_buffer_pool[1]);
u16_saadc_val = m_buffer_pool[0];
u16_saadc_val_1 = m_buffer_pool[1];
err_code = ble_lbs_on_dht_change(m_conn_handle, &m_lbs, u16_saadc_val, u16_saadc_val_1);
NRF_LOG_INFO("err_code = %d\r\n", err_code);
//APP_ERROR_HANDLER(err_code);
APP_ERROR_CHECK(err_code);
if ((err_code != NRF_SUCCESS) &&
(err_code != NRF_ERROR_INVALID_STATE) &&
(err_code != BLE_ERROR_INVALID_CONN_HANDLE)&&
(err_code != BLE_ERROR_GATTS_SYS_ATTR_MISSING)
)
{
APP_ERROR_HANDLER(err_code);
}
and any one can tell why does it happened??
thanks a lot!
