[openfirmware] [commit] r3423 - cpu/arm/olpc
repository service
svn at openfirmware.info
Wed Nov 14 08:11:23 CET 2012
Author: wmb
Date: Wed Nov 14 08:11:21 2012
New Revision: 3423
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3423
Log:
OLPC ARM - accelerometer selftest
a) reduced the min-y value to prevent test fallout
b) Eliminated the not1g? test because it was failing sometimes.
The selftest is now almost worthless because the vendor-recommended
acceptance range encompasses pretty much the entire number range.
I guess what is being tested is whether the value changes at all
(in the right direction) when you invoke the built-in-test feature.
Modified:
cpu/arm/olpc/accelerometer.fth
Modified: cpu/arm/olpc/accelerometer.fth
==============================================================================
--- cpu/arm/olpc/accelerometer.fth Wed Nov 14 04:06:40 2012 (r3422)
+++ cpu/arm/olpc/accelerometer.fth Wed Nov 14 08:11:21 2012 (r3423)
@@ -76,7 +76,7 @@
\ The numbers are in units of "1LSB = 1mg", 1000 unit = 1 gravity.
d# 80 value min-x
-d# 80 value min-y
+d# 20 value min-y
d# 80 value min-z
d# 1700 value max-x
d# 1700 value max-y
@@ -132,12 +132,14 @@
delay ( )
average-acceleration@ ( x y z )
+[ifdef] notyet
\ Check that the magnitude of the acceleration vector is about 1 G
3dup not1g? if ( x y z )
3drop ( )
." Acceleration is not 1 gravity" cr ( )
true exit ( -- error? )
then ( x y z )
+[then]
\ Use the device's selftest function to force a change in one direction
h# 0a ctl4! ( x y z ) \ High res, Selftest mode 0
@@ -177,7 +179,7 @@
\ The attempt to talk at the old address failed, so we assume the new chip
\ Support for new LIS3DHTR chip
d# 400,000 to bus-speed
- d# 80 to min-x d# 80 to min-y d# 80 to min-z
+ d# 80 to min-x d# 20 to min-y d# 80 to min-z
d# 1700 to max-x d# 1700 to max-y d# 1400 to max-z
h# 19 1 reg
['] lis3dhtr-selftest to lis-selftest
More information about the openfirmware
mailing list