cancel
Showing results for 
Search instead for 
Did you mean: 

Information about internal flash memory of STM32L4R9

JTLGE
Associate II

Hi,I'm working on a project where I'm supposed to save data that I collect from the XXXX accellerometer and then process it by performing an fft.

I'm working on a project where I'm supposed to save data that I collect from the IIS3DWB accellerometer and then process it by performing an fft.

Currently I save them on an external sd, but using the STM32L4R9 microcontroller that has 2MB of flash and 640kb of RAM, I would like to understand how much flash memory I have available to save these data and what is the latency to save them (I generate about 200KB per second of data).

Also I would like to know how many times I can delete and rewrite the internal flash.

How can I do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Danish1
Lead II

The information you need is split between the Data Sheet and Reference Manual for your stm32.

You can use as much of the FLASH as you want for this purpose - naturally you need some FLASH to store your main program code.

But you should be aware that writing to FLASH is slow e.g. if you wish to program one row (64 double-words) at a time then programming can take up to 5.5 ms. During this time, the stm32 cannot read from that bank of FLASH at all - so if your program is executing from that FLASH the processor will freeze for that time.

I think your stm32 has TWO banks of FLASH, so if your program is in one then you are free to program the other 1MB without freezing the processor.

The data sheet suggests to program an entire 1 MB bank takes 11 seconds, so that's less than 100k per second. So it doesn't look fast enough.

Numbers from Table 68 of the data sheet.

Edit: As to endurance, you can reprogram 10000 times.

Hope this helps,

Danish

View solution in original post

2 REPLIES 2
Danish1
Lead II

The information you need is split between the Data Sheet and Reference Manual for your stm32.

You can use as much of the FLASH as you want for this purpose - naturally you need some FLASH to store your main program code.

But you should be aware that writing to FLASH is slow e.g. if you wish to program one row (64 double-words) at a time then programming can take up to 5.5 ms. During this time, the stm32 cannot read from that bank of FLASH at all - so if your program is executing from that FLASH the processor will freeze for that time.

I think your stm32 has TWO banks of FLASH, so if your program is in one then you are free to program the other 1MB without freezing the processor.

The data sheet suggests to program an entire 1 MB bank takes 11 seconds, so that's less than 100k per second. So it doesn't look fast enough.

Numbers from Table 68 of the data sheet.

Edit: As to endurance, you can reprogram 10000 times.

Hope this helps,

Danish

thank you very much your answer was very useful to me.