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.
已解决! 转到解答。
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.