Real Time solutions on AT91SAM SoC

Last modified by Microchip on 2025/02/28 14:49

Introduction

This page aims at presenting the two most important real-time Linux solutions, their setup and the expected performances on AT91SAM SoCs. The study covers the following two real-time Linux solutions:

Global setup

  • The board used are the AT91SAM9G20EK, AT91SAM9M10-G45-EK and AT91SAM9263-EK.
  • The kernel versions used are the 3.0.10 for the PREEMPT_RT patch and 2.6.38 for Xenomai.
  • The root filesystem was generated using Buildroot and was mounted over the network through NFS.
  • The toolchain used was gcc-4.4-2010q1 from CodeSourcery.

Stress during benchmarks

RT benchmarks are only meaningful under heavy stress to guarantee to find worst case latencies. The following programs are used to stress the system:

  • hackbench to stress the scheduler
  • netcat to stress the Ethernet interface and generate a lot of interrupts
  • ls and dd for global stress

Here is the script used to create load (doload.sh):

#!/bin/sh
(while true; do cat /usr/share/netcat/netcat.data; sleep 7; done | netcat -vv -l -p 5566 ) &
a=$!

dd if=/dev/zero of=/dev/null &
b=$!

while true; do killall hackbench  > /dev/null 2>&1; sleep 5; done &
d=$!

while true; do /bin/hackbench 1 > /dev/null 2>&1; done &
e=$!

while true; do ls -lR / > /dev/null 2>&1; done &
f=$!

sleep $1
kill $a $b $c $d $e $f

Latency

When developing real-time applications with a system such as Linux, the typical scenario is the following:

  • An event from the physical world happens and gets notified to the CPU by means of an interrupt
  • The interrupt handler recognizes and handles the event, and then wake-up the user-space task that will react to this event
  • Some time later, the user-space task will run and be able to react to the physical world event

Real-time is about providing guaranteed worst case latencies for this reaction time, called latency. All the following benchmarks will measure this latency.

There is latency at different stage of the system: first the interrupt latency itself, then the time spent in the interrupt handler, then the latency of the scheduler and finally the time spent in the scheduler:

<center><img src="%ATTACHURLPATH%/latency.png" alt="latency.png" width='529' height='210' /></center>

For better performances, the task can be done in the kernelspace or in an interrupt handler. The drawback in theses cases is that the developpment is more difficult and the code have a restraint accces to kernel or userspace facilities.

PREEMPT_RT

Short presentation

  • PREEMPT_RT is a long-term project led by Linux kernel developers Ingo Molnar, Thomas Gleixner and Steven Rostedt.
  • The goal is to gradually improve the Linux kernel regarding real-time requirements and to get these improvements merged into the mainline kernel
    • PREEMPT_RT development works very closely with the mainline Linux development
  • Many of the improvements designed, developed and debugged inside PREEMPT_RT over the years are now part of the mainline Linux kernel
    • The project is a long-term branch of the Linux kernel that ultimately should disappear as everything will have been merged
  • Development of real-time applications and development of drivers within the PREEMPT_RT patch set applied on the Linux kernel is exactly the same as on a standard Linux kernel. There are no special APIs, no special library. The PREEMPT_RT patch set simply offers more reliable worst-case latencies and more configurable system behaviour (mostly through the configuration of interrupt threads priorities).

Setup

  • PREEMPT_RT is delivered as a patch against the mainline kernel
    • Best to have a board supported by the mainline kernel, otherwise the PREEMPT_RT patch may not apply and may require some adaptations
  • Many official kernel releases are supported, but not all. For example, 2.6.31 and 2.6.33 are supported, but not 2.6.32. (At the end of November 2011 the versions available were 2.6.22, 2.6.24, 2.6.25, 2.6.26, 2.6.29, 2.6.31, 2.6.33, 3.0 and 3.2)
  • Quick set up
    • Download the latest PREEMPT_RT patch from http://www.kernel.org/pub/linux/kernel/projects/rt/
    • Download and extract the corresponding mainline kernel version
    • Apply the patch to the mainline kernel tree
      • For example with kernel sources 3.0.12 installed at /usr/local/src/v3.0.12, the command lines would be:<verbatim>

