Hi Devzone:
I am working on nRF52840 with latest SDK.
I have 1 differential pair and 1 single ended pin I want to sample, single ended samples at every 40ms while differential pair samples at every 5 second.
You may already guessed that 40ms sample rate is for battery current amd 5 second sample rate is for battery voltage. Yes we are trying to measure battery life.
This is easily achievable with sampling both channels at 40ms and discard samples for voltage. But I am afraid it might be a wasteful of resources if samples are discarded.
Searching through the forum i came to be aware of the following potential solutions.
1.
init one channel, sample at 40ms, get samples, unit,
init another channel, sample at 5 second, unit.
2. use low power mode + burst mode
So please recommend the details of what's the most efficient solution to this problem. I noticed there are many posts on this topic, the problem is that I am not very sure if they are up-to-date.
Please include detail as:
How to enable burst mode? In sdk_config I only saw low power mode enabling option.
How to init and uninit? An example code with a validation that it works with the latest SDK is much appreciated. (below is an example but is 4 years old i don't know if it fits the latest SDK)
https://github.com/NordicPlayground/nRF52-ADC-examples/blob/master/saadc_low_power/main.c
Thanks!