mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
ota: fix ota with flash encryption
This commit is contained in:
@@ -30,6 +30,7 @@ static const char *TAG = "spiflash_s3";
|
||||
#define SPICACHE SPIMEM0
|
||||
#define SPIFLASH SPIMEM1
|
||||
|
||||
extern void IRAM_ATTR flash_rom_init(void);
|
||||
esp_rom_spiflash_result_t IRAM_ATTR spi_flash_write_encrypted_chip(size_t dest_addr, const void *src, size_t size)
|
||||
{
|
||||
const spi_flash_guard_funcs_t *ops = spi_flash_guard_get();
|
||||
@@ -68,6 +69,7 @@ esp_rom_spiflash_result_t IRAM_ATTR spi_flash_write_encrypted_chip(size_t dest_a
|
||||
if (ops && ops->start) {
|
||||
ops->start();
|
||||
}
|
||||
flash_rom_init();
|
||||
rc = SPI_Encrypt_Write(dest_addr, src, size);
|
||||
if (ops && ops->end) {
|
||||
ops->end();
|
||||
|
Reference in New Issue
Block a user