$ cd /usr/local/src/ $ wget http://www.kernel.org/pub/linux/kernel/projects/rt/3.0/patches-3.0.12-rt30.tar.bz2 --2011-12-19 16:43:20-- http://www.kernel.org/pub/linux/kernel/projects/rt/3.0/patches-3.0.12-rt30.tar.bz2 Resolving www.kernel.org... 149.20.4.69 Connecting to www.kernel.org|149.20.4.69|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 252203 (246K) [application/x-bzip2] Saving to: `patches-3.0.12-rt30.tar.bz2'

100%[============================================================================================>] 252,203 113K/s in 2.2s

(113 KB/s) - `patches-3.0.12-rt30.tar.bz2' saved [252203/252203]

$cd v3.0.12 $bzcat ../patches-3.0.12-rt30.patch.bz2 | patch -p1 patching file lib/scatterlist.c patching file arch/powerpc/platforms/wsp/opb_pic.c patching file drivers/tty/tty_ldisc.c patching file mm/slab.c [...] </verbatim>

  • Configure the kernel,<verbatim>

$ make ARCHarm KBUILD_OUTPUT../build_kernel_atmel at91sam9g20ek_defconfig HOSTCC scripts/basic/fixdep [...] # # configuration written to .config # $ make ARCHarm KBUILD_OUTPUT../build_kernel_atmel xconfig </verbatim>

  • and be sure to enable
    • CONFIG_PREEMPT_RT CONFIG_HIGH_RES_TIMERS (High Resolution Timer Support)

<center> <img src="%ATTACHURLPATH%/Xconfig_preempt-rt_3_0_12-rt12.png" alt="Xconfig_preempt-rt_3_0_12-rt12.png" width='766' height='312' /></center>

  • CONFIG_ATMEL_TCLIB (located in drivers/misc menu)

<center> <img src="%ATTACHURLPATH%/Xconfig_TCB_3_0_12-rt12.png" alt="Xconfig_TCB_3_0_12-rt12.png" width='579' height='275' /></center> * Compile your kernel, and boot<verbatim> GEN /usr/local/src/build_kernel_atmel/Makefile CHK include/linux/version.h Using /usr/local/src/v3.0.12 as source for kernel CHK include/generated/utsrelease.h make[2]: `include/generated/mach-types.h' is up to date. CALL /usr/local/src/v3.0.12/scripts/checksyscalls.sh CC init/main.o CHK include/generated/compile.h [...] Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2164096 Bytes = 2113.38 kB = 2.06 MB Load Address: 0x20008000 Entry Point: 0x20008000 Image arch/arm/boot/uImage is ready </verbatim>

You are now running the real-time Linux kernel.

Of course, some system configuration remains to be done, in particular setting appropriate priorities to the interrupt threads, which depends on your application.

_Git users can also clone this git tree: git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git_

Benchmark

Latency from external signal (through GPIO)

This benchmark reproduces a common use case: a signal comes though a GPIO and after this event a signal is output on another GPIO.

All the code runs in userspace using the sysfs gpio interface.It shows the worst case we can expect when the code handling the event is located in an userspace application. Lower latencies can be achieved by handling directly the event inside the kernel, but implementing application-specific code within the kernel is usually much more difficult. What is measured here is the full scheduling latency plus the time spent in the task to set the GPO including the switch in kernel space: <center><img src="%ATTACHURLPATH%/latency_gpio.png" alt="latency_gpio.png" width='553' height='256' /></center>

For AT91SAM9M10-G45-EK and AT91SAM9G20EK boards, GPIOs from the ISI connector are used:

  • PB26 is used as input,
  • PB10 is used as output,

Both signals are connected to an oscilloscope which is setup in overlay mode in order to get the worst latency between input and output. The oscilloscope triggers on high to low transition on PB26.

The external signal is generated using another board with this kind of command line:

echo 75 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio75/direction
while true; do echo 1 >/sys/class/gpio/gpio75/value; ./microsleep ; echo 0 >/sys/class/gpio/gpio75/value; ./microsleep ;  done

