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

Problem 'stopped by vector catch' in allocating RAM when I added a new ble service" (nrf52840 sdk15.3.0)

Hello,everyone

I want to add dfu service in UART example ,but when I tried to allocate the RAM,Debug terminal shows nothing,Then I set the breakpoint in nrf_sdh_ble.c and debugging,I can't enter the C file,

After I set breakpoint in main.c,I found that when debug goes to "ble_stack_init();",It will be block and I can't do anything,like the images:

1.before  debug "ble_stack_init();"

2.after  debug "ble_stack_init();"

it shows"restricted memory" in Watch,and The window "output" shows"stopped by vector catch",If I start"built and run" directly,It can succeed,but I think it doesn;t make anythings,Finally,I see maybe I can use app_error_handler_bare(), unfortunately I don't know how to use it.could you please give me some help? thanks!

best regards,

zhong

  • Hi,

    This thread started with correcting the memory configuration of the application and SoftDevice, to allow you to add more services. That seems to not be the current issue?

    If you don't get any errors but still don't see the DFU service there are two possible reasons that comes to mind:

    • You do not actually initialize the DFU service. Can you verify that you do, and possibly upload your code so that I can check it?
    • Another possible explanation is that even if you have added the DFU service is might not show up in your phone as it may have cached the services. In that case you could remove the device from your phone and toggle airplane mode on and off before reconnecting. This way you know that it will perform a new service discovery.
  • Hi Einar,

    I fail in last step.I want to use dfu service to update.The progress bar is becoming 100% and nothing happened,The update file I use is blinky_example.I think if I can start OTA service.maybe it's not the problem about the update file,so what should I do?like the image, it can't be finished,and then it will return to the original service(UART service with dfu service) automatically,Thanks for your patient.

    best regards

    zhong

  • Hi Zhong,

    I see. Since you are able to transfer the image, you have successfully entered DFU mode in the bootloader. Therefor this issue is not related to the DFU service.

    Can you test with a debug bootloader, and upload the RTT log to this case? The bootloader has extensive logging, so the log should hopefully tell us more about what is going on.

  • Hi,Einar,

    I tested with a debug bootloader,it's named DfuTarg,but the same situation occured,it's always in 100% and then back to the orignal service(dfuTarg), and now i'm using the macos and I don't know how to get the RTT log. could you please tell me how to get the RTT log and I will update it quickly.

    best regards,

    zhong

  • Hi,

    The debug bootlaoder use RTT logging by default, so you just need to connect a J-link debugger (unless you use the DK, which has one onboard) and start the J-Link RTT Viewer. This should have allready been installed on your computer, assuming you use Windows and have installed nRF5 Command Line Tools.

Related