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

data log for driver example

Hello,

I'm using SDK 13.0.0.1 to develop my project. For driver example, such as RTC, I can't see data log while I can see the data log for BLE example, such as ble_app_uart. I simply use printf() function. My settings are the same for both projects. In sdk_config.h, I set NRF_LOG_ENABLED to 1 and NRF_LOG_BACKEND_SERIAL_USES_UART 1(It's default). Does any one know how to enable data log via UART console for driver example?

Thanks, Mich.

  • Have you called NRF_LOG_INIT()?

  • HI Petter,

    I just added UART init, log init and NRF_LOG_FINAL_FLUSH(); in main.c. I'm able to see data log via NRF_LOG_INFO() in main.c. But when I have NRF_LOG_INFO() in other c files, I can't see the log coming out. Still debugging. Thanks for your support.

  • I'm not sure what other c files you are referring to, but maybe you can try to enable logging in the specific modules?

    image description