<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<pre style="word-wrap:break-word; font-size:10.0pt; font-family:Tahoma; color:black">The clock driver initialization should handle things.
Setting the time of day has no impact on the clock tick working. Having a wall time is independent of interval time.
Your tick rate is OK. The overhead is quite low. I have seen similar CPU speeds use 250 microsecond tick rate and still function OK.
The interrupt is either stuck and not clearing .. No interrupt stack.. Etc.
--joel
Matthew J Fletcher <amimjf@gmail.com> wrote:
</pre>
<div>Hi,<br>
<br>
Sorry all, i was placing breakpoints inside rtems which i have built with -Os, so i got the wrong idea. Checking the return code from rtems_clock_set() shows it works with the ticker example time setup.<br>
<br>
I think my issue is that as soon as the 10ms ISR calls rtems_clock_tick() no tasks get scheduled, not the idle routine, not even the Init() task. When i halt execution in the debugger i only ever see the callstack from of the ISR calling rtems_clock_tick();<br>
<br>
I have a 20Mhz ARM7TDMI board so a 10ms call to rtems_clock_tick should just take a few microseconds.<br>
<br>
I use,.<br>
<br>
#define CONFIGURE_MICROSECONDS_PER_TICK 10000<br>
#define CONFIGURE_TICKS_PER_TIMESLICE 50<br>
<br>
I guess there is some pre-requisite i need to setup before i call rtems_clock_tick() the first time. I guessed it was having the clock set as various bits of code check _TOD_Is_set but i call rtems_set_clock() before i enable the tick ISR.<br>
<br>
<br>
<br>
<div class="gmail_quote">On 1 March 2013 17:10, Joel Sherrill <span dir="ltr"><<a href="mailto:joel.sherrill@oarcorp.com" target="_blank">joel.sherrill@oarcorp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div class="im">
<div>On 3/1/2013 10:56 AM, Matthew J Fletcher wrote:<br>
</div>
<blockquote type="cite">Gedare,<br>
<br>
Yes the "hello" example works fine. I just tried the "ticker" example, but rtems_clock_set() returns RTEMS_INVALID_CLOCK. Odd, maybe the samples dont get tested very often.<br>
<br>
</blockquote>
</div>
They get run all the time. I am heading off for the weekend but will try to<br>
run it on something I have a simulator for.
<div class="im"><br>
<blockquote type="cite">It _TOD_Validate() is rejecting the time set in the example, and i am literally using the code from the example. Its returning false at the first 'if' test, the big one checking against the constants.<br>
<br>
Is the test for 'the_tod->year < TOD_BASE_YEAR' correct given then are equal at 1988 ?<br>
<br>
</blockquote>
</div>
Yes. <br>
<div>
<div class="h5">
<blockquote type="cite"><br>
<div class="gmail_quote">On 1 March 2013 15:40, Gedare Bloom <span dir="ltr"><<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Fri, Mar 1, 2013 at 9:07 AM, Matthew J Fletcher <<a href="mailto:amimjf@gmail.com" target="_blank">amimjf@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> Do rtems applications normally create a new task straight away in Init() ? i<br>
> ask because i seem to get stuck with no threads being scheduled after the<br>
> first Clock_isr.<br>
><br>
</div>
By the time Init gets executed the entire application stack should be<br>
set up and multithreading/interrupts should work fine. Init can either<br>
create new tasks, or execute the workload directly.<br>
<div><br>
> So after boot_card() completes rtems context switches into Init(), there i<br>
> setup my 10ms tick ISR which calls rtems_clock_tick(). But the original<br>
> thread Init() never gets scheduled again after the first call to<br>
> rtems_clock_tick(). I've used JTAG to place breakpoints and i can see the<br>
> code in Init() is not being run.<br>
><br>
</div>
I don't understand what you mean about Init setting up the clock tick.<br>
The ISR for clock handling should be installed during rtems<br>
initialization when the clock driver is installed. Have you<br>
successfully executed the "hello" sample on your board? If so the next<br>
one to test is ticker, which should give you an idea of whether the<br>
clock tick + context switch is working.<br>
<br>
-Gedare<br>
<div><br>
> I can see the ISR is being called and the interrupt acknowledged due to<br>
> breakpoints there.<br>
><br>
> Interestingly although i am using the arm-rtemseabi4.11-gdb 'info threads'<br>
> only shows the current context of the ISR not the Init() thread, that might<br>
> be a different issue though.<br>
><br>
><br>
> regards<br>
> ---<br>
> Matthew J Fletcher<br>
><br>
><br>
</div>
> _______________________________________________<br>
> rtems-users mailing list<br>
> <a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a><br>
> <a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
><br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div><br>
regards</div>
<div>---</div>
<div>Matthew J Fletcher</div>
<br>
</blockquote>
<br>
<br>
</div>
</div>
<span class="HOEnZb"><font color="#888888">
<pre cols="72">--
Joel Sherrill, Ph.D. Director of Research & Development
<a href="mailto:joel.sherrill@OARcorp.com" target="_blank">joel.sherrill@OARcorp.com</a> On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985 </pre>
</font></span></div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div><br>
regards</div>
<div>---</div>
<div>Matthew J Fletcher</div>
<br>
</div>
</body>
</html>