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

the way of reducing softdevice resource consumption

Hello,

in the new version of sdk (11.0.0) you support s130 only. That means the code contains both peripheral and central implementation. Does it mean that s130 consume more RAM resources than s110 and s120 separately? If so, how to reduce consumption of RAM?

Parents
  • Hi Gerbert,

    It's correct that the minimum RAM required for the S130 actually lower than what was on the S110 or S120.

    The reason for that is that the RAM configured for S130 v2.x is configurable via the sd_ble_enable() function. This is because the number of central, peripheral and encrypted central link that you plan to handle is configurable.

    On earlier softdevice version was fixed, for example the S110 support 1 peripheral links, S120 support 8 central links, S130 v1.x support 3 central links and 1 peripheral link. On S130 v2.x this is flexible. So if you just want the functionality of S110, you can configure the S130 to support only 1 peripheral link, this way you won't waste RAM on the S130.

    Note 1: you can only save RAM, the flash size is fixed

    Note 2: To be able to configure the RAM correctly, you should start first with a dummy RAM configuration, such as ORIGIN = 0x20001f00, LENGTH = 0x6100, and put 0x20001f00 into the p_app_ram_base parameter. Then you run in debug mode and add a breakpoint at the function. After you call the function, you can check the p_app_ram_base again and see what is the actual RAM requirement for the setup you choose. After that you can update the RAM configuration in KEIL.

    We will publish a tutorial with more detail on how to do it soon.

Reply
  • Hi Gerbert,

    It's correct that the minimum RAM required for the S130 actually lower than what was on the S110 or S120.

    The reason for that is that the RAM configured for S130 v2.x is configurable via the sd_ble_enable() function. This is because the number of central, peripheral and encrypted central link that you plan to handle is configurable.

    On earlier softdevice version was fixed, for example the S110 support 1 peripheral links, S120 support 8 central links, S130 v1.x support 3 central links and 1 peripheral link. On S130 v2.x this is flexible. So if you just want the functionality of S110, you can configure the S130 to support only 1 peripheral link, this way you won't waste RAM on the S130.

    Note 1: you can only save RAM, the flash size is fixed

    Note 2: To be able to configure the RAM correctly, you should start first with a dummy RAM configuration, such as ORIGIN = 0x20001f00, LENGTH = 0x6100, and put 0x20001f00 into the p_app_ram_base parameter. Then you run in debug mode and add a breakpoint at the function. After you call the function, you can check the p_app_ram_base again and see what is the actual RAM requirement for the setup you choose. After that you can update the RAM configuration in KEIL.

    We will publish a tutorial with more detail on how to do it soon.

Children
Related