_microsleep is just a simple C program calling nanosleep(), for the tests the sleep value was 30 ms._

Here is the script used to setup the GPIO (prepare_gpio.sh) on the target board:

#!/bin/sh
echo 74 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio74/direction
echo 90 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio90/direction
echo both >  /sys/class/gpio/gpio90/edge

Then the following command line:

./prepare_gpio.sh ; chrt -f 99 ./rttest_gpio & while true; do ./doload.sh 65 ; done

The source code for rttest_gpio.c is available here rttest_gpio.c This code is compiled with this simple command line:

arm-none-linux-gnueabi-gcc  -Wall  -o rttest_gpio rttest_gpio.c -lrt

On the following oscilloscope snapshot, we can see what we get after 12 hours on AT91SAM9M10-G45-EK with a 3.0.10-rt27 kernel PREEMPT_RT_FULL selected:

  • The input signal is in green and the output signal is in yellow .
  • As the oscilloscope triged on the falling edge of the input signal, we barely see this signal at the left of the snapshot.
  • The medium green band is due to a small noise on the reference ground.
  • Time base is 1ms and 1V by square.

<center> <img src="%ATTACHURLPATH%/G45_3-0-10-rt27-12H_GPIO.png" alt="G45_3-0-10-rt27-12H_GPIO.png" /> </center>

On the following oscilloscope snapshot, we can see of what we get after 4 hours on AT91SAM9M10-G45-EK with a 3.0.10-rt27 kernel without PREEMPT:

  • The input signal is in green and the output signal is in yellow.
  • The input signal have a 30ms period. The output signal fill this 30ms and overlap the next input period. So we can only conclude that maximum latency is at least 30ms.
  • The medium green band is due to a small noise on the reference ground.
  • Time base is 5ms and 1V by square.

<center> <img src="%ATTACHURLPATH%/G45_3-0-10-rt27-4H_GPIO_nopreempt.png" alt="G45_3-0-10-rt27-4H_GPIO_nopreempt.png"/></center>

On the following oscilloscope snapshot, we can see of what we get after 11 hours on AT91SAM9G20-EK with a 3.0.10-rt27 kernel PREEMPT_RT_FULL selected:

  • The input signal is in yellow and the output signal is in green.
  • As the oscilloscope triged on the falling edge of the input signal, we barely see this signal at the left of the snapshot.
  • Time base is 500us and 1V by square.

<center> <img src="%ATTACHURLPATH%/G20_3-0-10-rt27-11H_GPIO.png" alt="G20_3-0-10-rt27-11H_GPIO.png"/> </center>

On the following oscilloscope snapshot, we can see of what we get after 11 hours on AT91SAM9G20-EK with a 3.0.10-rt27 kernel without PREEMPT:

  • The input signal is in yellow and the output signal is in green.
  • The input signal have a 30ms period. The output signal fill this 30ms and overlap the next input period. So we can only conclude that maximum latency is at least 30ms.
  • Time base is 5ms and 1V by square.

<center> <img src="%ATTACHURLPATH%/G20_3-0-10-rt27-11H_GPIO_nopreempt.png" alt="G20_3-0-10-rt27-11H_GPIO_nopreempt.png"/></center>

Kernel version used was 3.0.10-rt27, with PREEMPT_RT_FULL and without PREEMPT:

    
 Max Latency for   
Board PREEMPT_RT_FULL NO PREEMPT  
AT91SAM9M10-G45-EK 618us >30ms  
AT91SAM9G20-EK 608us >30ms  

Timer latency

This benchmark measures the latency timer using cyclictest a high resolution test program.

What is measured here is the full scheduling latency plus the short time spent in the task to read the current time: <center> <img src="%ATTACHURLPATH%/latency_timer.png" alt="latency_timer.png" width='553' height='256' /></center>

There are serveral ways to test the latency:

  • Using timer_settime (high-resolution POSIX timer), option -s with cyclictest
  • Using setitimer (high-resolution interval timer), no option with cyclictest
  • Using nanosleep (high-resolution sleep), option -n with cyclictest
  • Using clock_nanosleep (high-resolution sleep with clock selection), option -n -s with cyclictest

