Disable / Enable interrupts for rest of handler on MPC5777C

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

Disable / Enable interrupts for rest of handler on MPC5777C

跳至解决方案
1,019 次查看
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 项奖励
1 解答
1,010 次查看
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 项奖励
1 回复
1,011 次查看
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 项奖励