This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Clock and delay problem
- To: "Ecos-List (E-mail)" <ecos-discuss at sourceware dot cygnus dot com>
- Subject: [ECOS] Clock and delay problem
- From: Fabrice Gautier <Fabrice_Gautier at sdesigns dot com>
- Date: Thu, 24 Aug 2000 20:19:19 -0700
Hi,
In my eCos program there is a momemt where the clock doesn't advance no
more.
I'm using an i386 PC platform
I've a loop like this:
while ( /*some condiditon*/ )
{
i++;
if( (i & 0x1FF) == 0x1FF)
{
printf("%04d - time : %u \n",i,cyg_current_time());
asm("int $3");
}
cyg_thread_delay((cyg_tick_count_t)1000);
}
The printf is executed every 512 loop and each time it print the same time.
And the cyg_thread_delay doesn't take more time than an other normal
instruction.
What can explain this behaviour?
There is probably something in my program that cause this effect for if I do
a similar test at the beginning of the program I've no problem.
***
After some investigations, I can tell that the clock ISR is called, but not
the DSR. That's annoying for the clock update is done in the DSR. I tried to
step throught the ISR and DSR but it seems impossible since when I am in
interrupt_end, there is another IRQ0I came back in the ISR.
I don't understand how it comes that the DSR is not executed but the main
thread is. Maybe this explain also why there is no rescheduling in the
cyg_thread_delay call.
Thanks
--
Fabrice Gautier
fabrice_gautier@sdesigns.com