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

how to make work usb and pit interrupt

Hello,

i need to have at same time turned on pit interrupt and usb interrupt. When i use only one of it it works good. But when both interrupts are turn on the pit interrupt works good but usb stops during enumeration process. I work with at91sam7x and use atmel's kod for mass storage device.

Thanks in advance

Parents
  • Read the datasheet for the specific interrupt source. It tells you what the ISR needs to do - if it needs to clear any register bits to acknowledge that the interrupt has been handled?

    Is it possible to run out of time for the main loop? Of coruse there is - I wouldn't have written it if it wasn's so. If the peripherial still thinks it needs servicing when the interrupt handler ends, then the processor will once more detect the interrupt source and reenter the interrupt. So depending on processor used, you may get zero or maybe a few clock cycles for the main loop before next interrupt happens.

Reply
  • Read the datasheet for the specific interrupt source. It tells you what the ISR needs to do - if it needs to clear any register bits to acknowledge that the interrupt has been handled?

    Is it possible to run out of time for the main loop? Of coruse there is - I wouldn't have written it if it wasn's so. If the peripherial still thinks it needs servicing when the interrupt handler ends, then the processor will once more detect the interrupt source and reenter the interrupt. So depending on processor used, you may get zero or maybe a few clock cycles for the main loop before next interrupt happens.

Children
  • At the end of servis routine in both handlers i set AIC_eoicr but it gives no effect. Also i made an experiment and cleard both handler function (they were empty inside) and it gives no change. Is it possible that pit(system int) and usb (as mass storage divice) int when wokrs simultaneously cause no enter to main loop?