cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746, STM32CubeIDE

ADębs.1
Senior

How to remember in STM32F746G-Disco uint32_t? Save after power off and recall when power is restored?

Andrzej

1 ACCEPTED SOLUTION

Accepted Solutions
19 REPLIES 19
Maurizio1
Associate III

Maybe you can use the SD card?

This tutorial is based on your board:

https://www.youtube.com/watch?v=I9KDN1o6924

Please use more more meaningful titles for your questions.

TDK
Guru

It takes some work if you want to store things on the chip itself. Dedicate a page of flash to storing user values. You must erase the entire page of flash to overwrite the values.

Otherwise use an external EEPROM/FRAM or SD card as Maurizio suggests.

If you feel a post has answered your question, please click "Accept as Solution".

I need to save 4 bytes when power off.

Andrzej

This is an application note describing the process of so-called "EEPROM emulation".

AN3969

[Edited to link the AN about devices that are more similar to the one used by the OP]

It does not require a SD card to be present in your system (which already has a SD drive), but it's relatively more complex to be organized, as you have to know the layout of the embedded flash memory in order to not overwrite your own code.

If you can handle that, "EEPROM emulation" is probably better for a fixed, simple data as a 4-byte unsigned integer.

I will check and answer. Thank you.

Does the STN32F746G have any memory area dedicated to power off memory necessary to store data. Other than FLASH?

Andrzej

No it doesn't.
If you feel a post has answered your question, please click "Accept as Solution".

Sure

Andrzej

ADębs.1
Senior

I want to write and read FLASH. Please send the sector addresses file STM32F7.

Andrzej

ADębs.1
Senior

When I use "HAL_FLASH_Program (FLASH_TYPEPROGRAM_WORD, FLASH_SECTOR_4, total_time);" I need to "FLASH_Erase_Sector (FLASH_SECTOR_4, FLASH_VOLTAGE_RANGE_3);" ?

Andrzej