cancel
Showing results for 
Search instead for 
Did you mean: 

Options bytes in STM32H73x: How do I apply them all from STM32CubeProgrammer?

Kayas Ahmed
Associate II

Hello,

I am having trouble applying all the option bytes from STM32CubeProgrammer.

I have ported the SBSFU example to use it as a bootloader, I am at the stage where I would test all the security settings by configuring the option bytes externally.

From my testing, I am able to set PCROP, WRP, and Secure memory but when I try to set RDP which I think should be configured at the end, It fails.

Can someone please tell me the proper sequence of option bytes configuration?

Looking forward to a positive response

Thanks,

Kayas Ahmed

12 REPLIES 12

While STM32H7 is executing in the secure area, bootloader cannot access the flash. The option bytes are part of the flash module. As you have seen, only after leaving the secure area the debugger can access the flash and option bytes . In hotplug mode of course, because the secure area code starts executing immediately after reset. This is by design.

> My intention is not to boot the application without setting all the option bytes.

The most reliable and simple way IMHO is to set all the option bytes from your own code (bootloader).

Kayas Ahmed
Associate II

Hi @Pavel A.​ ,

From my understanding (and experience) yes, a bootloader would be the only answer, but this is not what the SBSFU example illustrates. According to the SBSFU, it should be possible to set all the options bytes using a debugger. If it was written somewhere it is not possible, I would have not posted this question here.

> While STM32H7 is executing in the secure area, the bootloader cannot access the flash

This is not correct, the bootloader has access to everything, I assume you meant debugger.

Thanks & Regards,

Kayas Ahmed

Of course debugger, you're right!