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

SAADC Limit Disabled Value

In SDK 12.2, why is the SAADC #define NRF_DRV_SAADC_LIMITH_DISABLED (2047) set to this value? On a reset the register is set to 32767 according to the product spec and my tests using the debugger.

If I have a single ended channel then my upper limit is 4095 but I can't set this upper limit using nrf_drv_saadc_limits_set since it will assert on line 586 of nrf_drv_saadc.c ASSERT(limit_high <= NRF_DRV_SAADC_LIMITH_DISABLED);

Thanks, Darren

Parents
  • Jorgen,

    Thanks for taking the time to reply and for looking into this issue. I'm not sure that I understand your last statement "You should not need higher values for 12-bits though, as 2047 - (-2048) gives 4095 (2^12-1)." If a channel is configured as single ended, with 12bits of resolution, then my maximum count value will be 4095 which is over the maximum limit of 2047.

    Thanks, Darren

Reply
  • Jorgen,

    Thanks for taking the time to reply and for looking into this issue. I'm not sure that I understand your last statement "You should not need higher values for 12-bits though, as 2047 - (-2048) gives 4095 (2^12-1)." If a channel is configured as single ended, with 12bits of resolution, then my maximum count value will be 4095 which is over the maximum limit of 2047.

    Thanks, Darren

Children
No Data
Related