Reply
Thread Tools
Posts: 10 | Thanked: 0 times | Joined on May 2008
#1
Hi,

i have a need to create a module that will be executed every 10ms without fail, with +/- 1 ms accuracy.( i do need this .. im doing some sensor -> feedback loops) I have tried some examples written in C using typical approaches, even tried writing a kernel module with a very high priority but with quite bad results. I have a suspicion that the issue is the low tick rate of the n810. I have tried to increase the tick rate when compiling a new kernel but it doesn't seem to help. I have spent some time compiling the kernel with some rt patches but it kills too many features ( wifi and usb ).

I would greatly appreciate some help on this matter.
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#2
Well you may be able to disable dyntick (echo 0 > /sys/devices/system/timer/timer0/dyn_tick_state assuming that entry exists on the device) and set the cpufreq governor to "peformance" (again in the sysfs) to ensure it's running as fast as possible (to avoid latency). The default timer interrupt frequency on ARM is apparently 100 (after some Googling, I still need to check the code to be sure), which should (just) give you 10ms accuracy if my maths is correct.

I read somewhere that it's possible to override the value of HZ on a per-kernel-module basis, not sure if that's possible, but then you could get a timer going at 1ms accuracy, which may make your 10ms timer more accurate.
 
Posts: 10 | Thanked: 0 times | Joined on May 2008
#3
any more suggestions?? please, dont make me beg...
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#4
The OMAP has more timers than the kernel uses, so you can use an unused OMAP timer to get the exact frequency you need.

See the file arch/arm/plat-omap/dmtimer.c, though you will probably need the OMAP2 documentation to understand how to use it properly.
 
Reply


 
Forum Jump


All times are GMT. The time now is 08:59.