Core ID MPC 5668G

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
4,115件の閲覧回数
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

ラベル(1)
0 件の賞賛
返信
1 解決策
3,890件の閲覧回数
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 件の賞賛
返信
6 返答(返信)
3,891件の閲覧回数
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 件の賞賛
返信
3,890件の閲覧回数
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 件の賞賛
返信
3,890件の閲覧回数
alexvinchev
Contributor V

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

0 件の賞賛
返信
3,890件の閲覧回数
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 件の賞賛
返信
3,890件の閲覧回数
tim_09
Contributor II

Hi Lukas,

thank you very much for this example.

Regards,

Tim

0 件の賞賛
返信
3,890件の閲覧回数
tim_09
Contributor II

Hi Lukas,

thanks. That's what I was looking.

Regards,

Tim

0 件の賞賛
返信