I am trying to generate an interrupt when Timer2 overflows. I cannot get the application to jump to my Timer2 ISR if I have serial interrupts enabled, though. I make sure to clear my RI and TI bits in my serial ISR.
Is there anything else I'm overlooking?
Thanks,
Paul
if I have serial interrupts enabled I assume this means that it works when you do not enable the UART ints.
1) you do not happen to use T2 for the UART 2) is your serial ISR huge? 3) if you have printf's in an ISR get rid of them
Erik
Erik,
Thanks for the quick response.
Everything works when ES1 = 0 and I'm using Timer1 for UART baud generation. My Timer2 ISR just sets a flag that is checked by the main thread which then starts the ADC to get my voltage reading. Nothing too complicated. No printf's in either ISR's.
My Timer2 ISR ..... 2) is your serial ISR huge?
also, what happens if you set the T2 int to high priority? NOTE: this will NOT be "the cure" it is a diagnostic measure.
Sorry I miss read your reply. No my serial ISR is not huge. It just reads the SBUF1 into a char array buffer and clears the RI pin. My main loop then deals with the data.
Everything does work when T2 is set to high priority. Ideas?
with the information you have provided, the problem can not possibly exist. Thus something must be missing.
I guess you will have to post your code (no tabs and see above "place source ......")