<div dir="ltr"><div><div>I just have one more questions regarding the timer which I am not able to find in the document. Now, with your help I am able to create the timer, and for setting that up, I am using  "rtems_timer_fire_after" directive. The status code returned by this function doesn't show any error, but my "callback function" is not getting called. After looking in the definition of function "rtems_timer_fire_after", I found that timer internally uses "watchdog" functionality. Does that mean watchdog device driver required for timer? I am working on sparc simulator, and I think the sparc bsp does not have watchdog driver because I got linker error after including the "CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER ".<br>
<br></div>Thanks<br></div>Manish<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 7, 2013 at 6:18 PM, 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 bgcolor="#FFFFFF" text="#000000"><div class="im">
    <div>On 04/07/2013 03:32 PM, manish jain
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>Thanks Joel..<br>
          </div>
          It is working now but while I used clock driver with timer I
          didn't get any compiler error..<br>
          <br>
        </div>
      </div>
    </blockquote></div>
    I am glad to know that worked.<br>
    <br>
    I have a patch in my tree so next time someone will get a compile
    error.<br>
    You can only specify one of need clock, need timer, or do not need
    clock.<br>
    There were checks for having 0 defined but not > 1. <br><span class="HOEnZb"><font color="#888888">
    <br>
    --joel</font></span><div><div class="h5"><br>
    <blockquote type="cite">
      <div dir="ltr">Manish<br>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">
          On Sun, Apr 7, 2013 at 4:18 PM, 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>
              <div>On 04/07/2013 03:05 PM, manish jain wrote:<br>
                <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  Hi,<br>
                  I am just running a small Init task in which I am
                  creating a "timer". But the status returned by the
                  "rtems_timer_create" function is "RTEMS_TOO_MANY ". I
                  think, this status is referring to a maximum numbers
                  of objects already allocated. But in my task I am just
                  creating one timer. Do I need to preconfigure before
                  using the timer? For now I am using following macros:<br>
                  <br>
                  #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER<br>
                  #define CONFIGURE_INIT_TASK_ATTRIBUTES
                  RTEMS_FLOATING_POINT<br>
                  #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER<br>
                  <br>
                  Can someone tell me what I might be missing? I am
                  currently running my task on sparc sis simulator.<br>
                  <br>
                </blockquote>
              </div>
            </div>
            You can't configure the timer and clock driver at the same
            time.<br>
            This should have resulted in a compile time error. On most
            BSPs,<br>
            these use the same hardware so it is considered a general
            error.<br>
            Besides, the timer driver is for a "benchmark timer" used by<br>
            the RTEMS Timing Test Suites -- and they assume no clock
            tick.<br>
            <br>
            I don't know why your initialization task needs floating
            point but<br>
            that is your application's requirement.<br>
            <br>
            If you are creating a Classic API timer via the
            rtems_timer_create()<br>
            method, then you need to configure the system to account for<br>
            how many instances of Classic API Timers you need.
             Something<br>
            like this:
            <div><br>
              <br>
              #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER<br>
              #define CONFIGURE_INIT_TASK_ATTRIBUTES
              RTEMS_FLOATING_POINT<br>
            </div>
            #define CONFIGURE_MAXIMUM_TIMERS 1<br>
            <br>
            If you need more than one timer, then up that number.<br>
            <br>
            If you want standard in, out and error to work (e.g.
            printf()), then<br>
            you should also have:<br>
            <br>
            #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER<br>
            <br>
            I just posted a re-write of the Configuring a System chapter
            in the<br>
            Users Guide. Everything you should need to know is in it and<br>
            hopefully better presented than the current version.<br>
            <br>
            <a href="http://www.rtems.org/ftp/pub/rtems/people/joel/config-v1.pdf.bz2" target="_blank">http://www.rtems.org/ftp/pub/rtems/people/joel/config-v1.pdf.bz2</a><br>
            <br>
            The current version is terse where the new version includes<br>
            more information in a more structured fashion.  :)<br>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              Manish<br>
              <br>
              <span><font color="#888888">
                </font></span></blockquote>
            <span><font color="#888888">
                <br>
                <br>
                -- <br>
                Joel Sherrill, Ph.D.             Director of
                Research& Development<br>
                <a href="mailto:joel.sherrill@OARcorp.com" target="_blank">joel.sherrill@OARcorp.com</a>        On-Line Applications
                Research<br>
                Ask me about RTEMS: a free RTOS  Huntsville AL 35806<br>
                Support Available               <a href="tel:%28256%29%20722-9985" value="+12567229985" target="_blank">(256) 722-9985</a><br>
                <br>
              </font></span></blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <br>
    <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 35806
Support Available               <a href="tel:%28256%29%20722-9985" value="+12567229985" target="_blank">(256) 722-9985</a></pre>
  </div></div></div>

</blockquote></div><br></div>