Write protection error when erasing sector with secure boot
Hello,
I'm developing an application with OEMiRoT and trustzone for STM32H563.
I'm getting a write protection error (WRPERR) when I try to erase a secure flash sector from secure code that is not protected neither by write protection or HDP. I'm using the method HAL_FLASHEx_Erase() and I mapped the region as readable and writable with the memory management tool of CubeMX.
If I try to do the same process without the secure boot provisioning, everything works as expected. I would like to know if there are any additional operation in order to write/erase flash at runtime when secure boot is used.
Any help is really appreciated!
Thank you,
Giulio
