2025-05-29 10:53 PM
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
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.
Solved! Go to Solution.
2025-05-30 1:35 AM
Mind the gap. Note that the numeration is not continuous: 0-127 then 256-383. Total 2*128 = 256 pages.
2025-05-30 1:35 AM
Mind the gap. Note that the numeration is not continuous: 0-127 then 256-383. Total 2*128 = 256 pages.