cancel
Showing results for 
Search instead for 
Did you mean: 

Flash structure confusing page number

skuma.8
Associate III

Hii

I am using stm32g0b0cet6, while writing bootloader, i am confused with the page number and the total storage.

Its total storage is 512 kb, According to the reference manual, The Main memory is shown like below

skuma8_0-1748584125478.png

Question1: If each page is 2kb & total number of pages are 383, then total flash should would be 2x383 = 768 kb. (contradiction ot total flash size)

Question2: According to the memory address given of first & last page, the total memory comes up after calculation is 512 kb. here is the calculation:

0x0807F800(last page starting address) - 0x08000000 (0th page starting address) = 0x7F800 = 522240 bytes
Add the last page size (2 KB = 2048 bytes):
522240 + 2048 = 524288 bytes = 512 KB

So if it is 512 kb, divided by page size 2kb, it should have total number of page as 256. right? but reference manual have mention 383.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Super User

Mind the gap. Note that the numeration is not continuous:  0-127 then 256-383. Total 2*128 = 256 pages.

 

 

View solution in original post

1 REPLY 1
Pavel A.
Super User

Mind the gap. Note that the numeration is not continuous:  0-127 then 256-383. Total 2*128 = 256 pages.