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

Stopping and Starting SAADC

What is the right way of stopping and then subsequently re-starting SAADC?

Using the saadc example, I want to be able to stop saadc when a certain pin is grounded or when a certain characteristic is received using BLE. I can see that there is an saadc_sampling_event_enable() function in the example which basically calls the nrf_drv_ppi_channel_enable() function. Is calling the equivalent ppi_disable function the right way to do this?

Parents
  • Thank you for the pointers. I believe that using the nrf_drv_saadc_uninit function would completely unintialise the SAADC and to start it again I will have to configure the channel and set up the buffers again. Is that correct?

    The nrf_saadc_enable and nrf_saadc_disable looks like the one I am after. I will check this now. Or if someone can confirm it is indeed used to start and stop (without the need to re-init) then I can convert it to an answer?

Reply
  • Thank you for the pointers. I believe that using the nrf_drv_saadc_uninit function would completely unintialise the SAADC and to start it again I will have to configure the channel and set up the buffers again. Is that correct?

    The nrf_saadc_enable and nrf_saadc_disable looks like the one I am after. I will check this now. Or if someone can confirm it is indeed used to start and stop (without the need to re-init) then I can convert it to an answer?

Children
No Data
Related