Core ID MPC 5668G

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Core ID MPC 5668G

Jump to solution
1,420 Views
tim_09
Contributor II


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

Labels (1)
0 Kudos
1 Solution
1,195 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

this is copied from reference manual for MPC5668G, page 412:

pastedImage_0.png

Page 357:

pastedImage_1.png

Regads,

Lukas

View solution in original post

0 Kudos
6 Replies
1,196 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

this is copied from reference manual for MPC5668G, page 412:

pastedImage_0.png

Page 357:

pastedImage_1.png

Regads,

Lukas

0 Kudos
1,195 Views
tim_09
Contributor II

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

0 Kudos
1,195 Views
alexvinchev
Contributor V

In case of GHS compiler you could just use __MFSPR(286)

0 Kudos
1,195 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

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

0 Kudos
1,195 Views
tim_09
Contributor II

Hi Lukas,

thank you very much for this example.

Regards,

Tim

0 Kudos
1,195 Views
tim_09
Contributor II

Hi Lukas,

thanks. That's what I was looking.

Regards,

Tim

0 Kudos