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:
@@ -32,6 +32,7 @@ static inline void IRAM_ATTR spi_flash_guard_end(void)
|
||||
}
|
||||
}
|
||||
|
||||
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 uint8_t *ssrc = (const uint8_t *)src;
|
||||
@@ -73,6 +74,7 @@ esp_rom_spiflash_result_t IRAM_ATTR spi_flash_write_encrypted_chip(size_t dest_a
|
||||
}
|
||||
|
||||
spi_flash_guard_start();
|
||||
flash_rom_init();
|
||||
rc = esp_rom_spiflash_write_encrypted(row_addr, (uint32_t *)encrypt_buf, 32);
|
||||
spi_flash_guard_end();
|
||||
if (rc != ESP_ROM_SPIFLASH_RESULT_OK) {
|
||||
|
Reference in New Issue
Block a user