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: ISR not causing an DSR in some rare conditions


"Stefan Sommerfeld" <sommerfeld@mikrom.de> writes:
> Hi,
>>>
>>> i'm using XScale PXA270 processor with latest eCos and I think I found a
>>> problem with DSR's. I'm 100% sure that there must be a condition
>>> where eCos
>>> not calls the DSR of an interrupt. I have a IRQ which comes 45 times a
>>> second on a system running at high load. After more then 10 hours
>>> one DSR
>>> is missing. This is a bad situation which makes the system unstable.
>>>
>>> Is this problem known? Maybe it depends only on the architecture (ARM).
>>
>> Does the ISR reenable the interrupt? It could be the next interrupt
>> arrives before the DSR is called. In that case the DSR will be called
>> with the count value of 2.
>
> No. The interrupts will not be disabled at any time. The interrupt from 
> this source will only be acknowledged in the isr function.
>
> The functionality is simple. A hardware unit will be started and reports 
> the finish with an interrupt. I have made a counter on hardware unit start, 
> isr and dsr. After this long-run test, the dsr counter is one less than the 
> other counters.

Did you bother to read the manual? Here is citation:

"""
void
dsr_function(cyg_vector_t vector,
             cyg_ucount32 count,
             cyg_addrword_t data)
{
}

[...] The second argument indicates the number of these interrupts
that have occurred and for which the ISR requested a DSR.  Usually this
will be 1, unless the system is suffering from a very heavy load.
"""

Thus, you need to increment your test counter by the value of 'count'
argument in the DSR handler, do you?

-- Sergei.


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