Browse Source

Complete device tree fragment import and correct for flawed output level.

master
parent
commit
a6ec05f6c7
2 changed files with 21 additions and 3 deletions
  1. +4
    -3
      testplan/programdat.txt
  2. +17
    -0
      testplan/sendcommrst.sh

+ 4
- 3
testplan/programdat.txt View File

@@ -22,7 +22,7 @@ product_uuid c6dfc066-e0ea-4e2c-b327-5ea7d24420b2
product_id 0x0001

# 16 bit product version
product_ver 0x0001
product_ver 0x0002

# ASCII vendor string (max 255 characters)
vendor "Europalab Devices ApS"
@@ -32,7 +32,7 @@ product "Sendcomm EDU"

# Custom binary data
custom_data
c0ffee
baadc0ffee
end

########################################################################
@@ -91,5 +91,6 @@ back_power 0
#setgpio 24 INPUT DEFAULT
#setgpio 25 INPUT DEFAULT
#setgpio 26 INPUT DEFAULT
setgpio 26 OUTPUT NONE # Sendcomm SAMR34 reset (B6)
#setgpio 26 OUTPUT NONE # Doesnt work default high
setgpio 26 INPUT DEFAULT # Sendcomm SAMR34 reset (B6)
#setgpio 27 INPUT DEFAULT

+ 17
- 0
testplan/sendcommrst.sh View File

@@ -0,0 +1,17 @@
#! /bin/sh

# The gpio(1) cmd seems to fail while sys/class works
#gpio export 26 out # GPIO-26 defaults to low state
#gpio write 26 1 # Set to high for normal operation
#gpio write 26 0 && gpio write 26 1 # Force a MCU reset
#
NUM=26
HIGH=1
LOW=0
SYSC=/sys/class/gpio

# Reset (from custom device tree, input) GPIO for output
[ -e ${SYSC}/gpio${NUM} ] || echo $NUM >${SYSC}/export && sleep 1
echo out >${SYSC}/gpio${NUM}/direction
echo $HIGH >${SYSC}/gpio${NUM}/value
echo $LOW >${SYSC}/gpio${NUM}/value && echo $HIGH >${SYSC}/gpio${NUM}/value

Loading…
Cancel
Save