Page 1 of 1

Store Flash Data (Eeprom?) STM32F051

Posted: Fri Feb 23, 2018 8:06 pm
by sblsolutions
Hello everyone,

I'm working quite a few years with flowcode for PIC but now I want to go for the STM32 controllers.
I've made some hardware for a project and used the STM32F051c8, because this one is in Flowcode.
The datasheet says :
The non-volatile memory is divided into two arrays:
–16 to 64 Kbytes of embedded Flash memory for programs and data
–Option bytes

But how can you read and write data to this flash data range?
It's not possible with the Eeprom symbol.

Kind regards,
Rene de Jong

Re: Store Flash Data (Eeprom?) STM32F051

Posted: Mon Feb 26, 2018 10:19 am
by LeighM
Hi,
We don't currently have any support for in program writing of Flash memory on STM32 devices.
We'll add it to our list for possible future additions.

Re: Store Flash Data (Eeprom?) STM32F051

Posted: Thu Nov 08, 2018 7:55 pm
by chad
HI, I bumped into this myself today. BUMP

chad

Re: Store Flash Data (Eeprom?) STM32F051

Posted: Fri Nov 09, 2018 3:03 pm
by LeighM
Hi,
I've created some macros that might work, sorry I've not had chance to test them.
Just ensure that the Address is not within your program space!
Hope it helps, let me know how it goes.
ps. the FlashByte won't work on F0, but should on F4

Re: Store Flash Data (Eeprom?) STM32F051

Posted: Fri Nov 09, 2018 10:18 pm
by chad
Hi Leigh, Thanks! I'll try that out this weekend..

chad

Re: Store Flash Data (Eeprom?) STM32F051

Posted: Sun Feb 17, 2019 2:04 am
by chad
Hi,

I did try this a long time ago. I recently took another look and couldn't get it to work. Might (probably) be my fault.
Could you take a look at this again when you have the time? A little flash byte read byte program would be really helpful.

Thanks!

cahd

Re: Store Flash Data (Eeprom?) STM32F051

Posted: Sun Feb 17, 2019 5:39 pm
by LeighM
Hi Chad,
Depends on how you want to use it.
Would a lookup table suffice?
The Flash has it's limitations as it needs to be block erased.
So byte write/read isn't going to be efficient.
Leigh

Re: Store Flash Data (Eeprom?) STM32F051

Posted: Mon Feb 18, 2019 7:45 pm
by chad
I haven't used a lookup table before, but sure. I think I am going to have to ultimately store like 20 variables.
Chad

Re: Store Flash Data (Eeprom?) STM32F051

Posted: Mon Jun 17, 2019 5:28 am
by STibor
Hello!
Excellent work!
If the page block is not empty, you cannot write data.
How do I delete the data stored on the page?

Re: Store Flash Data (Eeprom?) STM32F051

Posted: Sun Feb 06, 2022 2:10 am
by MACIANX
LeighM wrote:
Fri Nov 09, 2018 3:03 pm
Hi,
I've created some macros that might work, sorry I've not had chance to test them.
Just ensure that the Address is not within your program space!
Hope it helps, let me know how it goes.
ps. the FlashByte won't work on F0, but should on F4
Hello,
I tested these macros
Reading is not a problem and it works
I wrote and tested but it was written only once, it is not written a second time

Re: Store Flash Data (Eeprom?) STM32F051

Posted: Wed Feb 23, 2022 2:43 am
by MACIANX
stm32-flash eeprom

Re: Store Flash Data (Eeprom?) STM32F051

Posted: Wed Feb 23, 2022 2:48 am
by MACIANX
STibor wrote:
Mon Jun 17, 2019 5:28 am
Hello!
Excellent work!
If the page block is not empty, you cannot write data.
How do I delete the data stored on the page?