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

NRF_LOG_INFO return NRF_BREAKPOINT_COND;

Hello all, 

 i am using ble_app_uart example.I add the line 

	NRF_LOG_INFO("Hello!");

in the begining of  the main function. All the ble connection works, but putty shows strange characters as you can see bellow 

I configured putty as follows

My sdk_config is attached. 6562.sdk_config.h

Thanks!

  • Hello,

    I see that you have enabled both the UART and RTT backend. Can you try to monitor the RTT LOG? Does it say anything? If it says "Fatal error.", can you add DEBUG to your preprocessor definitions? If you are not sure how to do this, please let me know what IDE you are using.

    Can you please try to change:

    #define NRF_LOG_BACKEND_UART_ENABLED 1
    to
    #define NRF_LOG_BACKEND_UART_ENABLED 0

  • Hello Edvin, 

    thanks for reply.

    I am using Kiel, SDK15.3 and PCA10040 DK board. 

    I dont know how to monitor RTT Log, but i will change the definitions of NRF_LOG_BACKEND_UART_ENABLED to 0

  • You can use Segger's RTT viewer, which is probably already installed if you have downloaded Segger JLink. If not, you can either download Segger JLink.

    If you started out with the ble_app_uart example, then the issue is probably that you are already using the UART when you call log_init(), and then later, when the application tries to initialize the UART which is used in the application, it returns an error. Since this is before you get the time to print much in the log, before it resets, you see this behavior.

    Try to get the RTT viewer up and running, and see if it helps to disable the UART log backend.

    FYI, when you run the RTT viewer, you should set it up something like this:

    BR,

    Edvin

  • Hello Edvin, 

    redefining NRF_LOG_BACKEND_UART_ENABLED to 0 solved my problem. I also were stupid to add NRF_LOG_INFO before init_log() function.  

    But because i am merging this code with twi, another problem appeared. If i comment all lines regarding twi, the program works, but if i add twi, the same behavior on putty happens. 

    Any tips?

Related