Figure out size of Flash memory on XMC4800 automatically

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

cross mob
User14640
Level 1
Level 1
Hi everyone,

we are exploring the posibility to use one bootloader for all 1MB, 1.5MB and 2MB versions of the XMC4800. For that we need to know in the program how big the flash memory is.
I figured there would be a register that could tell me which version of the chip I'm working on, for instance XMC4800-F100x1024, but I haven't been able to find that in the Reference Manual.
Any kind of help would be much appreciated.

Kind regards
Al
0 Likes
1 Reply
User14604
Level 4
Level 4
First solution authored
I havent found such a register.

You could try to write to a flash memory location which does not exist for the 1 and 1.5 MB version and check the result. If it works without an error, it's the 2 MB chip. Otherwise start the next test to differentiate between 1 and 1.5 MB versions.
0 Likes