Hello,
I am currently trying to transmit around 800kbps of data using the Nordic ESB protocol. I am also attempting to sample 2 inputs using the SAADC at around 32 khz rate. My current settings for the SAADC are as follows:
ret_code_t err_code;
nrf_saadc_channel_config_t channel_0_config =
NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN0);
channel_0_config.acq_time = NRF_SAADC_ACQTIME_3US;
channel_0_config.gain = NRF_SAADC_GAIN1_6;
nrf_saadc_channel_config_t channel_1_config =
NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN2);
channel_1_config.acq_time = NRF_SAADC_ACQTIME_3US;
channel_1_config.gain = NRF_SAADC_GAIN1_6;
nrf_drv_saadc_config_t config_t = NRF_DRV_SAADC_DEFAULT_CONFIG;
config_t.resolution = NRF_SAADC_RESOLUTION_12BIT;
err_code = nrf_drv_saadc_init(&config_t, saadc_callback);
APP_ERROR_CHECK(err_code);
err_code = nrf_drv_saadc_channel_init(0, &channel_0_config);
APP_ERROR_CHECK(err_code);
err_code = nrf_drv_saadc_channel_init(1, &channel_1_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);
err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[1], SAMPLES_IN_BUFFER);
APP_ERROR_CHECK(err_code);
I am under the impression that the p_buffer in the following line of code will contain a two sample buffer where channel 0 sample is located p_buffer[0], and channel 1 sample is located p_buffer[1].
err_code = nrf_drv_saadc_buffer_convert(p_event->data.done.p_buffer, SAMPLES_IN_BUFFER);
So my questions are these:
- What sample rate can the SAADC handle when running the ESB at these rates?
- What is the highest SAADC sample rate when running the ESB wide open?
- How would I calculate the volts / LSB value using the GAIN and REFERENCE settings?
- Is there any work around for using SCAN mode (SAADC) with OVERSAMPLING for multiple channels?
- Is there an example of performing the SAADC CALIBRATION or do the drivers handle this at initialization?