H563zi erase/program non-secure flash area from secure app
Hello!
I would have an app that is divided between a secure part and a non secure part.
The memory definition is as following in the secure linker script:
/* Memories definition */
MEMORY
{
RAM (xrw) : ORIGIN = 0x30000000, LENGTH = 320K
FLASH (rx) : ORIGIN = 0x0C000000, LENGTH = 64K
FLASH_NSC (rx) : ORIGIN = 0x0C010000, LENGTH = 8K
}
The first 9 sectors (0-8) are of the secure part.
When attempting to erase sector 9 (the 10th) sector from the Secure application part using:
'HAL_FLASHEx_Erase' I get a HAL_FLASH_ERROR_ECCD error.
I require this for software update, I am trying to do the following on the INACTIVE bank:
1) Delete the secure sectors and update with a new secure app
2) Delete the non-secure sectors and update with a new non-secure app
From my knowledge the secure part should be able to erase the non-secure part without any problems.
