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

Selective sampling of ADC channels at run time

I am using a 52810 custom board and the SAADC module.

It is used for sampling one analog input through AIN2 and the battery voltage directly by setting the pin to VDD

As per the documentation, since more than one channel is configured/enabled, it goes into scan mode.

i need to measure the analog input at AIN2 for 15 seconds.

However, i do not need to measure the battery voltage in every scan. I only want to measure it once every 5 seconds to check for voltage drop.

Is this possible ?

Regards

Chary BS

Parents
  • Hello Einar,

    I see that this ticket is still not closed from your side. Luckily, I had another query about the SAADC usage

    Continuing in the same thread, i wanted to ask how to do the following, in terms of initializing and un-initializing the ADC and its channels

    In my system, as mentioned earlier, i have to capture the signal at AIN2 and the battery voltage, but not simultaneously.

    So can I do nrfx_saadc_channel_init() and nrfx_saadc_channel_uninit() as and when required ? Will there be any resource fragmentation issues with that ?

    Do i have to check for ADC busy or idle state before calling uninit or is it taken care internally?

    Thanks in advance

    Chary BS

Reply
  • Hello Einar,

    I see that this ticket is still not closed from your side. Luckily, I had another query about the SAADC usage

    Continuing in the same thread, i wanted to ask how to do the following, in terms of initializing and un-initializing the ADC and its channels

    In my system, as mentioned earlier, i have to capture the signal at AIN2 and the battery voltage, but not simultaneously.

    So can I do nrfx_saadc_channel_init() and nrfx_saadc_channel_uninit() as and when required ? Will there be any resource fragmentation issues with that ?

    Do i have to check for ADC busy or idle state before calling uninit or is it taken care internally?

    Thanks in advance

    Chary BS

Children
Related