2025-01-16 07:56 AM
I have the NUCLEO-H753ZI example running on my board. All works fine without the security features. When I enable both the SFU_MPU_PROTECT_ENABLE and SFU_IWDG_PROTECT_ENABLE. I keep having a watchdog when it tries to execute the firmware. I commented the #define SFU_IWDG_PROTECT_ENABLE and enable the SFU_VERBOSE_DEBUG_MODE. It gets stuck at verifying the user FW as shown below.
= [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL
= [SBOOT] STATE: CHECK STATUS ON RESET
INFO: A Reboot has been triggered by a Hardware reset!
= [SBOOT] STATE: CHECK NEW FIRMWARE TO DOWNLOAD
= [SBOOT] STATE: CHECK USER FW STATUS
A FW is detected in the slot SLOT_ACTIVE_1
= [SBOOT] STATE: VERIFY USER FW SIGNATURE
When I breakpoint I can see that it is stuck at this as USB stops running after the first SFU_LL_SECU_SetProtectionMPU call which is the SFU_INITIAL_CONFIGURATION.
TRACE(" @%d:%x size:%x sub:%x perm:%x exec:%x\r\n",
MPU_InitStruct.Number, MPU_InitStruct.BaseAddress, MPU_InitStruct.Size, MPU_InitStruct.SubRegionDisable,
MPU_InitStruct.AccessPermission, MPU_InitStruct.DisableExec);
I added an if to only call that TRACE when uStep == SFU_INITIAL_CONFIGURATION. However although it carries on, it just confirms that it s causing the firmware to get stuck as well. Everything is fine when I make sure my usb is not connected when I boot the board.
Any ideas how to resolve this please?