Here are the results for AT91SAM9G20 and AT91SAM9G45:

  • AT91SAM9G20 - 3.0.12-rt30+ PREEMPT RT - $cyclictest -m -a -t -n -p99
    • Command used - $cyclictest -m -a -t -n -p99
    • Benchmark duration: 44 h 30 min
    • Number of samples: 160247021
    • Min Latencies: 00016 us
    • Avg Latencies: 00087 us
    • Max Latencies: 00177 us

<img src="%ATTACHURLPATH%/cyclictest_G20_3_0_12_rt30_matnp99.png" alt="cyclictest_G20_3_0_12_rt30_matnp99.png" /></center>

  • AT91SAM9G20 - 3.0.12-rt30+ PREEMPT RT - $cyclictest -m -a -t -p99
    • Command used - $cyclictest -m -a -t -p99
    • Benchmark duration: 16 h 40 min
    • Number of samples: 060037201
    • Min Latencies: 00076 us
    • Avg Latencies: 00213 us
    • Max Latencies: 02136 us

<img src="%ATTACHURLPATH%/cyclictest_G20_3_0_12_rt30_matp99.png" alt="cyclictest_G20_3_0_12_rt30_matp99.png" /></center>

  • AT91SAM9G20 - 3.0.12-rt30+ PREEMPT RT - $cyclictest -m -a -t -s -n -p99
    • Command used - $cyclictest -m -a -t -s -n -p99
    • Benchmark duration: 9 h 47 min
    • Number of samples: 035257192
    • Min Latencies: 00020 us
    • Avg Latencies: 00100 us
    • Max Latencies: 50229 us

<img src="%ATTACHURLPATH%/cyclictest_G20_3_0_12_rt30_matsnp99.png" alt="cyclictest_G20_3_0_12_rt30_matsnp99.png" /></center>

  • AT91SAM9G20 - 3.0.12 - $cyclictest -m -a -t -p99
    • Command used - $cyclictest -m -a -t -p99
    • Benchmark duration: 11 h 09 min
    • Number of samples: 031919110
    • Min Latencies: 00027 us
    • Avg Latencies: 00380 us
    • Max Latencies: 39823 us

<img src="%ATTACHURLPATH%/cyclictest_G20_3_0_12_vanilla_no_preempt_matp99.png" alt="cyclictest_G20_3_0_12_vanilla_no_preempt_matp99.png" /></center>

  • AT91SAM9G45 - 3.0.12-rt30+ PREEMPT RT - $cyclictest -m -a -t -p99
    • Command used - $cyclictest -m -a -t -p99
    • Benchmark duration: 54 h 29 min
    • Number of samples: 196190335
    • Min Latencies: 00070 us
    • Avg Latencies: 00219 us
    • Max Latencies: 01106 us

<img src="%ATTACHURLPATH%/cyclictest_G45_3_0_12_rt30_matp99.png" alt="cyclictest_G45_3_0_12_rt30_matp99.png" /></center>

  • AT91SAM9G45 - 3.0.12-rt30+ PREEMPT RT - $cyclictest -m -a -t -s -n -p99
    • Command used - $cyclictest -m -a -t -s -n -p99
    • Benchmark duration: 33 h 1 min
    • Number of samples: 118900140
    • Min Latencies: 00021 us
    • Avg Latencies: 00106 us
    • Max Latencies: 00264 us

<img src="%ATTACHURLPATH%/cyclictest_G45_3_0_12_rt30_matsnp99.png" alt="cyclictest_G45_3_0_12_rt30_matsnp99.png" /></center>

  • AT91SAM9G45 - 3.0.12-rt30+ PREEMPT RT - $cyclictest -m -a -t -s -p99
    • Command used - $cyclictest -m -a -t -s -p99
    • Benchmark duration: 29 h 22 min
    • Number of samples: 105720602
    • Min Latencies: 00100 us
    • Avg Latencies: 02441 us
    • Max Latencies: 03861 us

