S115 SoftDevice for nRF54LV10 API documentation 10.0.0
Loading...
Searching...
No Matches

◆ sd_ble_enable()

uint32_t sd_ble_enable ( uint32_t * p_app_ram_base)

#include <ble.h>

Enable the BLE stack.

Parameters
[in,out]p_app_ram_basePointer to a variable containing the start address of the application RAM region (APP_RAM_BASE). On return, this will contain the minimum start address of the application RAM region required by the SoftDevice for this configuration.
Warning
After this call, the SoftDevice may generate several events. The list of events provided below require the application to initiate a SoftDevice API call. The corresponding API call is referenced in the event documentation. If the application fails to do so, the BLE connection may timeout, or the SoftDevice may stop communicating with the peer device.
Note
The memory requirement for a specific configuration will not increase between SoftDevices with the same major version number.
At runtime the IC's RAM is split into 2 regions: The SoftDevice RAM region is located between 0x20000000 and APP_RAM_BASE-1 and the application's RAM region is located between APP_RAM_BASE and the start of the call stack.

This call initializes the BLE stack, no BLE related function other than sd_ble_cfg_set can be called before this one.

Relevant Message Sequence Charts
BLE Stack Enable
Return values
NRF_SUCCESSThe BLE stack has been initialized successfully.
NRF_ERROR_INVALID_STATEThe BLE stack had already been initialized and cannot be reinitialized, or the random number generator has not been seeded. See sd_rand_seed_set.
NRF_ERROR_INVALID_ADDRInvalid or not sufficiently aligned pointer supplied.
NRF_ERROR_NOT_SUPPORTEDThe number of concurrent connections configured (ble_gap_conn_cfg_t::conn_count) is less than the configured connection count (ble_gap_cfg_role_count_t).
NRF_ERROR_NO_MEMOne or more of the following is true:
  • The amount of memory assigned to the SoftDevice by *p_app_ram_base is not large enough to fit this configuration's memory requirement. Check *p_app_ram_base and set the start address of the application RAM region accordingly.
  • Dynamic part of the SoftDevice RAM region is larger then 64 kB which is currently not supported.