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]

contents of the table " hal_interrupt_handlers" arm7 processor


Hi,
my program generates "spurious interrupts" from time to time. This is not surprising, because I have several threads that access the data that are also used by my pwm_isr. And all these data accesses are embedded between mask/unmask calls as shown below:


cyg_interrupt_mask(CYGNUM_HAL_INTERRUPT_PWMC);
....access here...
cyg_interrupt_unmask(CYGNUM_HAL_INTERRUPT_PWMC);

The hardware-manual tells me that under such conditions, spurious interrupts are likely to occure (and can thus not be avoided - except one sacrifices data integrity - which is of course an unacceptable choice)

ECOS has a feature which should handle such "spurious interrupts" correctly - simply write to eoi and exit - but it does not work

In vectors.S I find the sequence:
---------------------------------------------------------------------
        cmp     r0,#CYGNUM_HAL_INTERRUPT_NONE   // spurious interrupt
        bne     10f

#ifdef  CYGIMP_HAL_COMMON_INTERRUPTS_IGNORE_SPURIOUS
        // Acknowledge the interrupt
        THUMB_CALL(r1,12,hal_interrupt_acknowledge)
#else
        mov     r0,v6                   // register frame
        THUMB_CALL(r1,12,hal_spurious_IRQ)
#endif // CYGIMP_HAL_COMMON_INTERRUPTS_IGNORE_SPURIOUS
        b       spurious_IRQ

10: ldr r1,.hal_interrupt_data
ldr r1,[r1,v1,lsl #2] // handler data
ldr r2,.hal_interrupt_handlers
ldr v3,[r2,v1,lsl #2] // handler (indexed by vector #)
-----------------------------------------------------------------------
I find, that the jump bne 10f is always executed and subsequently, the correct handler is fetched from the table hal_interrupt_handlers. But hellas - when I get my "spurious interrupt" I find that the interrupt source is correct (10 for pwm), the datapointer however is zero und all entries in the hal_interrupt_handlers table are filled with the address of the hal_default_isr.


I would expect the table hal_interrupt_handlers to be initialized during system startup. But obviously, this assumption is wrong. Which part of eCOS (dynamically) modifies this table and why??
Thanks for help and advice....Bob


--
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]