STM32F103C8T6 Flash Memory Write/Read

What are you developing?
ardunocuqpw
Posts: 6
Joined: Tue May 17, 2022 11:15 am

STM32F103C8T6 Flash Memory Write/Read

Post by ardunocuqpw »

How can ı write and read my datas to STM32. Does it have library? I need your help guys thank you.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32F103C8T6 Flash Memory Write/Read

Post by fpiSTM »

You can use EEPROM library.
ardunocuqpw
Posts: 6
Joined: Tue May 17, 2022 11:15 am

Re: STM32F103C8T6 Flash Memory Write/Read

Post by ardunocuqpw »

STM32F103C8T6 does note have EEPROM sir, ı need to write flash memory but ı have no idea.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32F103C8T6 Flash Memory Write/Read

Post by fpiSTM »

Eeprom library emulate an eeprom in flash...
ardunocuqpw
Posts: 6
Joined: Tue May 17, 2022 11:15 am

Re: STM32F103C8T6 Flash Memory Write/Read

Post by ardunocuqpw »

Can you help me, how can ı emulate?
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32F103C8T6 Flash Memory Write/Read

Post by fpiSTM »

Another way would be to use HAL Flash API but it is for advanced user.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32F103C8T6 Flash Memory Write/Read

Post by fpiSTM »

ardunocuqpw wrote: Tue May 17, 2022 12:41 pm Can you help me, how can ı emulate?
Simply try examples available in Arduino IDE.
ardunocuqpw
Posts: 6
Joined: Tue May 17, 2022 11:15 am

Re: STM32F103C8T6 Flash Memory Write/Read

Post by ardunocuqpw »

I can not run FlashStorage library for stm32. İt give error.

WARNING: The FlashStorage_STM32F1 library needs stm32, ststm32 architecture to work and may be incompatible for your circuit using STM32F1 architecture.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32F103C8T6 Flash Memory Write/Read

Post by fpiSTM »

OK this mean you use Roger core. I don't know what is available for this core.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: STM32F103C8T6 Flash Memory Write/Read

Post by ag123 »

take a look in the ref manual RM0008 and some app notes
https://www.st.com/resource/en/referenc ... ronics.pdf
https://www.st.com/resource/en/programm ... ronics.pdf
it isn't difficult to use the registers to write to on-chip flash

if you search in github, there are probably more examples.
https://github.com/khoih-prog/FlashStorage_STM32F1
https://github.com/avislab/STM32F103/tr ... tm_lib/src

Note that erase is a full block of flash, if you have only 64k flash, and your bin image is large, erasing flash may erase part of your program.
Post Reply

Return to “Projects”