High-resolution timers on AT91SAM9G45
jan.weil at web.de
jan.weil at web.de
Tue Jul 12 14:40:15 EDT 2011
Hi,
I am currently trying to achieve latency < 1 ms (~ 10 us would be great) on
this board
<http://www.ic-board.de/product_info.php?info=p105_ICnova-SAM9G45-OEM.html>
running Linux 2.6.33.2 with a couple of patches provided by the company to
support their evaluation board.
I reconfigured CONFIG_AT91_TIMER_HZ=1024, which results in a jiffy of ~ 1
ms, which is a good start, but I am not quite there yet.
These patches
<http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-03/msg01396.html>
along with the post by maddis from 03. April 2009 in this thread
<http://www.at91.com/forum/viewtopic.php/f,12/t,4194/>
made me believe that it might be possible to activate high-resolution
timers and make the kernel preemptible on this controller, so I
reconfigured:
CONFIG_PREEMPT=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_ATMEL_TCLIB=y
CONFIG_ATMEL_TCB_CLKSRC=y
CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
However, booting up the new kernel I noticed the following line:
atmel_tcb: probe of atmel_tcb.0 failed with error -22
and /proc/timer_list looks like this:
Timer List Version: v0.5
HRTIMER_MAX_CLOCK_BASES: 2
now at 54883789537 nsecs
cpu: 0
clock 0:
.base: c03e6014
.index: 0
.resolution: 976559 nsecs
.get_time: ktime_get_real
.offset: 0 nsecs
active timers:
clock 1:
.base: c03e6040
.index: 1
.resolution: 976559 nsecs
.get_time: ktime_get
.offset: 0 nsecs
active timers:
#0: <c7a95f30>, hrtimer_wakeup, S:01
# expires at 55787857570-55787907570 nsecs [in 904068033 to 904118033
nsecs]
.expires_next : 2147483646999999999 nsecs
.hres_active : 0
.nr_events : 0
.nr_retries : 0
.nr_hangs : 0
.max_hang_time : 0 nsecs
.nohz_mode : 0
.idle_tick : 0 nsecs
.tick_stopped : 0
.idle_jiffies : 0
.idle_calls : 0
.idle_sleeps : 0
.idle_entrytime : 54880519167 nsecs
.idle_waketime : 0 nsecs
.idle_exittime : 0 nsecs
.idle_sleeptime : 52111282391 nsecs
.last_jiffies : 0
.next_jiffies : 0
.idle_expires : 0 nsecs
jiffies: 4294716297
Tick Device: mode: 0
Per CPU device: 0
Clock Event Device: pit
max_delta_ns: 0
min_delta_ns: 0
mult: 35791392
shift: 32
mode: 2
next_event: 2147483646999999999 nsecs
set_next_event: <(null)>
set_mode: pit_clkevt_mode
event_handler: tick_handle_periodic
And running cyclictest <https://rt.wiki.kernel.org/index.php/Cyclictest>
confirms that high-resolution timers are still not available.
Does anyone happen to have a clue what might be the reason for the
atmel_tcb error mentioned above and what I could try next?
Thanks for your attention.
Best,
Jan
More information about the linux-arm
mailing list