hi all:
Use PPI+timer+adc,in the following ways:
called stop, then unable to start adc, Couldn't get into the NRF_DRV_SAADC_EVT_DONE.
Could you tell me how?
hi all:
Use PPI+timer+adc,in the following ways:
called stop, then unable to start adc, Couldn't get into the NRF_DRV_SAADC_EVT_DONE.
Could you tell me how?
After triggering TASK_STOP, try to wait for EVENTS_STOPPED before disabling the SAADC.
Snippet:
nrf_saadc_task_trigger(NRF_SAADC_TASK_STOP); // Wait for ADC being stopped. bool result; NRFX_WAIT_FOR(nrf_saadc_event_check(NRF_SAADC_EVENT_STOPPED), HW_TIMEOUT, 0, result); NRFX_ASSERT(result);
After triggering TASK_STOP, try to wait for EVENTS_STOPPED before disabling the SAADC.
Snippet:
nrf_saadc_task_trigger(NRF_SAADC_TASK_STOP); // Wait for ADC being stopped. bool result; NRFX_WAIT_FOR(nrf_saadc_event_check(NRF_SAADC_EVENT_STOPPED), HW_TIMEOUT, 0, result); NRFX_ASSERT(result);
Hi sigurd:
I've already added the your snippet , It still unable to start adc, Couldn't get into the NRF_DRV_SAADC_EVT_DONE. as follow: