Xmc4500 flash size

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User7688
Level 2
Level 2
How do I know , by code , the total size of the flash memory?
0 Likes
4 Replies
Not applicable
Hi there,
Your memory structure has been set in the linker_script.ld file in main project directory. That is total flash size. If you want to see the used flash, you can refer to map file which shows all the addresses of Flash and RAM used while flashing the code.
The total flash size in XMC4500 is 2 MB, including 1MB cached and 1MB uncached Flash.
Hope it helped.

Regards
0 Likes
User7688
Level 2
Level 2
Hi Saqiba,
XMC4500 has two versions of flash size (768KB and 1024KB).
I need to detect by code . I can detect the size by reading FLASH0_ID?


thank you
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
No. FLASH0_ID register does not have this information.
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Your software is only specific to a particular XMC4000, hence it should take note of this.
0 Likes