I took the wear_levelling example and set the encrypted flag on the storage partition:
Code: Select all
# Name, Type, SubType, Offset, Size, Flags
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 1M,
storage, data, fat, , 1M, encrypted
Code: Select all
I (108) example: Mounting FAT filesystem
E (203) wl_flash: initSections(269): result = 0x00000104
E (203) wl_flash: init(161): result = 0x00000104
E (203) wl_ext_safe: init(73): result = 0x00000104
E (208) wear_levelling: wl_mount: init instance=0x00000000, result=0x104
E (213) vfs_fat_spiflash: failed to mount wear levelling layer. result = 260
E (223) example: Failed to mount FATFS (0x104)
According to this forum thread viewtopic.php?t=3305 it shold be possible to use FatFs with wear leveling on an encrypted partition.
So what goes wrong?
Regards,
Benno