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

nRF52833 SAADC Occasionally returns 0xFFFF

SAADC resolution is set to 8 bits, channel is configured as single ended.
Is it correct to say that SAADC digital output should be between 0x0000 and 0x00FF(full scale)?

If 0xFFFF is slightly negative value as answered here https://devzone.nordicsemi.com/f/nordic-q-a/19688/nrf52832-saadc-occasionally-returns-0xffff

then how is it possible to get more than 256 different values from 8 bit SAADC?

Parents
  • The output value of 0xFFFF is an int16_t of value -1 in two's complement. 

    When the SAADC is configured in the single-ended mode it's still a differential input configuration, but where the negative input is tied to ground. If the positive input is also tied to ground you can get a negative output due to offset error in the adc. 

    When you set the resolution to 8 bits the output is still an int16_t and you need to treat it as such. 

Reply
  • The output value of 0xFFFF is an int16_t of value -1 in two's complement. 

    When the SAADC is configured in the single-ended mode it's still a differential input configuration, but where the negative input is tied to ground. If the positive input is also tied to ground you can get a negative output due to offset error in the adc. 

    When you set the resolution to 8 bits the output is still an int16_t and you need to treat it as such. 

Children
No Data
Related