How to configure DEC

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to configure DEC

840件の閲覧回数
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 返答(返信)

698件の閲覧回数
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 件の賞賛
返信

698件の閲覧回数
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

698件の閲覧回数
xiaofangu
Contributor III

Sorry,I forgot to mention that the MCU is MPC5634m

0 件の賞賛
返信