Skip to main content
AAles.5
Visitor II
May 22, 2023
Question

Is it possible to set the option bytes in my firmware?

  • May 22, 2023
  • 1 reply
  • 911 views

Hello everyone,

I must start a production of PCBA which use the MCU STM32G474QET6 and I need to protect my firmware, I want to set the read protection at Level 1. Is it possible to set that option byte in the firmware when I flash the firmware?

Thanks.

Best regards,

Andrea Alessi

This topic has been closed for replies.

1 reply

Peter BENSCH
Technical Moderator
May 22, 2023

Welcome, @AAles.5​, to the community!

Yes, of course you can set the byte option during programming.

There is a lot of information about it, e.g. in the Knowledge Base, either using a search for "How to change the Read Out Protection" or directly here. Even if the G4 is not explicitly mentioned there, the procedure is essentially identical.

Note, however, that level 1 is only a simple protection. With level 2, you are at the maximum possible security level, but level 2 is a one-way street because you can no longer access the memory from outside. Details can be found in RM0440, e.g. section 3.4.

Hope that helps?

Regards

/Peter