Skip to main content
Associate III
May 18, 2026
Question

stm32h573 otp memory

  • May 18, 2026
  • 3 replies
  • 160 views

I'm looking for a working example of how to program the OTP memory on the STM32H573.

I am looking to program with TrustZone enabled, from secure mode.  I'm using STM32Cube_FW_H5_v1.4.0, and am not in a good position to move to v1.5.0.  Any working example would do, using HAL, LL or direct register access.

Thanks in advance.

-Rob

3 replies

Technical Moderator
May 18, 2026

Hello @rdl_42 

Unfortunately, there is no example on STM32CubeH5 about programming OTP memory. 

You can refer to the article How to program the OTP fuse bits in the STM32N6 as starting point. 

 

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question.Saket_Om"
rdl_42Author
Associate III
May 18, 2026

Saket_Om,

Thanks for the response.  That article appears target programming an external OTP, not the H573 on chip OTP that is part of the FLASH module.  I don't think it applies to my situation.

Here is a direct first question:  Should I be able to program the H573 onchip OTP with TrustZone enabled, from secure mode?

Thanks,

-Rob

OliM
Senior II
May 20, 2026

If it is the same as in U5, the OTP is non secure. So you can program OTP from secure and nonsecure just like you program normal flash, but you always have to use the FLASH_NS registers for it.