Hi,
for my application I need the core IDs of the z6 and z0 core to distinguish between those two. How do I get this IDs in my application?
Best regards,
Tim
Solved! Go to Solution.
Hi,
this is copied from reference manual for MPC5668G, page 412:
Page 357:
Regads,
Lukas
Hi,
this is copied from reference manual for MPC5668G, page 412:
Page 357:
Regads,
Lukas
Hi Lukas,
I've got another question regarding the CoreID. Do you have an example for the processor_number() function which is used in the example above? I don't actually know how to get the ID in my c code.
Regards,
Tim
In case of GHS compiler you could just use __MFSPR(286)
Hi Tim,
you can use something like this:
unsigned int asm Read_Processor_ID(void)
{
mfspr r3,286 /* r3 is used for return value (given by EABI standard for power architecture), so just load the PIR register (SPR 286) to r3 */
}
Then just call the function:
unsigned int CoreID;
CoreID = Read_Processor_ID();
Lukas
Hi Lukas,
thank you very much for this example.
Regards,
Tim
Hi Lukas,
thanks. That's what I was looking.
Regards,
Tim