cancel
Showing results for 
Search instead for 
Did you mean: 

Tutorial/example for flash write/read STM32H7

Riccardo Franceschetto
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

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.

View solution in original post

4 REPLIES 4
Peter BENSCH
ST Employee

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.

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
Up vote any posts that you find helpful, it shows what's working..

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

Yes, i'll look forward to it.