<img src="%ATTACHURLPATH%/cyclictest_G45_3_0_12_rt30_matsp99.png" alt="cyclictest_G45_3_0_12_rt30_matsp99.png" /></center>

  • AT91SAM9G45 - 3.0.12 - $cyclictest -m -a -t -p99
    • Command used - $cyclictest -m -a -t -p99
    • Benchmark duration: 11 h 02 min
    • Number of samples: 030618980
    • Min Latencies: 00032 us
    • Avg Latencies: 00503 us
    • Max Latencies: 94991 us

<img src="%ATTACHURLPATH%/cyclictest_G45_3_0_12_vanilla_no_preempt_matp99.png" alt="cyclictest_G45_3_0_12_vanilla_no_preempt_matp99.png" /></center>

Xenomai

Short presentation

  • Xenomai Started in 2001 as a project aiming at emulating traditional RTOS.
  • The initial goal is to make it easier to port programs to GNU/Linux by providing skins mimicking the APIs of traditional RTOS such as VxWorks, pSOS+, and VRTXsa as well as the POSIX API, and a “native” API.
  • It was initially related to the RTAI project (as the RTAI / fusion branch), but it is now independent.
  • Real-time applications in Xenomai cannot use the Linux device drivers, so special device drivers must be written for the devices that are involved with the real-time tasks. Those drivers cannot benefit from the existing hardware support in Linux, and must be rewritten independently.
  • Real-time applications in Xenomai are generally written against the _native skin_ (a Xenomai API) or the _POSIX skin_ (which reproduces the traditional API in Linux but binds it to Xenomai calls)

Setup

  • Download Xenomai sources at http://download.gna.org/xenomai/stable/
  • Download one of the Linux versions supported by this release (see ksrc/arch/arm/patches/)
  • Since version 2.0, split kernel/user building model, kernel uses a script called script/prepare-kernel.sh which integrates Xenomai kernel-space support in the Linux sources.
    • For example with Xenomai 2.6.0 and a kernel sources 2.6.38.8 installed at /usr/local/src/v2.6.38.8 , the command lines would be:<verbatim>

cd xenomai-2.6.0 ./scripts/prepare-kernel.sh --arch=arm --linux=/usr/local/src/v2.6.38.8 </verbatim>

  • Kernel
    • Configure kernel, for example fot AT91SAM9G20-EK:<verbatim>

$ make at91sam9g20ek_defconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/docproc GEN /mnt/open/kernel/build_kernel_atmel-xeno/Makefile [...] # # configuration written to .config # </verbatim>

  • and be sure to enable
    • Xenomai: CONFIG_XENOMAI

<center> <img src="%ATTACHURLPATH%/Xconfig_Xenomai_2.6.38.8.png" alt="Xconfig_Xenomai_2.6.38.8.png" width='915' height='420' /></center>

  • Fast Swicth Context Extension (FCSE): CONFIG_ARM_FCSE_GUARANTEED

<center><img src="%ATTACHURLPATH%/Xconfig_ARM_FCSE_2.6.38.9.png" alt="Xconfig_ARM_FCSE_2.6.38.9.png" width='748' height='389' /></center>

  • High Resolution Timer Support CONFIG_HIGH_RES_TIMERS (see PREEMPT_RT part)
  • CONFIG_ATMEL_TCLIB (see PREEMPT_RT part) * Userspace * User-space libraries are compiled using the traditional autotools. In the following examples, CFLAGS and LDFLAGS are set with marcharmv5, because the toolchain used is the one provided by Linaro which will compile by default for armv7 whereas the =AT91SAM family are amrv5 <verbatim>

/home/gclement/xenomai-2.6.0$ ./configure --build=i686-pc-linux-gnu --host=arm-linux-gnueabi CFLAGS="-march=armv5" LDFLAGS="-march=armv5" checking build system type... i686-pc-linux-gnu checking host system type... arm-unknown-linux-gnueabi checking for a BSD-compatible install... /usr/bin/install -c [...] config.status: linking ./include/asm-generic to src/include/asm-generic/xenomai config.status: executing depfiles commands config.status: executing libtool commands

