MPC5744 MSR Register Reading in C Program

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC5744 MSR Register Reading in C Program

1,419件の閲覧回数
juliusjai
Contributor II

Hi,

Does anybody know how to implement in C program the reading of MPC5744 - Machine State Register (MSR) register?

I need this for the Critical Section implementation.

Thanks in advance.

pastedImage_1.png

Cheers!

Julius

0 件の賞賛
返信
2 返答(返信)

1,262件の閲覧回数
alexanderfedoto
NXP Employee
NXP Employee

Have you tried asm("mfmsr 4") so that register 4 will hold MSR value ?

You have to use extended inline assembler syntax to read the value in C variable (Using the GNU Compiler Collection (GCC): Extended Asm )

0 件の賞賛
返信

1,262件の閲覧回数
juliusjai
Contributor II

Hi Alex,

Thanks for the hint.

I'll try.

0 件の賞賛
返信