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

Continuous reading/sampling the ADC

Does the 2nd argument in the following function SAADC example controls the sampling frequency? If this is not the case then can this saadc example program be modified to be used for continuously. Is there a better way to continuously read the ADC for nRF52 chip instead of using the saadc example.

/* setup m_timer for compare event every 400ms */
uint32_t ticks = nrf_drv_timer_ms_to_ticks(&m_timer, 400);

Parents
  • Hi,

    Yes, this is indirectly the sampling frequency + the delay it takes to trigger a task by PPI. SAADC in continuous mode is covered in the product specification here.

    regards

    Jared 

  • Jared,

    I am using nRF52840-DK (SES,nRF5_SDK_15.3.0_59ac345) to read analog input on ADC pin AIN0. I want to continuously read the adc after pairing is established and then broadcast the data over UART/Bluetooth. In order to achieve my objective, I am trying to run example by combining the SAADC example with it.

    I am having issues with  saadc_callback() which uses a legacy function ble_nus_string_send().This legacy function is replaced by a new function uint32_t ble_nus_data_send().The number of arguments in each function are different .I am attaching the project files.

Reply
  • Jared,

    I am using nRF52840-DK (SES,nRF5_SDK_15.3.0_59ac345) to read analog input on ADC pin AIN0. I want to continuously read the adc after pairing is established and then broadcast the data over UART/Bluetooth. In order to achieve my objective, I am trying to run example by combining the SAADC example with it.

    I am having issues with  saadc_callback() which uses a legacy function ble_nus_string_send().This legacy function is replaced by a new function uint32_t ble_nus_data_send().The number of arguments in each function are different .I am attaching the project files.

Children
No Data
Related