About SystemCoreClock and g_chipid

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

cross mob
User10215
Level 4
Level 4
First like received
Hi everybody,

I'm using a XMC4800 and I'm working on a project in Keil. In the "system_XMC4800.c" there are the two variables "SystemCoreClock" and "g_chipid" which are put at specific addresses in RAM:


#if defined ( __CC_ARM )
uint32_t SystemCoreClock __attribute__((at(0x2003FFC0)));
uint8_t g_chipid[16] __attribute__((at(0x2003FFC4)));
#endif


Is there a reason for those variables to be at those addresses? Would it break something when I leave it to the linker to place those variables into RAM?

Regards,
Niclas
0 Likes
1 Reply
User11041
Level 1
Level 1
I think it will only be a problem if those hardware addresses are accessed by hardware. SystemCoreClock might be accessed by the PLL. But that's only a guess.
0 Likes