/home/gclement/xenomai-2.6.0$ make Making all in src make[1]: Entering directory `/home/gclement/xenomai-2.6.0/src' Making all in include make[2]: Entering directory `/home/gclement/xenomai-2.6.0/src/include' make all-am make[3]: Entering directory `/home/gclement/xenomai-2.6.0/src/include' make[3]: Leaving directory `/home/gclement/xenomai-2.6.0/src/include' make[2]: Leaving directory `/home/gclement/xenomai-2.6.0/src/include' Making all in skins make[2]: Entering directory `/home/gclement/xenomai-2.6.0/src/skins' Making all in common make[3]: Entering directory `/home/gclement/xenomai-2.6.0/src/skins/common' /bin/sh ../../../libtool --tag=CC --mode=compile arm-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../../src/include -O2 -D_GNU_SOURCE -D_REENTRANT -Wall -Werror-implicit-function-declaration -pipe -DXENO -DIN_XENO -Wstrict-prototypes -I../../../include -march=armv5 -MT libxenomai_la-assert_context.lo -MD -MP -MF .deps/libxenomai_la-assert_context.Tpo -c -o libxenomai_la-assert_context.lo `test -f 'assert_context.c' || echo './'`assert_context.c [...] make[1]: Leaving directory `/home/gclement/xenomai-2.6.0/scripts' make[1]: Entering directory `/home/gclement/xenomai-2.6.0' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/gclement/xenomai-2.6.0'

