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

s132_nrf52_2.0.0-4.alpha sd_ble_enable

Hi, The function sd_ble_enable(ble_enable_params_t * p_ble_enable_params, uint32_t * p_app_ram_base) requires now the application RAM base address! Is it 0x20002800?

Parents
  • Hi RG,

    From the version of softdevice you mentioned. The RAM usage by softdevice has changed.

    1. SoftDevice(SD) needs fixed amount of RAM memory that is fully dedicated for it.

    2. SD also needs RAM memory per connection (central and/or peripheral).

    3. SD also needs RAM memory for SMP per link.

    4. SD also needs RAM memory for attribute table size.

    5. is fixed and cannot be changed, but the amount of ram SD needs for 2,3 and 4 is variable on the application use case.

    So efforts have been taken that it does not reserve more RAM than it needs and this is dependent on how many links you need on your device (all details are passed in p_ble_enable_params argument in sd_ble_enable call).

    So if you gave the value for p_app_ram_base too less and this value overlaps with softdevice RAM space for the given configuration in p_ble_enable_params, then this call would return an error and writes the pointer p_app_ram_base with value where it expects the app RAM base needs to be started for the configuration given.

    So, if you do not know what value to set in p_app_ram_base, then make the pointer to point to small value or zero and the sd_ble_enable would fail with error NRF_ERROR_DATA_SIZE and the argument pointer will be updated with value what it should be set to.

  • I am sorry, just verified, you should be able to do observing and broadcasting with all roles set to 0. The assert which you are seeing is a known issue and it is documented in the release notes for this softdevice revision

    GAP

    Specifying a total connection count of 0 (0 peripheral connections and 0 central connections) in sd_ble_enable() leads to a SoftDevice assert (DRGN-6613).

Reply Children
No Data
Related