You will also find samples for your board in your local repository, which is downloaded for tools like STM32CubeMX or STM32CubeIDE.
You could e.g. take a look at:
- EEPROM_Emulation -> Repository\STM32Cube_FW_F7_V_._._\Projects\STM32746G-Discovery\Applications\EEPROM
- FLASH_EraseProgram -> Repository\STM32Cube_FW_F7_V_._._\Projects\STM32746G-Discovery\Examples\FLASH\FLASH_EraseProgram
The latter not only shows how to erase Flash blocks, but also writes some data into these blocks beforehand, e.g. 0x12345678.
We hope you enjoy writing and reading the Flash.
/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.