cancel
Showing results for 
Search instead for 
Did you mean: 

A question about microcontroller flash memory size

hosseinam1370
Associate II

 

The meaning of this "flash" is that we have 512 kilobytes of memory, where each memory cell is 64 bits or 8 bytes. What does this mean? Or why doesn't it directly say 512k * 8 = 4 gigabytes of flash memory?

Can there be 8 bytes inside one byte?

 

photo_2024-03-28_08-05-39.jpgphoto_2024-03-28_08-08-35.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
STOne-32
ST Employee

Dear @hosseinam1370 ,

The Flash hardblock of the STM32F1 series has a Matrix interface FLITF of 64-bits wide. That means at one HCLK cycle, the Flash Interface reads 64-bits or 8 bytes at a time.    The device you selected has 512Kbytes of Flash which is the High density line.  The one highlighted is the XL density and has a flash up to 1024Kbytes of Flash so constructed as 128K * 64-bits = 1024Kbytes. each Page has a size of 2Kbytes for Erase/programming.

Hope it helps you.

STOne-32.

View solution in original post

5 REPLIES 5
Pavel A.
Evangelist III

This is an error in the text. Of course "64 Kbytes x 64 bits" is nonsense. Should be 64 K x 64 bits = 512 KBytes.

 

STOne-32
ST Employee

Dear @hosseinam1370 ,

The Flash hardblock of the STM32F1 series has a Matrix interface FLITF of 64-bits wide. That means at one HCLK cycle, the Flash Interface reads 64-bits or 8 bytes at a time.    The device you selected has 512Kbytes of Flash which is the High density line.  The one highlighted is the XL density and has a flash up to 1024Kbytes of Flash so constructed as 128K * 64-bits = 1024Kbytes. each Page has a size of 2Kbytes for Erase/programming.

Hope it helps you.

STOne-32.

Thank you for your response.

But I still can't understand what "64 bits" means.

Actually, I want to calculate the amount of memory. For example, in the XL-density microcontroller, the second image:

If you multiply 512 by 2 kilobytes, it becomes 1,024,00 bytes.

On the other hand, if you multiply 128 kilobytes by 64, it becomes 1,024,000 bytes.

So here we should have 1,024,000 bytes of flash memory, so what does "64 bits" mean?

If this microcontroller has 128kb of memory, why do we have 512 2-kilobyte pages?

How much flash memory does this micro have?

The one in question has upto 512KB

That is arrayed in lines which are 64-bit wide. So a group of 8 bytes. It decodes and fetches this way because it is slow. Figure about 35ns, and so the cost of the fetch is spread over 4 half-words, which is the width of the instruction opcodes.

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

The XL series has one model with 1MB, that has two 512KB banks. Like having two independent Flash chips. You can write/erase one whilst executing from the other, without stalling the MCU

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