H563 will have Hardfault when enable SRAM3 ECC
I am using the Nucleo board (H563) to test the SRAM ECC
I have create a new project by board selector.
Just have several printf function at main to print out to the SWO.
It is working well without setting the SRAM ECC enable.
However, once set the SRAM3 ECC it will jump to hardfault() after bootup.
** I want to put all program under the ECC protection.
Therefore the heap, stack and bss should be place at ECC protected area.
How to achieve this?
RAMCFG
SRAM1: HardErase: Enable
SRAM2: HardErase: Enable
Error code correction: StartECC
SRAM3: HardErase: Enable
Error code correction: StartECC
STM32H563ZITX_FLASH.ld
------------------------------------------
/* Highest address of the user mode stack */
_estack = ORIGIN(RAM1) + LENGTH(RAM1); /* end of "RAM" Ram type memory */
_Min_Heap_Size = 0x200; /* required amount of heap */
_Min_Stack_Size = 0x400; /* required amount of stack */
/* Memories definition */
MEMORY
{
/* RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 640K */
RAM1 (xrw) : ORIGIN = 0x20000000, LENGTH = 256K
RAM2 (xrw) : ORIGIN = 0x20040000, LENGTH = 64K
RAM3 (xrw) : ORIGIN = 0x20050000, LENGTH = 256K
BKPSRAM (xrw) : ORIGIN = 0x40036400, LENGTH = 4K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
}
My setting as below:
