Re: Need to run function every 20ms.



Quanta be damned! CE is preemptive - a thread of higher priority will be scheduled if it need CPU at thenext tick or at an event which changes the run state. Just be careful using high priority threads - that is do not monopolize the CPU beyond what you need.

That said, you can generate a system tick every 1mS. You could modify the ISR to be clever enough to return a sysintr every 20th click.
Is there a match register associated with the system tick you could use?

See if the multimedia timer is good enough for your needs, and remember to elevate the priority of the thread so it will be sceduled.

If you need more accuracy and determinism then something can be figured out.

Geoff
--

.



Relevant Pages

  • Re: Need to run function every 20ms.
    ... Just be careful using high priority threads - that is do not ... monopolize the CPU beyond what you need. ... you can generate a system tick every 1mS. ...
    (microsoft.public.windowsce.embedded.vc)
  • [ckpatch][3/29] 2.6.17-smpnice-staircase-16
    ... Implement the "staircase" hybrid foreground-background single priority ... array cpu scheduler policy. ... extern struct user_struct root_user; ... goto out_running; ...
    (Linux-Kernel)
  • [RFC][PATCH] O(1) Entitlement Based Scheduler
    ... This patch is a modification of the Oscheduler that introduces ... _entitlement_ to CPU resources that is determined by the number of _shares_ ... This patch provides both soft and hard CPU usage rate caps per ... one getting the most can be given a better priority, ...
    (Linux-Kernel)
  • [ANNOUNCE] RSDL completely fair starvation free interactive cpu scheduler
    ... Staircase DeadLine" cpu scheduler. ... A novel design which incorporates a foreground-background descending priority ... the cpu that it is queued onto also keeps a record of that quota. ... run at this runqueue's current priority rotation. ...
    (Linux-Kernel)
  • Re: [ANNOUNCE] RSDL completely fair starvation free interactive cpu scheduler
    ... Staircase DeadLine" cpu scheduler. ... A novel design which incorporates a foreground-background descending priority ... the cpu that it is queued onto also keeps a record of that quota. ... task uses up its quota it is decremented one priority level. ...
    (Linux-Kernel)