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

SAADC Stale Value after deinit and reinit

We're using SAADC to monitor two different voltage rails in different combinations (sometimes one and sometimes both).

I'm experiencing an issue in the following scenario: Firmware is monitoring two channels and repeatedly measuring values using non-blocking calls to SAADC using a timer and PPI. It then uninits both channels and the SAADC component. Our system then initializes a single channel and grabs a value using nrfx_saadc_sample. The first value grabbed is a stale value from the previous continuous sampling of two channels. After this first incorrect reading, subsequent single channel samples are correct.

I thought this might be due to not calling nrfx_saadc_buffer_convert before grabbing this single channel sample, but adding this call does not make a difference. This behavior is also consistent regardless of the delay between continuous sampling and the single sample.

Does this issue sound similar to anything that has been encountered?

Parents Reply Children
Related