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!

Related