S12ZVML31 Timer0 Interrupt priority

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

S12ZVML31 Timer0 Interrupt priority

1,005 Views
frankkong
Contributor III

Hi,

Now ,I have a problem. 

I use the interrupt of Timer0 IOC0 (vector address 0x1CC)and IOC3(vector address 0x1C0). IOC3 is for input capture and IOC0 for output compare. The timer base frequency is 200K.  The problem is when I set the different priority it will meet some problem. If I set the same priority it works well. You can see the problem below:

优先级配置.png

Timer0中断优先级不一致出错.png

Tags (1)
0 Kudos
Reply
2 Replies

848 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

there are too few details to answer or investigate the issue. Setup looks to be good. But what is not visible is flags clearing, timer setup, service routine definition and body,...

Are you able to create simplified example project which contains only timer setup and simplified routines and highlights the issue. The best approach is to start with simplified project to exclude all possible dependences caused by other routines.

Clearing flag from TOV:

TFLG2 = 0x80;

Clearing flag from IC/OC event:

TFLG1 = 0x01;  // clear flag only fro OC0 event     // incorrect approaches TFLG1 |= 0x01; TFLG1_COF0 = 1;

TFLG1 = 0x08;  // clear flag only fro OC3 event     // incorrect approaches TFLG1 |= 0x08; TFLG1_COF3 = 1;

Best regards,

Ladislav

0 Kudos
Reply

848 Views
frankkong
Contributor III

Hi,lama

   TIM0TC3 += 500 , cause the problem. What can I do?

   

timer init.pngIOC0 interrupt.pngIOC3 interrupt.png中断优先级.pngTIME0TC3.png

Thanks!

0 Kudos
Reply