Event not timing out with a wait of 1 tick (and sometimes 2)
Steven Johnson
sjohnson at sakuraindustries.com
Wed Jan 4 04:25:22 UTC 2006
Hi Ian,
Happy New Year also, to one and all.
This patch works as desired. A breakpoint on the watchdoginsert "if zero
set to one" triggers and a similar one in watchdogtickle no longer
triggers. So the feeling is this has removed the problem at the source.
Thanks for everyones help an input on this.
Steven
Ian Caddy wrote:
> Hi Steven,
>
> Happy New Year everyone.
>
> [snip]
> Stop everything! I just had another look at the watchdoginsert.c and
> decided that I quite get it right the first time. The after node, is
> actually going to be *after* the watchdog to be inserted, so my test
> is incorrect, we need to check whether we are at the head of the
> watchdog list with 0 in the delta_interval. To do this, we are
> inserting the new watchdog into the chain between the
> after->Node.previous, (new watchdog), after. Therefore we have to
> check whether the previous node is active.
>
> So, the test should be:
>
> } /* End of for loop */
>
> _Watchdog_Activate(the_watchdog);
>
> + /* Check that the after watchdog is still active
> + * (not removed in the ISR_Flash via a clock isr) */
> + if( ((Watchdog_Control *)after->Node.previous)->state !=
> + WATCHDOG_ACTIVE)
> + {
> + /* Ensure we have a delta_count of greater than 0
> + * since we haven't really started our timeout yet */
> + if(delta_interval == 0)
> + delta_interval = 1;
> + }
>
> the_watchdog->delta_interval = delta_interval;
>
> If you get a chance it would be good to test if this fixes the problem
> instead.
>
> regards,
>
> Ian Caddy
>
>
More information about the users
mailing list