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

How can I find source of problem?

Hi !

I'm trying to debug. I followed this video : https://www.youtube.com/watch?v=uP8RYgYGRvI&list=PLx_tBuQ_KSqGHmzdEL2GWEOeix-S5rgTV&index=7 .  But I can't completely.

the program stop at NRF_BREAKPOINT_COND in app_error_weak.c.

I used breakpoint to understand which function the error occurred after.  I guess there is a problem when setting Uart. What should I do to better interpret the problem? What can be the problem ?

The program enters the following functions respectively:

1- nrf_drv_uart_init(...);

2- nrfx_uart_init(....);

3- interrupts_enable(....)

4- NRFX_IRQ_PRIORITY_SET(nrfx_get_irq_number((void *)p_instance->p_reg), interrupt_priority);

5- nrfx_get_irq_number(.....)

I added the 5 step's photos to explain better

1)

2)

3)

4)

5)

after step 5, the program stop at at NRF_BREAKPOINT_COND in app_error_weak.c

Parents Reply Children
  • cemalb said:
    In fact, this is a project developed on ble_peripheral example. It is not an example of UART or RTT.

    Yes, but which example specifically are you working with? The UART or RTT comment was meant to ask how you display your loggings. 

    cemalb said:
    Is this what you mean? actually, I do not have information on this subject:

    Please check your sdk_config.h file, and look for the following definitions:

    #define NRF_LOG_BACKEND_RTT_ENABLED 1
    
    #define NRF_LOG_BACKEND_UART_ENABLED 0
     
    Which of these are defined to 1? This will determine where your logger outputs its messages, either to a UART terminal, or an RTT terminal (such as RTT Viewer).

    cemalb said:
    the current settings are like this, what should I do ?

    You are in the right place, but please change to display the 'common' configuration in the second window, like shown in my included image - you are currently looking at the 'Release' configuration, and as you can see it only inherits from the 'common' configuration.
    If DEBUG is not already defined in the 'common' configuration, please add it, like shown in the image from my previous comment.

    Looking forward to resolve these issues together,

    Best regards,
    Karl

  • If DEBUG is not already defined in the 'common' configuration, please add it, like shown in the image from my previous comment

    Hi,

    it doesn't defined in the 'common' configuration. I have just defined it. 

    I also looked at sdk_config.h. NRF_LOG_BACKEND_RTT_ENABLED is configured 1.
    NRF_LOG_BACKEND_UART_ENABLED is configured 0.

  • cemalb said:
    it doesn't defined in the 'common' configuration. I have just defined it. 

    Yes, it is not defined there by default. Great! With this in place, you should see detailed error messages output to your logger backend.

    cemalb said:
    I also looked at sdk_config.h. NRF_LOG_BACKEND_RTT_ENABLED is configured 1.
    NRF_LOG_BACKEND_UART_ENABLED is configured 0.

    Are you seeing the logger's outputs in the debug terminal of SES? Or, are you using the RTT Viewer application from Segger?

    Best regards,
    Karl 

  • Are you seeing the logger's outputs in the debug terminal of SES?

    No I don't see anything. 

    When the program runs, all it does is stop at NRF_BREAKPOINT_COND. There is no log information coming to the debug terminal.

  • As I mentioned, the SES debug terminal is an RTT terminal - so if you are going to see the output there, you would need to change back the sdk_config.h definitions you changed earlier, so that the logger uses the RTT backend.
    Try this, and let me know if you then again see your loggers output in the debug terminal.

    Best regards,
    Karl

Related