This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Virtual interrupts?


On 10/12/2011 09:41 AM, Will Wagner wrote:
On 12/10/2011 14:25, Tom Schouten wrote:

<snip>


From my limited knowledge it seems however that it is not possible to "fake" an interrupt, i.e.

#define CYGNUM_HAL_INTERRUPT_VIRTUAL0 33
#define CYGNUM_HAL_INTERRUPT_VIRTUAL1 34

such that these 33 and 34 vectors can be used in
cyg_drv_interrupt_create() of some eCos driver.

If I understand what you are asking for this is pretty straight forward, in fact for the at91 there is already code doing this for the SYS interrupt and so extending it to PIOa and PIOB is pretty easy. If you look in packages\hal\arm\at91\var\current\src\at91_misc.c you can see how this is done for the SYS interrupt.
Following this was indeed straight forward for a single pin.

Though this seems to break down for multiple pins, as reading the interrupt status register
HAL_READ_UINT32(AT91_PIOA + AT91_PIO_ISR, isr);
might return multiple flags, and I don't see a way to then map this to triggering multiple vectors.


Once the ISR is read, all the flags are reset so it's not possible to only ack one and let it re-trigger in hardware.

Any idea how to work around that?

Cheers
Tom


-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]