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
  • This compells me to think that there is an issue with the NRF_LOG configuration. Have you set NRF_LOG_BACKEND_UART_ENABLED 1 as well. It won't do setting just the NRF_LOG_ENABLED 1. So please check that both of these are set to 1, and also that you have implemented NRF_LOG_BACKEND_UART_TX_PIN and NRF_LOG_BACKEND_UART_BAUDRATE as well.

    Best regards,

    Simon

Reply
  • This compells me to think that there is an issue with the NRF_LOG configuration. Have you set NRF_LOG_BACKEND_UART_ENABLED 1 as well. It won't do setting just the NRF_LOG_ENABLED 1. So please check that both of these are set to 1, and also that you have implemented NRF_LOG_BACKEND_UART_TX_PIN and NRF_LOG_BACKEND_UART_BAUDRATE as well.

    Best regards,

    Simon

Children
No Data
Related