This is the mail archive of the ecos-discuss@sources.redhat.com 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: DSR question


All,

Problem:
When the ISR is invoked several times the OS seems to lock up.  After
investigation, the OS is running but the DSR loop is not being invoked.
Used ARM ICE to verify ISR is still being called, but the DSR block stops
being called. Why would this happen?  I'm sure it is some type of race
condition.  But, with a simple DSR and ISR how could this happen?  Verified
that the interrupt is not active.  The interrupt is MASKed off.  Turn the
interrupt back on via the emulator, the isr is called.   Also, the ISR/DSR
is being called a number of time, I'm doing a simulation by holding the
interrupt pin high for several seconds.

Observations:
The OS is running but any threads that are blocked on timers or any DSR
calls, they are stopped.  Created a simple thread that just sends messages
out the port, it never locks up.  Jut the threads blocked on timer, ie DSR.

Using eCOS version 2.0

Snippet for code:

static int
lcd_panel_isr(cyg_vector_t vector, cyg_addrword_t data, HAL_SavedRegisters
*regs)
{
    cyg_drv_interrupt_mask(CYGNUM_HAL_INTERRUPT_EINT2);
    cyg_drv_interrupt_acknowledge(CYGNUM_HAL_INTERRUPT_EINT2);
    return (CYG_ISR_CALL_DSR);  // Run the DSR
}

// This DSR starts up the touch panel [logical] processing
static void
lcd_panel_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data)
{

    cyg_drv_interrupt_unmask(CYGNUM_HAL_INTERRUPT_EINT2);
//    cyg_semaphore_post(&lcd_panel_sem);
}


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


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