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?
this is copied from reference manual for MPC5668G, page 412:
thanks. That's what I was looking.
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.
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();
thank you very much for this example.
In case of GHS compiler you could just use __MFSPR(286)
Retrieving data ...