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
  • Hello,

    Are you working on an example from the SDK? If so, which example is this?
    Are you using the RTT or UART logger backend?

    Could you also confirm for me that you have DEBUG defined in your preprocessor defines, like shown in the included image?

    This will print a detailed error message to your logger output, if a non-NRF_SUCCESS error is passed to an APP_ERROR_CHECK.

    Looking forward to resolving this issue together!

    Best regards,
    Karl

Reply
  • Hello,

    Are you working on an example from the SDK? If so, which example is this?
    Are you using the RTT or UART logger backend?

    Could you also confirm for me that you have DEBUG defined in your preprocessor defines, like shown in the included image?

    This will print a detailed error message to your logger output, if a non-NRF_SUCCESS error is passed to an APP_ERROR_CHECK.

    Looking forward to resolving this issue together!

    Best regards,
    Karl

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

     

    Are you using the RTT or UART logger backend?

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

    Could you also confirm for me that you have DEBUG defined in your preprocessor defines, like shown in the included image?

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

  • 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.

Related