Can I use SVC function to copy bootloader image during FOTA?

Can I use SVC function in my application code to copy bootloader image into flash instead of using mbr commands? If this is not possible, what are the other alternative options to update the bootloader?

This is required since we have a power constraint during FOTA and flash write/erase APIs in MBR fuñctions cannot be modified to allow this.

Parents
  • Hi,

    What is possible depend on SDK version. What SDK and which version of that SDK have you built your project on?

    Modifying the MBR is, as you write, not possible.

    Doing the flash swap operations from the application could be possible, although very risky, as long as you do not need to use that mechanism for replacing the application itself. In any case you do get a time window where power loss bricks the device.

    Can you elaborate on the power constraints? The feasibility of doing the flahs operations from the app depend on this (in addition to SDK version etc.) There might be other, better, workarounds.

    Regards,
    Terje

  • Hi Terje,


    Sorry for the late response. This activity was put on hold and so couldn't follow up.

    Thank you for the response. I am using the latest SDK version along with secure bootloader project. The application is built using older SDK. Probably 14.0 version (not sure how to confirm this). We are using nrf52832 which takes its power from a capacitor bank. Hence, the average current must be less than 300 uA. We have implemented sleep conditions in our application which takes care of average power.- Is it possible to get a MBR where the delays can be implemented so that average current consumptions can be reduces. The nrf52832 chip is currently used in extremely low power applications. 

    I have also tried to port the flash swap operations to application. However, its not working as expected. I have set the NRF_DFU_IN_APP in bootloader project so that settings page can be written in application. However, i still have unexpected problems when writing the settings related pages.

    Regards,

Reply
  • Hi Terje,


    Sorry for the late response. This activity was put on hold and so couldn't follow up.

    Thank you for the response. I am using the latest SDK version along with secure bootloader project. The application is built using older SDK. Probably 14.0 version (not sure how to confirm this). We are using nrf52832 which takes its power from a capacitor bank. Hence, the average current must be less than 300 uA. We have implemented sleep conditions in our application which takes care of average power.- Is it possible to get a MBR where the delays can be implemented so that average current consumptions can be reduces. The nrf52832 chip is currently used in extremely low power applications. 

    I have also tried to port the flash swap operations to application. However, its not working as expected. I have set the NRF_DFU_IN_APP in bootloader project so that settings page can be written in application. However, i still have unexpected problems when writing the settings related pages.

    Regards,

Children
Related