Unable to print using printf or nrf_log_info

I am using nrf5 sdk 17.1.0, segger embedded studio v6.40 and nrf52832-dk, when running the spi example, i do able to see the log only after the build, and when i reset the device no log is shown on the Jlink-RTT viewer. When running the uart example provided in nrf5 sdk i was unable to see any anything on the terminal also. Can you please let me know what might be the potential reason?

Parents
  • Hello,

    The printk() usually prints to the UART, and not the RTT log. If you want to print something to the RTT Log, make sure that RTT logging is enabled in your sdk_config.h. 

    If you try the ble_app_uart example, in nRF5 SDK 17.1.0, you can see that printk() will print to the UART terminal (use something like Putty or Termite), but logging, which uses NRF_LOG_INFO(), will be printed to the RTT log.

    Best regards,

    Edvin

Reply
  • Hello,

    The printk() usually prints to the UART, and not the RTT log. If you want to print something to the RTT Log, make sure that RTT logging is enabled in your sdk_config.h. 

    If you try the ble_app_uart example, in nRF5 SDK 17.1.0, you can see that printk() will print to the UART terminal (use something like Putty or Termite), but logging, which uses NRF_LOG_INFO(), will be printed to the RTT log.

    Best regards,

    Edvin

Children
Related