FOTA Application Startup

Hello there,

How can RSL10 Application FW understand that FOTA is happened?
I’m trying to implement some logic that should be done only after the FOTA.
Could you please suggest how to do it? Is there any flag set that FOTA is done? or basically after FOTA the soft reset is happened?

Thanks in advance.

Welcome to the Community Forum!

Per the FOTA User’s Guide:

When the whole image is programmed successfully, the DFU component
marks the new application as valid and performs a restart.

So there’s a restart after the process is done and no flag to the existing application that the image has been updated before that restart which will launch the new application.

Hello Jamie,

Thank you for answering, yes, I saw it in the manual.
But it’s not clearly mentioned what is the “restart” means.

What I see that after successful FOTA the application starts from main() .
I believe that after successful FOTA some kind of “software reset is happened”.
From RSL10 HW reference I see different source of Resets, but nothing clearly related to the FOTA.

Best regard

A restart results in the entire boot process described in section 3.2 of the FOTA User’s Guide being followed. So following a FOTA update, the bootloader is executed and it looks for a valid application. It should find the application that was just newly installed and execute it starting from the new main().

If you’re looking at the RSL10 registers that indicate the cause of the reset, I believe you’ll see CM3_SW_RESET_FLAG set. However the existence of this reset does not necessarily mean that the software reset was issued due to a FOTA update. That is application dependent on whether other events may cause the application to issue a reset.

If you want an application to be able to check for whether it’s a new version or not, I may suggest having the application store it’s revision in NVM. When the application starts it can check the version in NVM against it’s own version and if the values don’t match, execute the special code you want to run, and then update the value in NVM.

As I understood the most appropriate is NVM1 starting from 0x00080008 is this correct?
Since previous is used by SYS_INFO_START_ADDR and SYS_INFO_START_MEM_CFG

Thank you

Correct - NVM1 is for application specific storage with the first two 32-bit words pre-defined.