This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF52832 SAADC HOW TO GET ADC RESULT FROM THE BUFFER !

i m new in NRF52832, i use saadc exemple pca 10040 sdk 13.0.0, i dont now how to get adc result from the buffer because there is 2 elements in the buffer :

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);

thanks for help

Parents
  • Hi,

    The SAADC peripheral support double buffering, allowing you to sample to a second buffer while processing samples in the first buffer.

    You can read the samples in saadc_callback, from the parameter p_event->data.done.p_buffer[i]. Depending on the define SAMPLES_IN_BUFFER, there might be multiple samples in each buffer.

    Best regards,

    Jørgen

Reply
  • Hi,

    The SAADC peripheral support double buffering, allowing you to sample to a second buffer while processing samples in the first buffer.

    You can read the samples in saadc_callback, from the parameter p_event->data.done.p_buffer[i]. Depending on the define SAMPLES_IN_BUFFER, there might be multiple samples in each buffer.

    Best regards,

    Jørgen

Children