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

Integrating BLE NUS APIs into the application but the program ends up getting into MBR

I plan on writing my own service (similar to NUS) but prior to that, I'd want to use all the existing APIs for initializing the GATT and BLE stack at least


I'm calling the APIs in a similar fashion as in ble_app_uart app, but when I run in the debug mode, the application seems to get stuck somewhere inside 

nrf_ble_qwr_init().

The second time I ran the app with more breakpoints around 

nrf_ble_qwr_init(), then I see app getting stuck on the memset itself though the addresses it's pointing at match with the previous case.

   // Initialize Queued Write Module.
    qwr_init.error_handler = nrf_qwr_error_handler;

    err_code = nrf_ble_qwr_init(&m_qwr, &qwr_init);
    APP_ERROR_CHECK(err_code);

    // Initialize NUS.
    memset(&nus_init, 0, sizeof(nus_init)); 





The second address A60 refers to somewhere in the MBR whereas the first one somewhere in the application? If I keep stepping in, it looks like the execution goes back to address 0x00 and starts incrementing...


Sorry, I have had a lot of similar issues and I'm yet to figure out how to narrow down these issues at least and be able to solve them. 


Any help is appreciated!

Parents Reply
  • For now, at least I wanted to use the exact same APIs from the ble_uart existing app from the SDK and be able to run it fine prior to starting writing my custom service. 

    I suggest to start from HRS service, it is explained better than NUS (as you can see from the tutorial link)

    Do you see why does the program enter into MBR? How we can determine what's actually causing it based on the address value shown?

    If you are running the example without modifications, there will be something missing out of the code.

    Do you programmed the softdevice and the application with the right memory addresses (ROM and RAM)?

Children
No Data
Related