How to configure DEC

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

How to configure DEC

742 Views
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 Replies

600 Views
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 Kudos

600 Views
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

600 Views
xiaofangu
Contributor III

Sorry,I forgot to mention that the MCU is MPC5634m

0 Kudos