Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Example for using SAADC with NRF_SAADC_INPUT_VDDHDIV5?

Hello,

Is there example code on how to get NRF_SAADC_INPUT_VDDHDIV5 working? When I do nrfx_saadc_init(), I get NRF_ERROR_INVALID_STATE.

Same code works fine with normal ADC pins.

I'm using SDK 17.0.2, and the requirement is using pure nrfx directly. app_* functions etc are not available in this environment.

(Sorry I cannot share code. Its part of a big app so I cannot share anything compilable.)

Parents Reply Children
  • Please elaborate on what you are observing. The more details you provide the easier it will be for us to figure out and resolve your issue.

    What is the solid number you are seeing? Are you printing the digital output of the SAADC directly, or are you doing some kind of conversion of the number in between?
    If so, what functions have you made to perform these conversions? 
    Also, the number will be VDDH/5, not VDDH directly.

    Best regards,
    Karl

Related