2025-11-10 9:57 AM
Hi,
I've started working with the SBSFU example recently on an STMU585. I have noticed that flashing the sbsfu_app_init.bin file is much slower (10x maybe?) if TrustZone is enabled.
My workaround has been to create a script to do a regression to RDP level 0 with TrustZone disabled, which will mass erase the device, and then reflash both sbsfu_app_init.bin and the bootloader each time before renabling TrustZone at the end.
I was wondering what the specific root cause of the slower flashing is, and if there is a better workflow that would allow me to update just the sbsfu_app_init.bin, or potentially just the NS part, with speeds comparable to those I get when the device is blank.
Thanks,
Mike
Solved! Go to Solution.
2025-11-10 10:37 AM
Yes, the slower flashing is normal when TrustZone and RDP1 are enabled. The ST-Link has to use secure access paths instead of direct flash writes, which makes programming much slower.
Your workaround (RDP0 + disable TrustZone for dev) is fine for now, but for production you should use the SBSFU secure update process to load new app images. Keeping RDP0 during development is the best way to maintain normal flashing speed.
2025-11-10 10:37 AM
Yes, the slower flashing is normal when TrustZone and RDP1 are enabled. The ST-Link has to use secure access paths instead of direct flash writes, which makes programming much slower.
Your workaround (RDP0 + disable TrustZone for dev) is fine for now, but for production you should use the SBSFU secure update process to load new app images. Keeping RDP0 during development is the best way to maintain normal flashing speed.