I am trying to sample the ADC every 8ms. During BLE transmission, the CPU will be blocked, therefore limiting the sampling frequency of the ADC?
I am trying to sample the ADC every 8ms. During BLE transmission, the CPU will be blocked, therefore limiting the sampling frequency of the ADC?
There should be no problem, as 8ms is not really demanding interval. SAADC has access to EasyDMA also. Sampling can be triggered ex. by timer, and acquisition does not need any CPU operation. I am doing 3 channels in 3ms interval without any problems, during BLE connection ofc.
According to me, that should not be a problem with provided sampling rate. Song, I think you are sampling ADC in blocking mode instead of non-blocking mode. "nrf_drv_saadc_buffer_convert" can be use to prepare ADC for sample in non-blocking mode and trigger sample by calling "nrf_drv_saadc_sample()" right after the conversion function.
You will redirected "NRF_DRV_SAADC_EVT_DONE" with this event, when ADC sampling is done. This process is handle by easyDMA rather to CPU. For continuous sampling, set two buffers for conversion and start sample it.
Please refer link text for more details.