This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DFU secure bootloader loads softdevice in application area

Hi,

I used command:

nrfutil pkg generate --softdevice s130_nrf51_2.0.1_softdevice.hex --hw-version 51 --key-file private.pem sd130v2.0.1_update.zip

to generate package for only softdevice update (nrfutil version 3.3.2). Next I used nRF Connect to update my custom device and realized that bank0 area in bootloader settings is clear (no application image size, crc and bank code) and softdevice was loaded in application area: image description

(UP - beginning of application area, DOWN - memory area after MBR)

Could you help me with this issue? I'd like to update only softdevice, if it's possible.

Thx, Wojtek

  • Which nRF51 variant are you using? If there is not enough flash space to store both the application and the new SoftDevice image in addition to the bootloader and the old SoftDevice, then the application will be erased and the new softdevice will be placed in the application region, i.e. bank 0.

  • I have nRF51 QFAC (32 kB flash).

    Memory organization:

    • 0 - 0x1B000: s130,
    • 0x1B000 - 0x37C00: my application (but program ends at 0x28400 according to output from nrfjprog),
    • 0x37C00 - 0x3CC00: DFU secure bootloader,
    • 0x3CC00 - 0x3D000: bootloader settings,
    • 0x3D000 - 0x40000: untouchable piece of garbage.

    So, as I understand, when I'm updating SD, it is written into application area if I have not enough memory? Where should I have this free space? How much is it "enough"? Is there any place, where may I read about this DFU behaviour?

  • Hi Wojtek, you can read about the update procedure here.

    In your specific case the available flash for storing the new SoftDevice in Bank 1 alongside the application will be Bootloader Start Address - Address of first flash page after Application End Address`--> 0x37C00 - 0x29000 = 0xEC00 = 59kB. The S130 v2.0.x needs 104kB so the bootloader is forced to use the combined space of Bank0 and Bank1, i.e. Bootloader Start Address - Application Start Address( 0x37C00 - 0x1B000 = 0x1CC00 = 115 kB).

Related