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

Debugging with nrf51 dongle

I'm trying to see debugging info with nrf51 dongle. As far as I can tell I just need to use:

#define NRF_LOG_MODULE_NAME "APP"
#include "nrf_log.h"
#include "nrf_log_ctrl.h" 
#define ENABLE_DEBUG_LOG_SUPPORT 1

in setup and then the code:

ret_code_t err_code;

err_code = NRF_LOG_INIT(NULL);
APP_ERROR_CHECK(err_code);

NRF_LOG_INFO("\r\nBlinky Start!\r\n");

Would produce Blinky Start! in terminal window. According to config.h the baud rate should be 38400, but I tried different numbers and nothing happened. What am I doing wrong? :(

Parents
  • Hi,

    I tried replicating this method using my blinky demo and while I get not error messages and the leds are blinking like they should both my UART and RTT are silent?

    What am I doing wrong? 

    I tried setting the uart params:

    #define NRF_LOG_BACKEND_SERIAL_USES_UART 1
    #define NRF_LOG_BACKEND_SERIAL_UART_BAUDRATE 30924800
    #define NRF_LOG_BACKEND_SERIAL_UART_FLOW_CONTROL 0

    Also I have

    #define NRF_LOG_BACKEND_SERIAL_USES_RTT 1

    but this doesn't help.

    I'm suspecting some j-tag configuration problem.

    Also, when I try to switch on the Trace option in my Keil uVision IDE the program won't start in debug. It goes to blinking the greed led like crazy and when I stop the execution I can see it's in the HARD_FAULT section.

    Please HELP! :)

Reply
  • Hi,

    I tried replicating this method using my blinky demo and while I get not error messages and the leds are blinking like they should both my UART and RTT are silent?

    What am I doing wrong? 

    I tried setting the uart params:

    #define NRF_LOG_BACKEND_SERIAL_USES_UART 1
    #define NRF_LOG_BACKEND_SERIAL_UART_BAUDRATE 30924800
    #define NRF_LOG_BACKEND_SERIAL_UART_FLOW_CONTROL 0

    Also I have

    #define NRF_LOG_BACKEND_SERIAL_USES_RTT 1

    but this doesn't help.

    I'm suspecting some j-tag configuration problem.

    Also, when I try to switch on the Trace option in my Keil uVision IDE the program won't start in debug. It goes to blinking the greed led like crazy and when I stop the execution I can see it's in the HARD_FAULT section.

    Please HELP! :)

Children
No Data
Related