Code: Select all
# Name, Type, SubType, Offset, Size nvs, data, nvs, 0x9000, 0x4000 otadata, data, ota, 0xd000, 0x2000 phy_init, data, phy, 0xf000, 0x1000 ota_0, app, ota_0, 0x010000, 1M ota_1, app, ota_1, 0x110000, 1M some_space, data, , 0x210000, 384K more_space,data, , 0x270000, 384K
My prgram executes exactly same functions of ota_example_main.c.
All of them execute with no errrors:
1- esp_ota_get_next_update_partition (here I print what partition returns and returns correctly ota_1 address)
3- esp_ota_write (a lot of them, the size of downloaded file corresponds to the file so I'm assuming it's downloading it ok)
After restart, it doesn't boot from ota_1 and I can see this from configured/running partition check:
Configured OTA boot partition at offset 0x00110000 but running from offset 0x00010000
So what could be wrong?
Is partition table ok?
I'm using make erase_flash before each try (it only takes 4,7s, is this time ok?)
Thanks in advance
That's what is printed when powering on
Code: Select all
ets Jun 8 2016 00:22:57 rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) flash read err, 1000 ets_main.c 371 ets Jun 8 2016 00:22:57 rst:0x10 (RTCWDT_RTC_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:0x3fff0018,len:4 load:0x3fff001c,len:732 load:0x40078000,len:0 load:0x40078000,len:10208 entry 0x40078aa4
So that could explain why isn't booting the corresponent partition.Early flash read error
flash read err, 1000
This fatal error indicates that the bootloader tried to read the software bootloader header at address 0x1000 but failed to read valid data. Possible reasons for this include:
-Physical problem with the connection to the flash chip, or flash chip power.
-Boot mode accidentally set to HSPI_FLASH_BOOT, which uses different SPI flash pins. Check GPIO2 (see above).
-VDDSDIO has been enabled at 1.8V (due to MTDI/GPIO12, see above), but this flash chip requires 3.3V.
However in our custom pcb IO2, IO12 and IO15 are left unconnected. Checked them and are all ok:
Checked the power and EN pin, they're stable at 3,3V.
Checked other boards with same hardware and the 'flash read err, 1000' happens too.
Also I've runned this command I read somewhere:
Seems like bootloader is written correctly... so I guess it's a hardware problem?$ py esptool.py -p COM13 verify_flash 0x1000 ../../../../../../../build/bootloader/bootloader.bin
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Configuring flash size...
Auto-detected Flash size: 4MB
Verifying 0x5560 (21856) bytes @ 0x00001000 in flash against ../../../../../../../build/bootloader/bootloader.bin...
-- verify OK (digest matched)