/home/gclement/xenomai-2.6.0$ make DESTDIR=/home/gclement/rootfs/ install Making install in src make[1]: Entering directory `/home/gclement/xenomai-2.6.0/src' Making install in include [...] [sudo] password for gclement: sudo is working. make[2]: Nothing to be done for `install-data-am'. make[2]: Leaving directory `/home/gclement/xenomai-2.6.0' make[1]: Leaving directory `/home/gclement/xenomai-2.6.0' /home/gclement/xenomai-2.6.0$ </verbatim>

  • The xeno-config script, installed when installing Xenomai user-space support helps you to compile your own programs. This scripts need to know where the libraries and the headers have been installed. DESTDIR must be set to point to the staging root file system:
/home/gclement/$ export DESTDIR=/home/gclement/rootfs/
/home/gclement/$ arm-linux-gnueabi-gcc  `xeno-config --skin=posix --cflags`  -o rttest_xeno rttest.c `xeno-config --skin=posix --ldflags`
/home/gclement/$ file rttest_xeno
rttest_xeno: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.31, not stripped
  • Another option which is more straightforward is to use Buildroot which now integrates support for Xenomai

Benchmarks

Benchmarks are done using the latency program provided with Xenomai. It comes in 3 flavors:

  • User task: periodic user-mode task

As for timer latency benchmark done on with cyclictest, what is measured here is the full scheduling latency plus the short time spent in the task to read the current time: <center> <img src="%ATTACHURLPATH%/latency_timer.png" alt="latency_timer.png" width='553' height='256' /></center>

  • Kernel Task: in-kernel periodic task

What is measured here is the full scheduling latency plus the short time spent in the task to read the current time, but here the task is in the kernel space so there is no context switch between kernel and user space: <center> <img src="%ATTACHURLPATH%/latency_kernel_timer.png" alt="latency_kernel_timer.png" width='553' height='266' /></center>

  • Timer IRQ: in-kernel timer handle

What is measured here is only the interrupt latency and the time spent in the interrupt handlers: <center> <img src="%ATTACHURLPATH%/latency_IRQ_timer.png" alt="latency_IRQ_timer.png" width='323' height='246' /></center>

It has been tested on 3 boards, with default configuration plus the following ones:

  • CONFIG_HIGH_RES_TIMERS
  • CONFIG_ATMEL_TCLIB
  • CONFIG_ATMEL_TCB_CLKSRC
  • CONFIG_XENOMAI
  • CONFIG_XENO_DRIVERS_TIMERBENCH
  • CONFIG_ARM_FCSE_GUARANTEED
  • CONFIG_XENO_HW_UNLOCKED_SWITCH

Xenomai 2.6 was used with a 2.6.38 kernel.

The commands used for testing were the following:

  • For User task:<verbatim>

while true; do ./doload.sh 65 & ; done & latency </verbatim>

  • For Kernel task:<verbatim>

while true; do ./doload.sh 65 & ; done & latency -t1 </verbatim>

  • For Timer IRQ:<verbatim>

while true; do ./doload.sh 65 & ; done & latency -t2 </verbatim>

Here are the results for AT91SAM9G20-EK and AT91SAM9M10G45-EK:

  • AT91SAM9G20-EK - 2.6.38.8-ipipe+ - $latency -h -H10000 -P99 -T36000 -q
    • Command used - $latency -h -H10000 -P99 -T36000 -q
    • Benchmark duration: 10 h 00 min
    • Number of samples: 35999927
    • Min Latencies: 8.720 us
    • Avg Latencies: 32.945 us
    • Max Latencies: 106.589 us

<img src="%ATTACHURLPATH%/latency_G20_2_6_38_t0P99.png" alt="latency_G20_2_6_38_t0P99.png" /></center>

  • AT91SAM9G20-EK - 2.6.38.8-ipipe+ - $latency -h -H10000 -t1 -P99 -T36000 -q
    • Command used - $latency -h -H10000 -t1 -P99 -T36000 -q
    • Benchmark duration: 10 h 00 min
    • Number of samples: 35999817
    • Min Latencies: 3.876 us
    • Avg Latencies: 19.065 us
    • Max Latencies: 42.542 us

<img src="%ATTACHURLPATH%/latency_G20_2_6_38_t1P99.png" alt="latency_G20_2_6_38_t1P99.png" /></center>

  • AT91SAM9G20-EK - 2.6.38.8-ipipe+ - $latency -h -H10000 -t2 -P99 -T36000 -q
    • Command used - $latency -h -H10000 -t2 -P99 -T36000 -q
    • Benchmark duration: 10 h 00 min
    • Number of samples: 35999845
    • Min Latencies: 0.000 us
    • Avg Latencies: 6.607 us
    • Max Latencies: 21.240 us

<img src="%ATTACHURLPATH%/latency_G20_2_6_38_t2P99.png" alt="latency_G20_2_6_38_t2P99.png" /></center>

  • AT91SAM9M10G45-EK - 2.6.38.8-ipipe+ - $latency -h -H10000 -P99 -T36000 -q
    • Command used - $latency -h -H10000 -P99 -T36000 -q
    • Benchmark duration: 10 h 00 min
    • Number of samples: 36022992
    • Min Latencies: 6.720 us
    • Avg Latencies: 34.560 us
    • Max Latencies: 118.080 us

<img src="%ATTACHURLPATH%/latency_G45_2_6_38_t0P99.png" alt="latency_G45_2_6_38_t0P99.png" /></center>

  • AT91SAM9M10G45-EK - 2.6.38.8-ipipe+ - $latency -h -H10000 -t1 -P99 -T36000 -q
    • Command used - $latency -h -H10000 -t1 -P99 -T36000 -q
    • Benchmark duration: 10 h 00 min
    • Number of samples: 35999920
    • Min Latencies: 1.087 us
    • Avg Latencies: 19.414 us
    • Max Latencies: 47.028 us

<img src="%ATTACHURLPATH%/latency_G45_2_6_38_t1P99.png" alt="latency_G45_2_6_38_t1P99.png" /></center>

  • AT91SAM9M10G45-EK - 2.6.38.8-ipipe+ - $latency -h -H10000 -t2 -P99 -T36000 -q
    • Command used - $latency -h -H10000 -t2 -P99 -T36000 -q
    • Benchmark duration: 10 h 00 min
    • Number of samples: 35999830
    • Min Latencies: -3.835 us
    • Avg Latencies: 6.343 us
    • Max Latencies: 21.106 us

<img src="%ATTACHURLPATH%/latency_G45_2_6_38_t2P99.png" alt="latency_G45_2_6_38_t2P99.png" /></center>

For AT91SAM9263-EK, each test ran during at least 3 hours.

     
 Max Latency for    
Board User task Kernel Task Timer IRQ  
AT91SAM9263-EK 105us 62us 26us  

References

  • Books
    • Building Embedded Linux systems 2nd Edition

Related Topics

Boards

Components

Kernel

Summary

Enable Real Time support for AT91SAM9 Soc