The SoftDevice can be enabled by the bootloader.
The bootloader can enable the SoftDevice through the following step-by-step procedure:
- Issuing a command for MBR to forward interrupts to the SoftDevice using
sd_mbr_command() with SD_MBR_COMMAND_INIT_SD.
- Issuing a command for the SoftDevice to forward interrupts to the bootloader using
sd_softdevice_vector_table_base_set(uint32_t address) with
BOOTLOADERADDR as parameter.
- Enabling the SoftDevice using sd_softdevice_enable().
The bootloader can transfer the execution from itself to the application through the following step-by-step procedure:
- Issuing a command for MBR to forward interrupts to the SoftDevice using sd_mbr_command() with
SD_MBR_COMMAND_INIT_SD, if interrupts are not forwarded to the SoftDevice.
- Issuing sd_softdevice_disable(), to ensure that the SoftDevice is disabled.
- Issuing a command for the SoftDevice to forward interrupts to the application using
sd_softdevice_vector_table_base_set(uint32_t address) with
APP_CODE_BASE as a parameter.
- Branching to the application Reset Handler as specified in the Application Vector Table.