Skip to main content
Ss.61
Associate III
June 18, 2021
Question

Internal Flash (STM32F042G6)

  • June 18, 2021
  • 1 reply
  • 649 views

*How to save varibales or array of data in Internal memory on STM32F042G6

*Can i get some example to understand this thing more clear.

Thanks in advance.

This topic has been closed for replies.

1 reply

waclawek.jan
Super User
June 18, 2021

You need to reserve a FLASH sector, erase it and then write to it. The procedure to do so is described in the FLASH section of RM. Please note that erasing and writing to FLASH takes significant time (see Datasheet), and during that time you cannot access the FLASH (including code execution).

JW

Ss.61
Ss.61Author
Associate III
June 19, 2021

Thank you very much for your reply,

*can i get some sample code in stm32F0 family,

*The procedure is clear,

*if i get one example program will help me to proceed writing code.

Tesla DeLorean
Guru
June 19, 2021

The CubeF0​ package should have multiple HAL examples for several chips/boards.

T​he SPL also has examples if use that rather than HAL

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..