cancel
Showing results for 
Search instead for 
Did you mean: 

internal flash

ham10za
Associate II
Posted on February 19, 2018 at 09:57

hello! i am working with stm32 cortex-M0? IN FACT i want to know how to modify bytes from the internal flash without erasing the whole page , in addition i don't have RAM space to copy code there and modify bytes there !! is there anyone who can help ?

Note: this post was migrated and contained many threaded conversations, some content may be missing.
29 REPLIES 29
Andrew Neil
Evangelist
Posted on February 19, 2018 at 10:20

When cross-posting (ie, posting the same question to multiple forums), always include links between the threads.

Otherwise you waste people's time as they give an answer in one thread - not knowing that it has already been given in another.

See: 

http://www.keil.com/forum/63375

 on the Keil forum.
Posted on February 19, 2018 at 10:43

you told me to ask on ST forum !!

Posted on February 19, 2018 at 10:56

Looking at the Keil forum link, it seems rather like re-direction than cross-posting ...

is there anyone who can help ?

First, you.

The specific part is nowhere mentioned, you could be a tad more specific.

IN FACT i want to know how to modify bytes from the internal flash without erasing the whole page ...

That's usually the way it is, microcontroller must be cheap.

The datasheet/ref.manual tells you what your part has implemented.

If you can't live with it, select a (more expensive) dual-bank variant, or add external NVRAM (Flash, EEPROM, MRAM, ...).

Posted on February 19, 2018 at 11:05

AvaTar wrote:

 it seems rather like re-direction than cross-posting ...

Yes, it is.

But the point remains:

  1. An answer had already been given in the original thread - that should have been acknowledged here.

     
  2. The original thread should be updated to link to this 're-direction'.
Posted on February 19, 2018 at 11:07

AvaTar wrote:

If you can't live with it, select a (more expensive) dual-bank variant, or add external NVRAM (Flash, EEPROM, MRAM, ...).

Or look for a (possibly more expensive) microcontroller with internal NV memory (EEPROM, FRAM, ... )

Posted on February 19, 2018 at 11:18

The datasheet/ref.manual tells that i can only erase page , i tried to copy data to stack buffer then modify them there but it doesn't work so that's why am asking is there an other solution !!

Posted on February 19, 2018 at 11:34

Or that, yes.

But with the few information we got up to now, all this amounts to crystal-ball-gazing.

Yet again ...

Alan Chambers
Associate II
Posted on February 19, 2018 at 12:49

Perhaps you should explain what exactly are you trying to achieve. What are you using the flash to store? How big is the data structure? How often does it change?

Posted on February 19, 2018 at 12:03

hamzaoui hamza wrote:

The datasheet/ref.manual tells that i can only erase page

So where's the doubt, then? That seems pretty clear!

i tried to copy data to stack buffer then modify them there but it doesn't work

So you must have been doing it wrong, then.

so that's why am asking is there an other solution !!

And you have been given a list of possible options