Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Wi-Fi Combo Forum Discussions

HiIg_4537276
Level 3
Level 3
First like given

Hello

I have a question about the implementation of "apps \ waf \ ota2_bootloader \ ota2_bootloader.c" in the sample code.

When "ota2_failsafe_app_load" is called, the following processing is performed.

------------------------------

    / * Check boot_type FAILSAFE-if so, use ota2_failsafe to recover * /
    BOOTLOADER_PRINTF (("Bootloader: boot_type =% d! \ R \ n", dct_ota2_config.boot_type));
    if ((dct_ota2_config.boot_type == OTA2_BOOT_FAILSAFE_FACTORY_RESET) ||
        (dct_ota2_config.boot_type == OTA2_BOOT_FAILSAFE_UPDATE))
    {
        uint32_t entry_point;
        platform_led_set_state (PLATFORM_RED_LED_INDEX, WICED_LED_ON);
        platform_led_set_state (PLATFORM_GREEN_LED_INDEX, WICED_LED_ON);

        if (ota2_failsafe_app_load (OTA2_IMAGE_FAILSAFE_APP_AREA_BASE, & entry_point) == WICED_SUCCESS)
        {
            platform_led_set_state (PLATFORM_GREEN_LED_INDEX, WICED_LED_OFF);
            wiced_waf_start_app (entry_point);
        }
    }

------------------------------

If "OTA2_BOOT_FAILSAFE_FACTORY_RESET" or "OTA2_BOOT_FAILSAFE_UPDATE"
I think "ota2_failsafe_app_load" is called and failsafe is implemented
Please tell me how "OTA2_BOOT_FAILSAFE_FACTORY_RESET" and "OTA2_BOOT_FAILSAFE_UPDATE" are distinguished in "ota2_failsafe_app_load".

0 Likes
1 Solution
Zhengbao_Zhang
Moderator
Moderator
Moderator
First comment on KBA 10 questions asked 5 questions asked

if your OTA2 image already was uploaded to staged area successfully, then board will reboot to extract the staged image.

if you keep pressing reset key while extract ,  it will go to OTA2_BOOT_FAILSAFE_UPDATE:

you can see it from ot2_failsafe.c  

pastedImage_1.png

if your running app goes to die and watchdog happens.

it will go to factory reset , the logic should need a confirm.

OTA2_BOOT_FAILSAFE_FACTORY_RESET should happen.

you can have a try to see if your evb turns into bricks with or without staged image.

View solution in original post

2 Replies
Zhengbao_Zhang
Moderator
Moderator
Moderator
First comment on KBA 10 questions asked 5 questions asked

if your OTA2 image already was uploaded to staged area successfully, then board will reboot to extract the staged image.

if you keep pressing reset key while extract ,  it will go to OTA2_BOOT_FAILSAFE_UPDATE:

you can see it from ot2_failsafe.c  

pastedImage_1.png

if your running app goes to die and watchdog happens.

it will go to factory reset , the logic should need a confirm.

OTA2_BOOT_FAILSAFE_FACTORY_RESET should happen.

you can have a try to see if your evb turns into bricks with or without staged image.

Thank you.

The question has been resolved.

0 Likes