On Wed, 2007-06-06 at 23:16 -0400, Mike Sweeney wrote: > I am a little confused about what HAL_INTERRUPT_ACKNOWLEDGE is > intended to do. The reference manual for eCos says that it is used if > the interrupt controller requires you to acknowledge an interrupt. The > reason I am confused is that an interrupt service routine for a device > may need to clear a status flag in a peripheral status register even > if there is no interrupt controller. Is the intent that each interrupt > service routine handle this clearing of the flag in the peripheral > status register on its own, in addition to calling > HAL_INTERRUPT_ACKNOWLEDGE for handling anything that has to do with > the interrupt controller? > ...
I think this is because the interrupt controller is a shared resource and there may be some 'stacking' and 'unstacking' of state required to manage it and the priorities of interrupts that use it. Each interrupt routine usually has exclusive access to the peripheral that caused the interrupt and so the routine can directly handle interrupt-related registers in the peripheral, but some, most, or all peripheral interrupts might be channelled through the shared interrupt controller in a target-specific way. Generally, interrupts from higher priority sources are masked by the interrupt controller until HAL_INTERRUPT_ACKNOWLEDGE is called. If you don't have an interrupt controller, then the HAL_INTERRUPT_ACKNOWLEDGE macro/function is going to be very small if it exists at all. -- +--------------------------------------------- | Daniel Helgason <[EMAIL PROTECTED]> -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
