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

SoftDevice does not call the registered callback

I am using the following code during stack initialization: // Register with the SoftDevice handler module for BLE events. err_code = softdevice_ble_evt_handler_set(ble_evt_dispatch);

On starting advertising, I can see my board on the nRF MCP app. I try to connect to the board using the MCP app, the app shows connected, I can also disconnect and connect again. In all this, the "ble_evet_dispatch" should be called but it never does! Could someone please help me reason why?

  • I can send you my .c file with proprietary information removed. Would not be able to send the whole project as it already contains a lot of proprietary information. Will that help? How do I send it to you?

  • I am nordic employee and I have an NDA when you share information with me. So it is still ok to send me proprietary information. Ill send you pvt msg on more info. I am suspecting some thing is wrong in your proprietary code, so ripping it off might hide the problem.

    I would try to debug and step into the function softdevice_sys_evt_handler_set to see if the sys handler has been successfully set inside softdevice. And after that I will set a breakpoint in softdevice_handler.c: SOFTDEVICE_EVT_IRQHandler to see if this is getting called at all or not? if not then we should figure out if there are any other higher priority tasks in your proprietary protocol which is starving this task.

  • After further investigation I found out that it is dependent of RAM usage settings. When I change the base address for the APP to a greater value, it works fine. Now, I want to know what is the right value of the IRAM1 "start" address. All examples in the SDK use the address 0x20001D80 but the S132 documentation suggests that APP_RAM_BASE should be min 0x200022D8 when S132 is used. Which one is correct and why? BTW, for me it works when the IRAM1 start address is set to 0x200022D8 in the project settings in Keil. The value 0x20001D80 that is used by the example projects is not mentioned anywhere in the documentation.

  • Hi,

    The RAM base address is defined by the settings in your sd_softdevice_enable. Since some of the features are runtime configurable, please read the migration documents which explains very clearly of what RAM base setting you need to use.

    Migration document can be found in the zip file here. In migration document it give you an example how to find the RAM base address.

  • It has been a year now, but is there a solution to this? I have the same probleme :\

Related