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

debuging the nrf break point

hello,

i am using nrf52840 with coded phy in our customised board and using the long range example as base for my application i have changed the ble_app_blinky to act as a pheripheral and usng that central example as it is and i am getting the long range and rssi values but my problem is after running it for 5 min my code goes to nrf break point in central side how can i resolve these kind of issues,?what debugging methods i should use??

thanks and regards

manikandan v

Parents
  • Hello manikandan v,

    Please see the suggestions by me and @awneil in your other ticket: https://devzone.nordicsemi.com/f/nordic-q-a/73304/regarding-spi-communication
    The methods we suggest here - using the debugger to step through the code, and defining DEBUG to have the logger print detailed error messages - are two of the most common and successful ways of debugging your code.
    Let us continue this general debugging issue in the other ticket.

    Best regards,
    Karl

  • thanks for your reply now i can debug my issue is this

    logs dropped (1)[0m
    [00:00:03.581,970] <debug> app: Disconnected: reason 0x13.
    [00:00:03.687,103] <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at C:\folder\nRF5_SDK_15.0.0_a53641a\examples\my projects\nRF52-ble-long-range-demo\central_long_range_demo_kit\main.c:792
    PC at: 0x0002EA59
    [00:00:03.687,652] <error> app: End of error report

    how can i resolve this i want to run my application smoothly wiithout any issues

    thanks and regards 

  • manikandan said:
    thanks for your reply now i can debug my issue is this

    Great! I am happy to hear that you are now able to debug your issues.

    manikandan said:
    how can i resolve this i want to run my application smoothly wiithout any issues

    When an error report is posted, you can look at the function on the line specified in the report. From the error message above, you see that the error was triggered on line 792 of main.c.
    What function returned the NRF_ERROR_NO_MEM on this line?
    The next thing we do is to check the API Reference for this function, to see why it would return the NRF_ERROR_NO_MEM, and then fix this issue. As an example, if the error was returned from a call to sd_ble_enable we could see the following in its API Reference:

    NRF_ERROR_NO_MEM One or more of the following is true:
    • The amount of memory assigned to the SoftDevice by *p_app_ram_base is not large enough to fit this configuration's memory requirement. Check *p_app_ram_base and set the start address of the application RAM region accordingly.
    • Dynamic part of the SoftDevice RAM region is larger then 64 kB which is currently not supported.

    We would then know what to check and fix, to resolve this error.

    Keep in mind that I do not have your code, so I do not know what is on your line 792, you will need to check this yourself.

    Best regards,
    Karl

Reply
  • manikandan said:
    thanks for your reply now i can debug my issue is this

    Great! I am happy to hear that you are now able to debug your issues.

    manikandan said:
    how can i resolve this i want to run my application smoothly wiithout any issues

    When an error report is posted, you can look at the function on the line specified in the report. From the error message above, you see that the error was triggered on line 792 of main.c.
    What function returned the NRF_ERROR_NO_MEM on this line?
    The next thing we do is to check the API Reference for this function, to see why it would return the NRF_ERROR_NO_MEM, and then fix this issue. As an example, if the error was returned from a call to sd_ble_enable we could see the following in its API Reference:

    NRF_ERROR_NO_MEM One or more of the following is true:
    • The amount of memory assigned to the SoftDevice by *p_app_ram_base is not large enough to fit this configuration's memory requirement. Check *p_app_ram_base and set the start address of the application RAM region accordingly.
    • Dynamic part of the SoftDevice RAM region is larger then 64 kB which is currently not supported.

    We would then know what to check and fix, to resolve this error.

    Keep in mind that I do not have your code, so I do not know what is on your line 792, you will need to check this yourself.

    Best regards,
    Karl

Children
  • thanks i can  resolved the issue but i want to know how can i change the ram size for sofdevice 132 is there any documentation regarding this?

    thanks and regards

    manikandan v

  • I am happy to hear that you now are able to resolve the issue! :) 

    You can change the RAM size by changing the Section Placement Macros found in the Linker tab of the Common configuration options (same options where you added the DEBUG define in your Preprocessor tab).
    If you change your loggers default debug level to 4, and change the nrf_sdh_ble log level in the sd_config.h - NRF_SDH_BLE_LOG_LEVEL - to 4, then it will print out in the logger the appropriate value you should change your SoftDevice RAM start to, along with the NRF_ERROR_NO_MEM error message.

    Please do not hesitate to open a new ticket if you should encounter any issues or questions in the future.

    Good luck with your development!

    Best regards,
    Karl

Related