MPC5744 MSR Register Reading in C Program

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MPC5744 MSR Register Reading in C Program

1,421 次查看
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,264 次查看
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,264 次查看
juliusjai
Contributor II

Hi Alex,

Thanks for the hint.

I'll try.

0 项奖励
回复