esp-idf: esp_partition_write doesn't work on encrypted partition (IDFGH-4423)
Environment
- Development Kit: [none]
- Module or chip used: ESP32-WROVER-E (16Mb SPIFlash, 64Mb SPRAM)
- IDF version (run
git describe --tagsto find it): v4.3-dev-dirty - Build System: CMake
- Compiler version (run
xtensa-esp32-elf-gcc --versionto find it): esp-2020r2-8.2.0 - Operating System: Linux
- Using an IDE?: Yes (Eclipse 2020-09(4.17.0))
- Power Supply: external 3.3V
Problem Description
Hello, I have a problem with the flash encryption feature in my project. I have followed the steps that appear in the example esp-idf/examples/security/flash_encryption but when the program executes the function “esp_partition_write”, the task hangs and does not continue. Furthermore any exception appears, only appears logs coming from task wdt because the task is hanged.
The data length that I am trying to write is multiple of 16 (128 bytes) with a offset 0. The partition is marked with the “encrypted” flag in the partition table.
If I remove the “encrypted” flag, the process runs correctly
Other items if possible
- sdkconfig file (attach the sdkconfig file from your project folder)
- Partitions table
- elf file in the
buildfolder (note this may contain all the code details and symbols of your project.) - coredump (This provides stacks of tasks.)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 24 (8 by maintainers)
Commits related to this issue
- flash_encryption: Quick fixed the issue that block when flash_encryption_write, Related https://github.com/espressif/esp-idf/issues/6322, Related https://github.com/espressif/esp-idf/issues/6254 — committed to espressif/esp-idf by mythbuster5 3 years ago
- Revert "flash_encryption: Quick fixed the issue that block when flash_encryption_write, Related https://github.com/espressif/esp-idf/issues/6322, Related https://github.com/espressif/esp-idf/issues/62... — committed to 0xFEEDC0DE64/esp-idf by 0xFEEDC0DE64 3 years ago
- Revert "flash_encryption: Quick fixed the issue that block when flash_encryption_write, Related https://github.com/espressif/esp-idf/issues/6322, Related https://github.com/espressif/esp-idf/issues/62... — committed to 0xFEEDC0DE64/esp-idf by 0xFEEDC0DE64 3 years ago
- flash_encryption: Quick fixed the issue that block when flash_encryption_write, Related https://github.com/espressif/esp-idf/issues/6322, Related https://github.com/espressif/esp-idf/issues/6254 — committed to espressif/esp-idf by mythbuster5 3 years ago
- flash_encryption: Quick fixed the issue that block when flash_encryption_write, Related https://github.com/espressif/esp-idf/issues/6322, Related https://github.com/espressif/esp-idf/issues/6254 — committed to espressif/esp-idf by mythbuster5 3 years ago
- flash_encryption: Quick fixed the issue that block when flash_encryption_write, Related https://github.com/espressif/esp-idf/issues/6322, Related https://github.com/espressif/esp-idf/issues/6254 — committed to espressif/esp-idf by mythbuster5 3 years ago
After checking all the settings of the sdkconfig, comparing with the example project, I have verified that what produces the error is the option “Flash SPI speed = 80 MHz” in “Serial flasher config” together with the option "Support for external, SPI -RAM connected ". With these two options set in the example https://github.com/espressif/esp-idf/tree/master/examples/security/flash_encryption, the same error is reproduced. I have fixed this error by changing the “Flash SPI speed” to 40MHz.