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

DFU on nrf52832 with S112

Hi,

I am working on the software development of a product based on an nRF52832.

We began our development on the nrf52810 and then moved on to the nRF52832 as it became too limited in resources (dual bank DFU and LE secure connexion were needed).

I ported our firmware to the nRF52832 by updating the flash regions in the project configuration (we use Segger Embedded Studio by the way). The project uses SDK 15.3 with Softdevice S112 6.1.1.

Everything works great, except the Bootloader. We have a BLE bootloader based on the Secure Bootloader example.

When migrating it to the nrf52832, I have used this configuration though I am not completely sure it is the right one :

FLASH_PH_START=0x0
FLASH_PH_SIZE=0x80000
RAM_PH_START=0x20000000
RAM_PH_SIZE=0x10000
FLASH_START=0x78000
FLASH_SIZE=0x6000
RAM_START=0x20002390
RAM_SIZE=0xdc70

I do not wish to move to the S132 softdevice and therefore can not use the Secure Bootloader example for the nrf52832.

This is what happens :

  1. I merge the bootloader with the bootloader settings and the softdevice using mergehex. I also prepare the signed firmware using the key and nrfutil.
  2. I flash this merged bootloader + settings + SD to the device
  3. The device enters DFU mode
  4. I use nrf Toolkit to load the application using the signed firmware (zip file).
  5. The device starts correctly with the firmware running.
  6. From the firmware, I enter DFU mode (by using NRF_PWR_MGMT_SHUTDOWN_GOTO_DFU)
  7. The device enters DFU mode.
  8. I reflash the same signed firmware using nrf Toolkit
  9. I am stuck in DFU mode and the application does not start (even after hard reset).

Does anyone has any idea ?

Regards.

Parents
  • I just figured out what happened:

    I forgot to update the flash_placement.xml file, so the bootloader settings page and MBR related segments were wrong (still based on the nrf52810 configuration).

    Here is the patch that fixed the issue :

    <MemorySegment name="mbr_params_page" start="0x0002E000" size="0x1000">
    -    <ProgramSection alignment="4" keep="Yes" load="No" name=".mbr_params_page" address_symbol="__start_mbr_params_page" end_symbol="__stop_mbr_params_page" start = "0x0002E000" size="0x1000" />
    +  <MemorySegment name="mbr_params_page" start="0x0007E000" size="0x1000">
    +    <ProgramSection alignment="4" keep="Yes" load="No" name=".mbr_params_page" address_symbol="__start_mbr_params_page" end_symbol="__stop_mbr_params_page" start = "0x0007E000" size="0x1000" />
       </MemorySegment>
    -  <MemorySegment name="bootloader_settings_page" start="0x0002F000" size="0x1000">
    -    <ProgramSection alignment="4" keep="Yes" load="No" name=".bootloader_settings_page" address_symbol="__start_bootloader_settings_page" end_symbol="__stop_bootloader_settings_page" start = "0x0002F000" size="0x1000" />
    +  <MemorySegment name="bootloader_settings_page" start="0x0007F000" size="0x1000">
    +    <ProgramSection alignment="4" keep="Yes" load="No" name=".bootloader_settings_page" address_symbol="__start_bootloader_settings_page" end_symbol="__stop_bootloader_settings_page"

    I can now update my firmware several times using the secure DFU.

  • can you please tell the whole process, i am facing the same issue

Reply Children
No Data
Related