[SOLVED] Firmware OTA after upgrade always jumps to user 1 bin

paritosharya007
Posts: 10
Joined: Sat May 23, 2015 1:24 pm

[SOLVED] Firmware OTA after upgrade always jumps to user 1 bin

Postby paritosharya007 » Fri Oct 30, 2015 4:39 pm

I have written a custom FW and have manged to use OTA to download the newer version and install the new firmware. But after installation is complete, ESP always boots with user1 bin instead of user2 bin. I searched online and came across a post for similar problem and the solution suggested by Athena (http://www.esp8266.com/viewtopic.php?f=6&t=931).

When I use the following callback method, and call system_upgrade_reboot(),

Code: Select all

LOCAL void ICACHE_FLASH_ATTR
user_esp_platform_upgrade_rsp(void *arg)
{
    struct upgrade_server_info *server = arg;
    if (server->upgrade_flag == true) {
       os_printf("user_esp_platform_upgrade_successful. Rebooting now!!!\n");
        system_upgrade_reboot();
        os_printf("Reboot called!!!\n");

    } else {
       os_printf("user_esp_platform_upgrade_failed\n");
    }

    os_free(server->url);
    server->url = NULL;
    os_free(server);
    server = NULL;
}


I keep on getting following error

Code: Select all

user_esp_platform_upgrade_successful. Rebooting now!!!
reboot to use2
state: 5 -> 0 (0)
rm 0
pm close 7 0 0/44811063
del if0
usl
sul 0 0
Reboot called!!!

ets Jan  8 2013,rst cause:1, boot mode:(1,7)

ets Jan  8 2013,rst cause:4, boot mode:(1,7)

wdt reset


And if remove the call to system_upgrade_reboot(), ESP never reboots to user 2 bin.

Any ideas???

I am using iot sdk v1.4.

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: Firmware OTA after upgrade always jumps to user 1 bin

Postby ESP_Faye » Tue Nov 03, 2015 10:05 am

Hi,

boot mode:(1,7), the first parameter 1 means that your GPIO0 is low-level, your hardware module is in the UART download mode.

If you power on and power off, could it work ?

It seems to be a hardware issue, you can check your GPIO0's status.

Here is an example of OTA http://bbs.espressif.com/viewtopic.php?f=7&t=423#p1619.

paritosharya007
Posts: 10
Joined: Sat May 23, 2015 1:24 pm

Re: Firmware OTA after upgrade always jumps to user 1 bin

Postby paritosharya007 » Sun Nov 08, 2015 12:58 pm

That did the trick. GPIO level was low. Powering off and turning back on did it.

Thanks

Who is online

Users browsing this forum: No registered users and 26 guests