cancel
Showing results for 
Search instead for 
Did you mean: 

How to write to internal Flash memory?

sherrellbc
Associate
Posted on December 17, 2015 at 14:32

I am working with an ST

http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF258515?sc=stm32l152c-discovery

 board (STM32L152RCT6). I have been able to program the device and do all entry level things. Now I want to write to, and read from, the internal EEPROM and Flash memories but have been very unsuccessful in doing so. 

I understand the nuances with reading and writing to Flash, and to a lesser degree EEPROM, but am in no way remotely sure how to do this directed internal. 

I have found a few references online to the API provided by

https://www.keil.com/pack/doc/CMSIS/Driver/html/group__flash__interface__gr.html

 API, but I have not been able to make use of it. How can these utilities be integrated into and used by an existing project? 

I am using the Keil (uVision) IDE, but the only Flash API utilities provided are the following: 

0690X00000605BEQAY.png

And I frankly do not know what to make of this information. Writing to internal EEPROM and Flash is made very simple with Atmel's controllers. What am I doing wrong with ST? Am I completely misinterpreting information and moving in the wrong direction? 

#keil-stm32-discovery-flash-cmsis
1 REPLY 1
Posted on December 17, 2015 at 16:23

Yeah, those are all external parts being treated generically by the library code. You want to be looking for the support specific to your target CPU. Perhaps under the ''Device'' node.

I'm not using this RTE methodology, but if you want to know how to write the internal memory this should be described in the Reference or Programming Manual for the part.

STM32L1xx_StdPeriph_Lib_V1.1.1\Project\STM32L1xx_StdPeriph_Examples\FLASH\Data_Program

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