MPC5744 MSR Register Reading in C Program

cancel
Showing results for 
Search instead for 
Did you mean: 

MPC5744 MSR Register Reading in C Program

585 Views
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 Kudos
2 Replies

428 Views
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 Kudos

428 Views
juliusjai
Contributor II

Hi Alex,

Thanks for the hint.

I'll try.

0 Kudos