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

saadc value affects next values

Hi, I'm developing custom board with nrf52832

The problem is that when saadc returns negative value, all values that saadc returns after are max possible values from config So the previous adc value affects all that goes after it. They stay at max until adc will return another negative value.

Things I tried that didn't help:

  • Checking gnd/0
  • Setting adc limits by nrf_drv_saadc_limits_set
  • Pin in single-ended mode
  • Calibrating adc  (different time intervals)
  • Bitmask to adc returned value (adc is configured with 12 bit, so i zero 4 top bits)
  • Different channel configs

Looking for help, I'm confused a lot

Parents Reply
  • That is true, but from the image it looks like you input a much higher voltage than that. 3V input with 14-bit mode and 1/6 GAIN/internal reference should give samples of ~13-14000. Is this the raw values in the buffer, or have this been transferred over BLE? Have you checked the voltage level on the analog input with a scope etc., to see that there is nothing else pulling the voltage low? Which analog input do you use? Have you tested with another pin?

Children
Related