This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to debug print on Rigado BMD-200?

Hi everyone,

I am using the nRF51 SDK 10.0 with the Rigado BMD-200 Evaluation Kit and want to print debug messages to UART or something similar.

I am trying from main my main function with

void debug_log_init() {
#ifdef ENABLE_DEBUG_LOG_SUPPORT
	// Initialize module
	app_trace_init();
app_trace_log("nRF51 booting.\r\n");
#endif
}

Then I am using miniterm on OSX with the following settings:

--- Miniterm on /dev/cu.usbmodem142311: 38400,8,N,1 ---

But I see nothing. No debug prints or anything.

Update 1: I made sure that ENABLE_DEBUG_LOG_SUPPORT is turned on, so that is definitely not the problem.

Update 2: So according to Rigado's guide at www.rigado.com/.../BMD-200-EVAL-UG-V1.0.pdf, flow control is always on. In my custom_board.h I have:

#define RX_PIN_NUMBER  9
#define TX_PIN_NUMBER  10
#define CTS_PIN_NUMBER 3
#define RTS_PIN_NUMBER 2
// Hardware flow control.
#define HWFC           true

And then on OSX I used

screen -f /dev/cu.usbmodem1a121 38400

to try and display the output. The -f should turn on the flow control (according to developer.apple.com/.../screen.1.html). However that still did not work. Screen remains entirely empty.

I also tried it with CTS and RTS swapped since Rigado's guide is ambiguous to me which of the two should be RTS and which one CTS, but that does not work other with all other things unchanged.

What am I doing wrong? How can I print stuff?

  • Is ENABLE_DEBUG_LOG_SUPPORT defined globally in the preprocessor symbols? app_trace_log is defined as printf if so.

  • Yes, I tried with:

    void debug_log_init() {
    #ifdef ENABLE_DEBUG_LOG_SUPPORT
    #pragma message "ENABLE_DEBUG_LOG_SUPPORT on."
      // Initialize module
      app_trace_init();
      app_trace_log("nRF51 booting.\r\n");
    #endif
    }
    

    ENABLE_DEBUG_LOG_SUPPORT is turned on and the preprocessor message is printed during compilation

  • The board is using other pins for TX and RX. Change

    #define RX_PIN_NUMBER  11
    #define TX_PIN_NUMBER  9
    

    To

    #define RX_PIN_NUMBER  9
    #define TX_PIN_NUMBER  10
    

    Based on the BMD-200 reference design. If you enable hardware flow control, make sure to change those pin definitions aswell.

  • Also, depending on your JLink driver version, it requires RTS to be low before it will acknowledge any received data on the RX line of the JLink CDC UART connection. Try enabling Hardware Flow Control on the PC side UART. I believe this is fixed in one of the 5.0+ JLink driver versions but I do not remember which off hand.

    Hope this helps, Eric

  • So according to Rigado's guide at www.rigado.com/.../BMD-200-EVAL-UG-V1.0.pdf, flow control is always on. In my custom_board.h I have:

    #define RX_PIN_NUMBER  9
    #define TX_PIN_NUMBER  10
    #define CTS_PIN_NUMBER 3
    #define RTS_PIN_NUMBER 2
    // Hardware flow control.
    #define HWFC           true
    

    And then on OSX I used

    screen -f /dev/cu.usbmodem1a121 38400
    

    to try and display the output. However that still did not work.

    I also tried it with CTS and RTS swapped since Rigado's guide is ambiguous to me which of the two should be RTS and which one CTS, but that does not work other with all other things unchanged.

Related