summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spcpucounter01/spcpucounter01.scn
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-02-12 10:31:38 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-02-14 10:28:29 +0100
commit24bf11eca11947d961cc9bb5f7d92dabff169e93 (patch)
treeb28f3aa8a21df91e8feaf324613aa76460559837 /testsuites/sptests/spcpucounter01/spcpucounter01.scn
parentbsps/arm: Fix Cortex-A9 MPCore nanoseconds handler (diff)
downloadrtems-24bf11eca11947d961cc9bb5f7d92dabff169e93.tar.bz2
score: Add CPU counter support
Add a CPU counter interface to allow access to a free-running counter. It is useful to measure short time intervals. This can be used for example to enable profiling of critical low-level functions. Add two busy wait functions rtems_counter_delay_ticks() and rtems_counter_delay_nanoseconds() implemented via the CPU counter.
Diffstat (limited to 'testsuites/sptests/spcpucounter01/spcpucounter01.scn')
-rw-r--r--testsuites/sptests/spcpucounter01/spcpucounter01.scn15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuites/sptests/spcpucounter01/spcpucounter01.scn b/testsuites/sptests/spcpucounter01/spcpucounter01.scn
new file mode 100644
index 0000000000..fc8e84951e
--- /dev/null
+++ b/testsuites/sptests/spcpucounter01/spcpucounter01.scn
@@ -0,0 +1,15 @@
+*** TEST SPCPUCOUNTER 1 ***
+CPU counter frequency: 25000000Hz
+nanoseconds for frequency count ticks: 1000000000
+test delay nanoseconds (10 times)
+busy wait relative to clock tick: 0.001320
+busy wait relative to clock tick: 0.001640
+busy wait relative to clock tick: 0.001320
+busy wait relative to clock tick: 0.001160
+busy wait relative to clock tick: 0.001280
+busy wait relative to clock tick: 0.001240
+busy wait relative to clock tick: 0.001280
+busy wait relative to clock tick: 0.001280
+busy wait relative to clock tick: 0.001320
+busy wait relative to clock tick: 0.001280
+*** END OF TEST SPCPUCOUNTER 1 ***