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

nRF52 - SAADC no output in serial terminal

Hello,

In the blinky project, I have added the following peripherals to build up an application

  • Timer
  • UART
  • SAADC
  • PPI

I have followed the saadc peripheral example to build up the blinky project. No compile errors. No linker errors.

However, nothing shows up on my serial terminal. I have tried debugging but still did not work

Attached the project. Can you please help me with this?

Thanks!

blinky.rar

  • Hi,

    All the printing commands in your application is done using NRF_LOG_INFO(), but you have not enabled NRF_LOG in your sdk_config.h file. I see you have implemented UART, and included retarget.c in your project, but you do not use printf for printing any strings. You either have to enable NRF_LOG in sdk_config.h and select the UART backend (see sdk_config.h file of for instance SAADC example), or swap the NRF_LOG_INFO() calls for printf. In this case, you also need to enable retargeting of the STDIO functions in sdk_config.h:

    // <q> RETARGET_ENABLED  - retarget - Retargeting stdio functions
    
    #ifndef RETARGET_ENABLED
    #define RETARGET_ENABLED 1
    #endif
    

    Best regards,

    Jørgen

Related