Is there a way to identify the MCU at run time?

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

cross mob
giroc_1679876
Level 1
Level 1
First question asked

We have boards that mount either 9BF564L or 9BF566L.

Our custom bootloader checks for application code integrity computing CRC over the application flash area and so he needs to know how big is this area.

We can of course having different bootloaders for different MCUs but it would be better if we can do this with just one bootloader that's able to recognize the MCU where it's running (or, in equivalent way, that's able to detect how much flash memory is available on chip).

Any idea?

ARM MCUs have plenty of registers in System Control area (0xE000_0000..0xE00F_FFFF) for checking cpu/system type/revision/features/etc but I can't find out anything just simple or useful like a "manufacturer device id" or "flash size" or something like that...

0 Likes
1 Solution
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

Apologies for the delay. There is no register available that meets the requirement.

Thus, you would need to generate different projects for different MCUs.

View solution in original post

0 Likes
1 Reply
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

Apologies for the delay. There is no register available that meets the requirement.

Thus, you would need to generate different projects for different MCUs.

0 Likes