This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Interrupt called with interrupt

I am facing a problem that while executing a serial receive interrupt my program needs to service a timer0 interrupt. The program is not jumping to the timer0 isr till the uart isr is fully complete even an overflow is generated and interrupt has been enabled ??

Parents
  • I am not familiar with the interrupt function for the mentioned processor but can the 2 interrupts be of the same priority level but in different 'Groups'? Well that again would work only if you have 2 seperate interrupts arriving at the same time.
    For your application it sounds as if it is better to have the timer start and overflow within the first interrupt routing. Am i correct?

Reply
  • I am not familiar with the interrupt function for the mentioned processor but can the 2 interrupts be of the same priority level but in different 'Groups'? Well that again would work only if you have 2 seperate interrupts arriving at the same time.
    For your application it sounds as if it is better to have the timer start and overflow within the first interrupt routing. Am i correct?

Children
  • "Actually I am using timer0 as a time-out to exit the serial ISR waiting for the second byte."

    Please stop with that. Do not let your processor busy-loop in any ISR waiting for more events.

    Instead let your main loop wait until your serial ISR collects the second byte or until the timer interrupt (or just polled timer test) indicates a timeout.

    You really should not (!) create "slow" interrupts. It will just complicate everything for you