Add scripts to print and log I2C hangs.

This commit is contained in:
László Monda
2017-08-07 02:46:10 +02:00
parent 880aa06ad5
commit 941ff7053b
2 changed files with 14 additions and 0 deletions

3
usb/log-i2c-hangs.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
./print-i2c-hangs.sh > i2c-hangs-`date +%Y-%m-%d_%H:%M:%S`.log

11
usb/print-i2c-hangs.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
while true; do
startSeconds=`date +%s`
./wait-until-i2c-dies.js
endSeconds=`date +%s`
elapsedSeconds=$((startSeconds-endSeconds))
echo $elapsedSeconds
./jump-to-bootloader.js > /dev/null
sleep 6
done