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

array size increase causes bluetooth to not connect.

Hello once again Nordic Pro's,

My latest issue, I believe to be related to stack/heap settings, but dont have enough information to track/correct.

I have a couple int array variables that, if their size is increased above 105 elements, bluetooth no longer connect to our central test board.

Not sure where to start chasing this  as I have no compile, build or load error messages, just a failure to connect.

Any help in chasing this down is greatly appreciated.

Device: 51822,

SDK: 12.3,

IDE: Keil 5.28,

App based on app_ble_uart peripheral.

Thanks again,

Robin @ TL

Parents Reply
  • Hi,

    Maximum call stack usage by SoftDevice is 1536 bytes (0x600), according to SoftDevice Specification (see the section Memory resource requirements.) This is taken from the call stack which is shared between SoftDevice and application. See Memory resource map and usage, for details on how RAM is divided between MBR, SoftDevice, Application, Heap (if present) and Call Stack.

    If you use the SoftDevice Handler library from nRF5 SDK v12, the call to softdevice_enable() will output the minimum APP_RAM_BASE if logging and DEBUG are enabled. If enabling the SoftDevice directly with sd_ble_enable() you can check the value pointed to by the p_app_ram_base argument after the call, as it gets updated with the minimum APP_RAM_BASE for the given SoftDevice configuration. In both cases, the rest of RAM (above APP_RAM_BASE) is for application, heap and call stack.

    Regards,
    Terje

Children
No Data
Related