SAADC sample doesn't appear to be working

Hi,

I am ultimately trying to move from version 2.3.0 of the sdk to 2.6.1.  I have an nrf52_dk board i want to try and test the "different" way that the sdk is now doing saadc.  Our custom board works fine with sdk 2.3.0 using ppi and rtc to trigger sampling.  The problem is that the sample doesnt appear to be working.   I found the loopback pin guide and jumped p0.03 and p0.31 and all that I get when the bard is flashed is the [00:00:00.381,469] <inf> NRFX_EXAMPLE: Starting nrfx_saadc advanced non-blocking sampling with internal timer example. Line.

For a little more background our current code wont compile at all with version 2.6.1 so i am starting with an example and will work to move that example to my custom board.  That being said, i really need to know what the LOOPBACK Pins being jumped is doing because our board wont be doing that specifically, we have a variable voltage being applied and we need to read it.

Brian

Parents
  • After a bunch more playing around, I was able to get the example to work.  If you could just answer the last bit about what the loopack pins are doing so I can understand what's going on I'd appreciate it.  I need to make tis example work on my custom board next.  Then you can close this ticket.

  • The loopback pin just connects the output of a GPIO to the input of one of the ADC inputs.  Then, the code is toggling the state of the GPIO pin, so that in between successive reads of the ADC pin, you should see the result go from ~ 0V to ~ 3V.  You can skip the loopback pin connection altogther, and just connect a variable DC voltage up to the ADC input pin and you should see the result vary as you change the input level

    Note that I have found in V2.6.0 when running any of hte nrfx_saadc examples, that the call to the saadc calibrate API never seems to return, which means the nrfx_saadc_mode_trigger() API doesn't get triggered, and no ADC measurements are made.

    I have this ticket open regarding this issue, and Nordic have been able to replicate it

    Cheers,

    Mike

Reply
  • The loopback pin just connects the output of a GPIO to the input of one of the ADC inputs.  Then, the code is toggling the state of the GPIO pin, so that in between successive reads of the ADC pin, you should see the result go from ~ 0V to ~ 3V.  You can skip the loopback pin connection altogther, and just connect a variable DC voltage up to the ADC input pin and you should see the result vary as you change the input level

    Note that I have found in V2.6.0 when running any of hte nrfx_saadc examples, that the call to the saadc calibrate API never seems to return, which means the nrfx_saadc_mode_trigger() API doesn't get triggered, and no ADC measurements are made.

    I have this ticket open regarding this issue, and Nordic have been able to replicate it

    Cheers,

    Mike

Children
No Data
Related