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

Sequence for Bootloader to configure SoftDevice

Hi,

In our existing project, it has a Bootloader and MBR, but no SoftDevice. Transport is UART for DFU.

I need to port the Bootloader to work on another project that uses SoftDevice.

I read that Bootloader needs to configure SoftDevice by calling the APIs.

I have 2 questions:

1. What are the things in SoftDevice that need to be configured by the Bootloader? Or, what is the right sequence for Bootloader to initialize and configure SoftDevice?

2. In the Bootloader sct file, the start address is 0xD6000, and the size is 0x1A000. But when I checked the hex file, the address ended at 0xE7000, while according the sct file, it ends at 0xF0000. The Bootloader settings location is at 0xEF000. Should I move it to be higher than 0xF0000?

Thanks.

  • Hi,

    Harry said:
    1. When sd_softdevice_vector_table+base_set() is used?

    It is used when changing the vector table forwarding between the bootloader and the application, for instance in the buttonless DFU service implementations (ble_dfu_bonded.c and ble_dfu_unbonded.c, implemented in nrf_dfu_svi.c). It is also used to forward interrupts to the bootloader if it entering BLE DFU mode. (It is not used/needed to forward interrupts to the application at boot since this is the default configuration of the SoftDevice.)

    Harry said:
    2. Do I need to manually call nrf_dfu_mbr_irq_forward_address_set(), or Bootloader in the SDK has called it?

    Yes, but I assume you already do that in your existing bootloader, so no change is needed here. It should always forward to address 0x1000, which is either the start address of your application or the SoftDevice.

Related