2026-01-25 1:45 PM
When using the memory management tool (MMT) on the STM32H573 to set the backup RAM as secure it generates an invalid secure attribution unit (SAU) config:
#define SAU_INIT_REGION5 1
#define SAU_INIT_START5 0x40000000 /* start address of SAU region 5 */
#define SAU_INIT_END5 0x400373FF /* end address of SAU region 5 */
#define SAU_INIT_NSC5 0The above code is the last region the MMT defines for the SAU.
Typically the tool would define the region 0x40000000 to 0x4fffffff (the non-secure peripheral address space) as non-secure. However 0x40036400 is the start of the backup RAM address space which shouldn't be made non-secure.
Since this is the last SAU region, there is nothing configuring the region 0x40037400 to 0x4fffffff as non-secure, and so hard faults occur when e.g. trying to access the non-secure RCC address space.
I believe correctly generated code should look like the below:
#define SAU_INIT_REGION5 1
#define SAU_INIT_START5 0x40000000 /* start address of SAU region 5 */
#define SAU_INIT_END5 0x400363FF /* end address of SAU region 5 */
#define SAU_INIT_NSC5 0
#define SAU_INIT_REGION6 1
#define SAU_INIT_START6 0x40037400 /* start address of SAU region 6 */
#define SAU_INIT_END6 0x4FFFFFFF /* end address of SAU region 6 */
#define SAU_INIT_NSC6 0Please can the MMT be updated to patch this?