linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Timers on mpc8248 etc...
@ 2007-11-28 23:41 Alan Bennett
  2007-11-28 23:43 ` Scott Wood
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Bennett @ 2007-11-28 23:41 UTC (permalink / raw)
  To: linuxppc-dev

I've got a routine that needs to delay for X microseconds, this is a
must.  The command after schedule_timeout must has to wait for the HW
to complete a task that takes X microseconds.

I would think that one way to do this is with a simple
schedule_timeout.  But in the example below, the time that passes from
run1() to dontrun() is far less than 3.2 msecs.  Infact, sometimes its
~ 800 micros according the a analyzer looking at points triggered in
run1() and donrun().  Could this be a configuration problem with the
timer/interrupt that generates the jiffies?


run1();
delaytime = 3280;
set_current_state(TASK_UNINTERRUPTIBLE) ;
schedule_timeout(usecs_to_jiffies(delaytime));  //1HZ = 1 second
1/1000 second = 1 milli
dontrun();

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

end of thread, other threads:[~2007-11-29 19:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-28 23:41 Timers on mpc8248 etc Alan Bennett
2007-11-28 23:43 ` Scott Wood
2007-11-29  4:06   ` Alan Bennett
2007-11-29 11:31     ` Vitaly Bordug
2007-11-29 13:50       ` Alan Bennett
2007-11-29 19:05         ` Alan Bennett

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 NNTP newsgroup(s).