Skip to main content
Riccardo Franceschetto
Associate III
November 3, 2022
Solved

Tutorial/example for flash write/read STM32H7

How do i find an extensive example for read/write value in flash of STM32H7, for store of data to keep after powerloss or reboot? Thanks

This topic has been closed for replies.
Peter BENSCH
Peter BENSCHBest answer
ST Technical Moderator
November 7, 2022

You can find this in the STM32H7 firmware, which not only contains the libraries, but also examples, e.g. FLASH_EraseProgram, which is included there for each NUCLEO, DISCOVERY or EVAL board.

The reference manuals also describe in detail how to write in the flash.

Does it answer your question?

Regards

/Peter

In order 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.

4 replies

Peter BENSCH
Peter BENSCHBest answer
ST Technical Moderator
November 7, 2022

You can find this in the STM32H7 firmware, which not only contains the libraries, but also examples, e.g. FLASH_EraseProgram, which is included there for each NUCLEO, DISCOVERY or EVAL board.

The reference manuals also describe in detail how to write in the flash.

Does it answer your question?

Regards

/Peter

In order 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.
Riccardo Franceschetto
Associate III
November 7, 2022

Yes, i'll look forward to it.

Tesla DeLorean
Guru
November 7, 2022

I'm not sure there's "extensive" examples of anything, there are examples demonstrating the functionality of the underlying API functions, and you get to expand and extend those as needed for a specific use-case and application.

There's also an "EEPROM Emulation" library, but honestly I'd avoid that, and understand the flash management at a sector (page) level erase and write.

...\STM32Cube\Repository\STM32Cube_FW_H7_V1.10.0\Projects\NUCLEO-H743ZI\Examples\FLASH\FLASH_EraseProgram

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Riccardo Franceschetto
Associate III
November 7, 2022

Thank you, i'll check the folder you indicated me