How to configure DEC

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

How to configure DEC

997 次查看
xiaofangu
Contributor III

Hello,

   I need to use DEC in S32DS.Power.2017.r1.And I have configured it.

   First time,it can run into DECisr()function,the related registers is look like:

   Image 1.png

and in the DECisr function,I clear the DIS flag:

__asm("e_lis %0, 0x0800\n\t"
"mttsr %0\n\t"
:"=r" (regi0));//if it is right

but,it seem not to clear DIS bit,and it is still 1.And then,the program can run back to main function successfully,and it cannot run into DECisr() anymore.

so,what's wrong with my progress?

3 回复数

855 次查看
xiaofangu
Contributor III

I'm sorry,Its a silly question,Because the  MSR[EE] is 0, so it cannot trigger interrupt.But Why MSR[EE] cleared unexpected?

0 项奖励
回复

855 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Him it is because EE affects External input (i.e. interrupt controller), decrementer, and fixed-interval timer. See MSR description below from core reference manual:

pastedImage_1.png

855 次查看
xiaofangu
Contributor III

Sorry,I forgot to mention that the MCU is MPC5634m

0 项奖励
回复