Nordic stack and drivers for the mbed BLE API Modified for HRM1017 for library 0.1.0
Fork of nRF51822 by
Functions
[SoftDevice Manager API]
Functions | |
SVCALL (SD_SOFTDEVICE_ENABLE, uint32_t, sd_softdevice_enable(nrf_clock_lfclksrc_t clock_source, softdevice_assertion_handler_t assertion_handler)) | |
Enables the SoftDevice and by extension the protocol stack. | |
SVCALL (SD_SOFTDEVICE_DISABLE, uint32_t, sd_softdevice_disable(void)) | |
Disables the SoftDevice and by extension the protocol stack. | |
SVCALL (SD_SOFTDEVICE_IS_ENABLED, uint32_t, sd_softdevice_is_enabled(uint8_t *p_softdevice_enabled)) | |
Check if the SoftDevice is enabled. | |
SVCALL (SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET, uint32_t, sd_softdevice_vector_table_base_set(uint32_t address)) | |
Sets the base address of the interrupt vector table for interrupts forwarded from the SoftDevice. |
Function Documentation
SVCALL | ( | SD_SOFTDEVICE_ENABLE | , |
uint32_t | , | ||
sd_softdevice_enable(nrf_clock_lfclksrc_t clock_source, softdevice_assertion_handler_t assertion_handler) | |||
) |
Enables the SoftDevice and by extension the protocol stack.
Idempotent function to enable the SoftDevice.
- Note:
- Some care must be taken if a low frequency clock source is already running when calling this function: If the LF clock has a different source then the one currently running, it will be stopped. Then, the new clock source will be started.
- This function has no effect when returning with an error.
- Postcondition:
- If return code is NRF_SUCCESS
- SoC library and protocol stack APIs are made available
- A portion of RAM will be unavailable (see relevant SDS documentation)
- Some peripherals will be unavailable or available only through the SoC API (see relevant SDS documentation)
- Interrupts will not arrive from protected peripherals or interrupts
- nrf_nvic_ functions must be used instead of CMSIS NVIC_ functions for reliable usage of the softdevice.
- Interrupt latency may be affected by the SoftDevice (see relevant SDS documentation)
- Chosen low frequency clock source will be running
- Parameters:
-
clock_source Low frequency clock source and accuracy. (Note: In the case of XTAL source, the PPM accuracy of the chosen clock source must be greater than or equal to the actual characteristics of your XTAL clock). assertion_handler Callback for SoftDevice assertions.
- Return values:
-
NRF_SUCCESS NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION SoftDeviceinterrupt is already enabled, or an enabled interrupt has an illegal priority level NRF_ERROR_SDM_LFCLK_SOURCE_UNKNOWN Unknown low frequency clock source selected
SVCALL | ( | SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET | , |
uint32_t | , | ||
sd_softdevice_vector_table_base_set(uint32_t address) | |||
) |
Sets the base address of the interrupt vector table for interrupts forwarded from the SoftDevice.
This function is only intended to be called when a bootloader is enabled.
- Parameters:
-
[in] address The base address of the interrupt vector table for forwarded interrupts.
- Return values:
-
NRF_SUCCESS
SVCALL | ( | SD_SOFTDEVICE_IS_ENABLED | , |
uint32_t | , | ||
sd_softdevice_is_enabled(uint8_t *p_softdevice_enabled) | |||
) |
Check if the SoftDevice is enabled.
- Parameters:
-
[out] p_softdevice_enabled If the SoftDevice is enabled: 1 else 0.
- Return values:
-
NRF_SUCCESS
SVCALL | ( | SD_SOFTDEVICE_DISABLE | , |
uint32_t | , | ||
sd_softdevice_disable(void) | |||
) |
Disables the SoftDevice and by extension the protocol stack.
Idempotent function to disable the SoftDevice.
- Postcondition:
- SoC library and protocol stack APIs are made unavailable.
- All interrupts that was protected by the SoftDevice will be disabled and initialized to priority 0 (highest).
- All peripherals used by the SoftDevice will be reset to default values.
- All of RAM become available.
- All interrupts are forwarded to the application.
- LFCLK source chosen in sd_softdevice_enable will be left running.
- Return values:
-
NRF_SUCCESS
Generated on Tue Jul 12 2022 14:12:02 by 1.7.2