1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-12-18 16:41:32 +02:00

m1/torture/: quick and dirty power-cycling test loop

This commit is contained in:
Werner Almesberger 2011-09-06 12:09:56 -03:00
parent 2c896d860d
commit 96a5dd3b60
2 changed files with 47 additions and 0 deletions

30
m1/torture/README Normal file
View File

@ -0,0 +1,30 @@
power-cycling torture test, to see if booting into FN and then
power-cycling causes NOR corruption.
You need:
- an M1 with JTAG board
- a Lab Switch (../../labsw) to control power to the M1
- a USB connection to the Lab Switch
- the Lab Switch control tool "labsw" installed
- a USB connection to the JTAG board
- UrJTAG installed, see
http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One#compile_urjtag
- neocon from http://svn.openmoko.org/developers/werner/neocon/
(or any other program to monitor and log an outbound serial line)
Run
neocon -a -l log -T /dev/ttyUSB0
Then
./loop
This will:
- power-cycle the M1, leaving it powered off for 5 seconds
- give it two seconds to power on
- boot the "regular" bitstream, i.e., Flickernoise
- wait 70 seconds for Flickernoise to start and to render the
"The Tunnel" for a few seconds
- repeat this forever
The log file records the console output from the M1, plus time
stamps and cycle numbers written from the "loop" script.

17
m1/torture/loop Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
n=0
while true; do
n=`expr $n + 1`
echo ===== $n =====
labsw ch1=0 ch2=0
sleep 5
labsw ch1=1 ch2=1
sleep 2
make -C ../jtag-boot boot
sleep 60
echo echo === $n === `date` >/dev/ttyUSB0
sleep 10
done