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

SAADC does not sample

I'm trying to sample analog input but there is no value after sampling.

I tested the input by configuring it as digital input and it worked correctly.

Below is code. Any help would be greatly appreciated.

Parents
  • I forgot to include other details...

    I'm using SES for IDE and the nRF52 Dev board. I've already tried many variations of pointer declaration just to see if it would effect the result.

    I've looked at the SDK example as well as other examples and I think my code should work.

    Here is the definition code:

Reply
  • I forgot to include other details...

    I'm using SES for IDE and the nRF52 Dev board. I've already tried many variations of pointer declaration just to see if it would effect the result.

    I've looked at the SDK example as well as other examples and I think my code should work.

    Here is the definition code:

Children
  • That looks a lot like a NULL pointer to me.

    Hopefully OP set adcResult pointer to a more sensible RAM location in code not shown here.

  • What exactly looks like a NULL pointer?

  • That points to flash address zero, which is part of the MBR and countains the lower half of the inital stack pointer.

    You should point it to something in RAM like:

    Also, get a book about the C programming language and read it. This is a very basic beginner question, and C cannot be learned properly just from forum posts.

  • Your explanation was useful. Your insult was not.