Showing results for 
Search instead for 
Did you mean: 

Storing data in the option byte of STM32 memory.


1.Can I use option bytes to store the data(eg: Serial number, values storage etc).is It possible if so please share the available resource link/ example for reference. I am using STM32G491RE MCU.
I want to write some data in to option byte memory and that data will be updated every 5 to 10 sec and If power cur or reset happens I should read that data from the memory. For my MCU I have 48 bytes of option byte memory.

How can I select specific memory byte in option byte to write the data and

before writing the do I need to erase the option bytes is yes  how can I erase the selected memory.
is there any special has to be taken while writing the data to the option byte. I am programming the stm32 with HAL 

2.In reference manual STM32G491 MCU's have single bank memory(512 KB). Is it possible to divide the mwmory in to dual banks( 256KB each).If yes can anyone suggest how to do.

Can anyone please suggest.

Christian N
ST Employee

Hello sireevenkat1,

Thank you for contacting STMicroelectronics.

Your post was escalated to ST Online Support Team for additional assistance.

Kind Regards,

ST Support

Chief II

Your Q1 NO NO Continuosly rewrite kills MCU

For Q2 dividing for what ? Some sectoring or multiapp is maybe possible , but yes 491 is hard to use for EEPROM emulation...