完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
硬件:esp32 dwod
idf v4.4 参照例子:native_ota_example写的ota程序,升级完成后,重启进入: const esp_partition_t *running = esp_ota_get_running_partition(); esp_ota_img_states_t ota_state; if (esp_ota_get_state_partition(running, &ota_state) == ESP_OK) { if (ota_state == ESP_OTA_IMG_PENDING_VERIFY) { // run diagnostic function ... bool diagnostic_is_ok = diagnostic(); if (diagnostic_is_ok) { ESP_LOGI(TAG, "Diagnostics completed successfully! Continuing execution ..."); esp_ota_mark_app_valid_cancel_rollback(); } else { ESP_LOGE(TAG, "Diagnostics failed! Start rollback to the previous version ..."); esp_ota_mark_app_invalid_rollback_and_reboot(); } } } 校验成功,执行:esp_ota_mark_app_valid_cancel_rollback() 时,esp32直接重启: I (1302) ESP32: SHA-256 for the partition table: : fbd17bd5dfe30a5b41cf748df6b67972d33699e18ba40e10005d93b46fa471bb I (1304) ESP32: SHA-256 for bootloader: : 153f40bd798f490dc753ef5ddbe383adb144b40ea7af2af5cc96c413327099c3 I (1314) ESP32: Running partion:ota_0 I (1320) ESP32: SHA-256 for current firmware: : f2bfa8da66d1ddc01adfc6cd55194908894d4c6ead21fd598fa1e313e738d340 I (1339) ESP32: Running partition is verfying ... I (1340) ESP32: Diagnostics completed successfully! Continuing execution ... ets Jul 29 2019 12:21:46 rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:6612 load:0x40078000,len:14880 ho 0 tail 12 room 4 load:0x40080400,len:3792 entry 0x40080694 I (29) boot: ESP-IDF v4.4-dirty 2nd stage bootloader I (29) boot: compile time 09:33:57 I (29) boot: chip revision: 3 I (32) boot_comm: chip revision: 3, min. bootloader chip revision: 0 I (39) boot.esp32: SPI Speed : 40MHz I (44) boot.esp32: SPI Mode : DIO I (49) boot.esp32: SPI Flash Size : 8MB I (53) boot: Enabling RNG early entropy source... 然后继续使用升级前的分区,升级失败。 什么原因导致毫无征兆的重启呢? |
|
相关推荐
|
|
只有小组成员才能发言,加入小组>>
545浏览 6评论
457浏览 5评论
有没有办法在不使用混杂模式的情况下实现Wifi驱动程序接收缓冲区访问中断呢?
437浏览 5评论
441浏览 4评论
411浏览 4评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-21 21:24 , Processed in 0.680482 second(s), Total 74, Slave 58 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号