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:
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
Hi,lama
TIM0TC3 += 500 , cause the problem. What can I do?
Thanks!