Hi Team,
In my project,
Application start with 0x30000 with 1MB size
Backup application start with 0x130000 with 1MB.
Here, During my Implementation, I try to erase 13th block start of backup application, Once I triggered this erase command from bootloader after system continues reset. Even chip full erase after as well not possible to recover.
1. Which cause that reset happen once erased the 13th block. How to recover this(even i tried full chip erase after as well contnous reset)
2. As per my understanding every block size 64KB, so 13th block start address 0x130000.
ESP Flash Erase Block
-
- Posts: 9739
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP Flash Erase Block
Where do you specify this 'block', as in, what do you mean with it? Erase blocks (as in: the minimum amount of bytes that must be erased simultaneously) on SPI NOR chips as used with the ESP32 is 4K, not 64K.
Re: ESP Flash Erase Block
In Customized bootloader, The below test code
esp_err_t err = esp_rom_spiflash_erase_block(0x13);
if(ESP_ROM_SPIFLASH_RESULT_OK == err)
{
ESP_LOGI(TAG, "flash erase successfull");
}
{
ESP_LOGI(TAG, "flash erase not not successfull");
}
err = esp_rom_spiflash_write(0x130000, data, strlen(data));
Why the above test code execution after not possible to recover the board. Always reset the board with watchdog reset(here, the board up and bootloader code executed and code jump to application code but after sometime watchdog reset).
esp_err_t err = esp_rom_spiflash_erase_block(0x13);
if(ESP_ROM_SPIFLASH_RESULT_OK == err)
{
ESP_LOGI(TAG, "flash erase successfull");
}
{
ESP_LOGI(TAG, "flash erase not not successfull");
}
err = esp_rom_spiflash_write(0x130000, data, strlen(data));
Why the above test code execution after not possible to recover the board. Always reset the board with watchdog reset(here, the board up and bootloader code executed and code jump to application code but after sometime watchdog reset).
Re: ESP Flash Erase Block
Our hardware: eSP32-S3-FN8
-
- Posts: 9739
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP Flash Erase Block
Is your ESP-IDF project configured to the correct size of flash? (Should be under 'serial flasher config'). I think the bootloader should also report if there's a discrepancy between the amount of flash detected and configured.
If not, is there any way you can read back the flash after you initially program it, and after it breaks? It would be useful to see what the difference is, as in, what region actually got erased.
If not, is there any way you can read back the flash after you initially program it, and after it breaks? It would be useful to see what the difference is, as in, what region actually got erased.
Who is online
Users browsing this forum: Bing [Bot] and 90 guests