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

Adding SAADC example to existing project

Development Software:

nRF5 SDK v15.2.0

SEGGER Embedded Studio for ARM v3.50

SoftDevice S140 v6.1.0

 

Computer Platform:

Windows 10 Professional

 

Hardware: 

nRF52840 DK

 

What I'm trying to do: 

 I'm trying to add the SAADC example to my existing project. Initially, I simply added the SAADC functions from the nRF5SDK/examples/peripheral/saadc example, namely:

saadc_sampling_event_init()

saadc_init()

saadc_sampling_event_enable()

saadc_callback()

timer_handler()

After successful compilation, I flashed the program to an nRF52840 DK, then opened PuTTY and opened a serial connection with the following parameters:

COM6 (the port my DK is connected on)

Baud Rate (speed): 115.200

Data bits: 8

STop bits: 1

Flow Control: None

Parity: None

I expected output, but didn't get any output in PuTTY. I tried the given example, namely, the example at nRF5SDK/examples/peripheral/saadc and I got the expected output. Can anyone help me understand why this is not working?

I would have attached my project, but the insert tool keeps giving me a red message saying 'Error' whenever I try to insert the compressed project. I'll be happy to provide any code blocks or files though.

 

Parents
  • Hi Darien

    Have you enabled NRF_LOG in your existing project? You will have to go through the sdk_config.h file in your existing project and make sure that the NRF_LOG functions have equal values to the saadc example. Easiest way is to just ctrl+F "NRF_LOG" in the two sdk_config files and control that all the functions are there and that the values are correct. You have to add NRF_LOG functions if they are missing from your project, but are present in the example.

    Best regards,

    Simon

Reply
  • Hi Darien

    Have you enabled NRF_LOG in your existing project? You will have to go through the sdk_config.h file in your existing project and make sure that the NRF_LOG functions have equal values to the saadc example. Easiest way is to just ctrl+F "NRF_LOG" in the two sdk_config files and control that all the functions are there and that the values are correct. You have to add NRF_LOG functions if they are missing from your project, but are present in the example.

    Best regards,

    Simon

Children
Related