public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] On RTC's isr!
@ 2002-07-14 20:26 zhlg_shuhan
  2002-07-15  2:16 ` Robert Cragie
  0 siblings, 1 reply; 2+ messages in thread
From: zhlg_shuhan @ 2002-07-14 20:26 UTC (permalink / raw)
  To: ecos-discuss

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1778 bytes --]

hi,all.
   why  not RTC's isr call dsr_post()?
then,how rtc's dsr() was called?

cyg_uint32 Cyg_RealTimeClock::isr(cyg_vector vector, CYG_ADDRWORD data)
{
//    CYG_REPORT_FUNCTION();

#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY) && defined(HAL_CLOCK_LATENCY)
    if (measure_clock_latency) {
        cyg_int32 delta;
        HAL_CLOCK_LATENCY(&delta);
        // Note: Ignore a latency of 0 when finding min_clock_latency.
        if (delta > 0) {
            // Valid delta measured
            total_clock_latency += delta;
            total_clock_interrupts++;
            if (min_clock_latency > delta) min_clock_latency = delta;
            if (max_clock_latency < delta) max_clock_latency = delta;
        }
    }
#endif

    CYG_INSTRUMENT_CLOCK( ISR, 0, 0);

    HAL_CLOCK_RESET( CYGNUM_HAL_INTERRUPT_RTC, CYGNUM_KERNEL_COUNTERS_RTC_PERIOD );

    Cyg_Interrupt::acknowledge_interrupt(CYGNUM_HAL_INTERRUPT_RTC);

#if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY)
    HAL_CLOCK_READ(&clock_dsr_start);
#endif    
    return Cyg_Interrupt::CALL_DSR|Cyg_Interrupt::HANDLED;
}


and in rtc's dsr(),parameter count maybe >1,but when i check
call_pending_DSRS(),i found count=1! why?

                                    
                                                     zhlg 
______________________________________

===================================================================
ÐÂÀËÃâ·Ñµç×ÓÓÊÏä (http://mail.sina.com.cn)
ÐÂÀË·ÖÀàÐÅÏ¢£º¶þÊÖÊг¡×ßÒ»×ߣ¬¸Ã³öÊÖʱ¾Í³öÊÖ£¡ (http://classad.sina.com.cn/2shou/)

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [ECOS] On RTC's isr!
  2002-07-14 20:26 [ECOS] On RTC's isr! zhlg_shuhan
@ 2002-07-15  2:16 ` Robert Cragie
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Cragie @ 2002-07-15  2:16 UTC (permalink / raw)
  To: zhlg_shuhan, ecos-discuss

Returning from the ISR with the Cyg_Interrupt::CALL_DSR flag set schedules
the DSR to be called. There is no need to explicitly call or schedule the
DSR.

I'm not sure about your second question, but there have been numerous posts
to this mailing list regarding real time clock ticks not working as expected
on certain platforms.

Robert Cragie, Design Engineer
________________________________________________________
Jennic Ltd, Furnival Street, Sheffield, S1 4QT,  UK
www.jennic.com  Tel: +44 (0) 114 281 2655


> -----Original Message-----
> From: ecos-discuss-owner@sources.redhat.com
> [mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of zhlg_shuhan
> Sent: 15 July 2002 04:14
> To: ecos-discuss@sources.redhat.com
> Subject: [ECOS] On RTC's isr!
>
>
> hi,all.
>    why  not RTC's isr call dsr_post()?
> then,how rtc's dsr() was called?
>
> cyg_uint32 Cyg_RealTimeClock::isr(cyg_vector vector, CYG_ADDRWORD data)
> {
> //    CYG_REPORT_FUNCTION();
>
> #if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY) &&
> defined(HAL_CLOCK_LATENCY)
>     if (measure_clock_latency) {
>         cyg_int32 delta;
>         HAL_CLOCK_LATENCY(&delta);
>         // Note: Ignore a latency of 0 when finding min_clock_latency.
>         if (delta > 0) {
>             // Valid delta measured
>             total_clock_latency += delta;
>             total_clock_interrupts++;
>             if (min_clock_latency > delta) min_clock_latency = delta;
>             if (max_clock_latency < delta) max_clock_latency = delta;
>         }
>     }
> #endif
>
>     CYG_INSTRUMENT_CLOCK( ISR, 0, 0);
>
>     HAL_CLOCK_RESET( CYGNUM_HAL_INTERRUPT_RTC,
> CYGNUM_KERNEL_COUNTERS_RTC_PERIOD );
>
>     Cyg_Interrupt::acknowledge_interrupt(CYGNUM_HAL_INTERRUPT_RTC);
>
> #if defined(CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY)
>     HAL_CLOCK_READ(&clock_dsr_start);
> #endif
>     return Cyg_Interrupt::CALL_DSR|Cyg_Interrupt::HANDLED;
> }
>
>
> and in rtc's dsr(),parameter count maybe >1,but when i check
> call_pending_DSRS(),i found count=1! why?
>
>
>                                                      zhlg
> ______________________________________
>
> ===================================================================
> ÐÂÀËÃâ·Ñµç×ÓÓÊÏä (http://mail.sina.com.cn)
> ÐÂÀË·ÖÀàÐÅÏ¢£º¶þÊÖÊг¡×ßÒ»×ߣ¬¸Ã³öÊÖʱ¾Í³öÊÖ£¡
> (http://classad.sina.com.cn/2shou/)
>
> --
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
>
>


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-15  9:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-14 20:26 [ECOS] On RTC's isr! zhlg_shuhan
2002-07-15  2:16 ` Robert Cragie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).