Disable / Enable interrupts for rest of handler on MPC5777C

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

Disable / Enable interrupts for rest of handler on MPC5777C

Jump to solution
1,760 Views
20Sidar04
Contributor III

Dear Mr./Mrs.

I have a question about enable or disable of interrupts on MPC5777C? When I check sample source code for enable interrupt, I saw assembly code such as "__asm__(" wrteei 1");" for diasble "__asm__(" wrteei 0");" Can I use C instead of asm for enable this source code? What could could be instead of "wrteei" for my source code when I prefer C? Does it essential to use assembly to develop project for INT Controller?

Best Regars.

 

0 Kudos
Reply
1 Solution
1,751 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Core SPR registers only can be accesses by special instructions. wrteei 1/0 is simplified mnemonic of SPR access.

I have sometimes been using header file as attached to simplify SPR/MSR access in C but using of assembly instruction is necessary, it cannot be done directly in C.

View solution in original post

0 Kudos
Reply
1 Reply
1,752 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Core SPR registers only can be accesses by special instructions. wrteei 1/0 is simplified mnemonic of SPR access.

I have sometimes been using header file as attached to simplify SPR/MSR access in C but using of assembly instruction is necessary, it cannot be done directly in C.

0 Kudos
Reply