Update Application with SPI flash

Hi,

I have used DFU to update my application and worked normally. Now I need to update the application which has be written in NOR flash.

Firstly, I will write the application file in NOR flash in old application. The size of application is over 40k, so I need to jump to bootloader.

How can I jump to bootloader in application and what should I do in bootloader next?

Thanks!

SDK 17.02 

nRF52810 

secure_bootloader_s112

  • Hi,

    How can I jump to bootloader in application

    We do not provide any examples of jumping from application to bootloader, the SDK examples uses one of the supported DFU enter metods, and reset the chip. On boot, the bootloader will always run first and only jump to the application if the DFU enter methods are not set.

    what should I do in bootloader next?

    The bootloader does not support storing application updates in external flash. You will have to rewrite the bootloader to store the received update chunks in the SPI flash and copy it back to internal flash from the external flash once the entire image is received and verified.

    Best regards,
    Jørgen

  • Hi ,

    I'll download application to external flash and then reset my system in order to into bootloader. And I will replace application with external flash codes next. So I want to know how to "eplace application with external flash codes" in bootloader.

  • Hi,

    The standard bootloader will either store the new image in a second slot in internal flash (dual bank updates), or erase the current application before receiving the new image into the application slot (single bank updates). With dual bank updates, the new image is copied from secondary slot to primary slot after complete image have been received and verified, before it can be run.

    What you need to do is to rewrite the bootloader to store the image into external flash instead of the internal second slot. When the image is received and verified, you can copy the image from external flash to the primary slot before it can be run. Unfortunately, we do not have any examples showing this in nRF5 SDK.

    Best regards,
    Jørgen

Related