Hi engineer,
I found that the SAADC current is increased after the SAADC function opened, then my processing method as below:
1,I close SAADC function after sampling SAADC data in below code:
nrf_drv_saadc_uninit();
NRF_SAADC->INTENCLR = (SAADC_INTENCLR_END_Clear << SAADC_INTENCLR_END_Pos);
NVIC_ClearPendingIRQ(SAADC_IRQn);
2,I initialized SAADC function in below code before sampling SAADC data:
err_code = nrf_drv_saadc_init(NULL, saadc_callback);
APP_ERROR_CHECK(err_code);
nrf_saadc_channel_config_t channel_battery_config =
NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN1);
nrf_saadc_channel_config_t channel_sensor_config =
NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN2);
err_code = nrf_drv_saadc_channel_init(0, &channel_battery_config);
APP_ERROR_CHECK(err_code);
err_code = nrf_drv_saadc_channel_init(1, &channel_sensor_config);
APP_ERROR_CHECK(err_code);
err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[0], SAMPLES_IN_BUFFER);
APP_ERROR_CHECK(err_code);
3,The SAADC is cycle sampling ,its interval time is 3ms;
My question:
1,when the sensor device is set 3ms cycle sampling time,the APP on mobile phone can't find the sensor device;
2,when the sensor device is set 10s cycle sampling time,the APP on mobile phone can find the sensor device and system run nomally;
how to handle the issue?
thanks!