2021-06-07 10:48 AM
How to remember in STM32F746G-Disco uint32_t? Save after power off and recall when power is restored?
Andrzej
Solved! Go to Solution.
2021-06-11 09:05 AM
This YouTube tutorial should help you: STM32 FLASH Programming || SECTOR TYPE || M4, M7
2021-06-07 11:32 AM
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.
2021-06-07 02:16 PM
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.
2021-06-07 02:26 PM
I need to save 4 bytes when power off.
Andrzej
2021-06-07 02:42 PM
This is an application note describing the process of so-called "EEPROM emulation".
[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.
2021-06-08 12:23 AM
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
2021-06-08 07:02 AM
2021-06-09 02:12 AM
Sure
Andrzej
2021-06-10 05:10 AM
I want to write and read FLASH. Please send the sector addresses file STM32F7.
Andrzej
2021-06-10 11:03 AM
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