Commit c9c43f55 authored by Dusan Slavinec's avatar Dusan Slavinec

adding hardware test scripts

parent 54e3b3a7
Test scripts for FTRN AMC hardware test
Use with modified N.A.T. extender for backplane IO tests.
To start tests use command:
./ftrn_test.sh test_list_amc.txt
This diff is collapsed.
#!/bin/bash
echo "################################################################################" | tee resp.txt
echo "Check that Xilinx JTAG cable is connected to front panel JTAG connector" | tee -a resp.txt
echo " and DIP1 is in position ONU(USB) then press ENTER" | tee -a resp.txt
echo "Flashing CPLD" | tee -a resp.txt
source /opt/Xilinx/14.7/LabTools/settings64.sh
# call Impact script
impact -batch ./impact_cpld_flash.cmd | tee -a resp.txt
# if called from script copy log to report folder
if [[ -n $LOG_FOLDER ]]; then
cp _impactbatch.log $LOG_FOLDER/flash_cpld.txt
fi
RESULT=`cat _impactbatch.log | grep "Programming completed successfully"`
if [[ -n $RESULT ]]; then
printf "Programming completed successfully"| tee -a resp.txt
echo "PTS_STATUS: OK"| tee -a resp.txt
exit 0
else
echo "PTS_STATUS: Failed"| tee -a resp.txt
exit 64
fi
setMode -bscan
setCable -port usb21
setCableSpeed -speed 750000
Identify -inferir
assignFile -p 1 -file "microtca_prog1.jed"
assignFile -p 2 -file "5AGXMA3DF27.bsd"
program -p 1 -e -v
closecable
exit 0
This diff is collapsed.
#!/bin/bash
# $1 - path to pts folder
# $2 - configuration file name (without extension)
# $3 - if present, only load sof, not burning rpd
if [ $1 == 'h']
then
echo "$1 - path to pts folder"
echo "$2 - configuration file name (without extension)"
echo "$3 - if present, only load sof, do not burn rpd"
exit 113 # just showing help
fi
echo "################################################################################"
echo "Flashing FPGA"
echo "Checking JTAG chain"
export PATH=$PATH:/home/ftrn/intelFPGA/17.1/qprogrammer/bin:/home/ftrn/intelFPGA/17.1/qprogrammer/linux64/
echo "Detecting devices in JTAG chain"
RESP=`jtagconfig`
echo "Loading SOF to FPGA"
SOFPATH=$1/fpga/$2
quartus_pgm -c "USB-Blaster" -m jtag -o "p;$SOFPATH.sof@2"
sleep 3
TTY_USB=`$1/utils/find_ftrn_ttyUSB.sh`
echo "Done programming sof"
if [ -z $3 ]
then
echo "Burning rpd to FLASH"
eb-flash "dev/$TTY_USB" "$SOFPATH.rpd"
echo "Resetting FTRN"
eb-reset "dev/$TTY_USB"
fi
sleep 2
eb-info "dev/$TTY_USB"
echo "Done"
exit 0
#!/bin/bash
# $1 - path to pts folder
echo "################################################################################" | tee resp.txt
if [[ $1 == 'h']];
then
echo "$1 - path to pts folder" | tee -a resp.txt
exit 113 # just showing help
fi
echo "################################################################################" | tee -a resp.txt
echo "Configuring FPGA flash" | tee -a resp.txt
echo "Finding FTRN ttyUSBx" | tee -a resp.txt
TTY_USB=`$1/utils/find_ftrn_ttyUSB.sh`
if [[ -n $TTY_USB ]]; then
echo "Found FTRN ttyUSB : $TTY_USB" | tee -a resp.txt
else
echo "No FTRN ttyUSB device present. Check if Cypress microcontroller is programmed!" | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit 64
fi
RESP=`eb-config dev/$TTY_USB 10 4`
echo "$RESP" | tee -a resp.txt
if [[ -n $RESP ]]; then
echo "FPGA flash configuration failed." | tee -a resp.txt
echo "PTS_STATUS: Failed." | tee -a resp.txt
exit 64
else
echo "FPGA flash configured. Power cycle the board!" | tee -a resp.txt
echo "PTS_OK: OK" | tee -a resp.txt
exit 0
fi
#!/bin/bash
# $1 - path to pts folder
# $2 - configuration file name (without extension)
echo "################################################################################" | tee resp.txt
if [[ $1 == 'h' ]] ;then
echo "$1 - path to pts folder" | tee -a resp.txt
echo "$2 - configuration file name (without extension)" | tee -a resp.txt
exit 113 # just showing help
fi
echo "################################################################################" | tee -a resp.txt
echo "Finding FTRN ttyUSBx" | tee -a resp.txt
TTY_USB=`$1/utils/find_ftrn_ttyUSB.sh`
if [[ -n $TTY_USB ]]; then
echo "Found FTRN ttyUSB : $TTY_USB" | tee -a resp.txt
else
echo "No FTRN ttyUSB device present. Check if Cypress microcontroller is programmed!" | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit 64
fi
echo "Burning rpd to FLASH" | tee -a resp.txt
#RESP=`eb-flash "dev/$TTY_USB" "$2.rpd"`
#TEST=`echo $RESP | grep "Verifying"`
#TEST=`echo $TEST | grep "done"`
eb-flash "dev/$TTY_USB" "$2.rpd" | tee -a resp.txt
RESP=$(cat resp.txt)
TEST=`echo $RESP | grep "Verifying"`
TEST=`echo $TEST | grep "done"`
if [[ -z $TEST ]]; then
echo "Verify not ok. Loading FPGA flash failed." | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit 64
else
echo "PTS_OK: Successfully burned FPGA flash." | tee -a resp.txt
fi
sleep 1
echo "Reseting FTRN. Loading FPGA from flash" | tee -a resp.txt
eb-reset "dev/$TTY_USB" | tee -a resp.txt
sleep 3
echo "Checking USB communication" | tee -a resp.txt
#RESP=`eb-info dev/$TTY_USB`
eb-info dev/$TTY_USB | tee -a resp.txt
RESP=$(cat resp.txt)
TEST=`echo $RESP | grep "5agxma3d4f27i3"`
if [[ -z $TEST ]]; then
echo "FPGA loading from flash failed. Could not read GW info." | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit 64
else
echo "Successfully loaded FPGA from flash." | tee -a resp.txt
echo "PTS_STATUS: OK" | tee -a resp.txt
exit 0
fi
#!/bin/bash
# $1 - path to pts folder
# $2 - configuration file name
echo "################################################################################" | tee resp.txt
if [[ $1 == 'h' ]];then
echo "$1 - path to pts folder" | tee -a resp.txt
echo "$2 - configuration file name" | tee -a resp.txt
exit 113 # just showing help
fi
if [[ -z $2 ]]; then
SOFNAME="./microtca_control.sof"
else
SOFNAME="$2"
fi
echo "Check that Altera USB Blaster is connected to front panel JTAG connector" | tee -a resp.txt
echo " and DIP1 is in position ONU(USB) then press ENTER" | tee -a resp.txt
read -s -n 1
echo "Flashing FPGA" | tee -a resp.txt
export PATH=$PATH:/home/ftrn/intelFPGA/17.1/qprogrammer/bin:/home/ftrn/intelFPGA/17.1/qprogrammer/linux64/
echo "Detecting devices in JTAG chain" | tee -a resp.txt
jtagconfig | tee -a resp.txt
RESP=`cat resp.txt | grep "chain broken"`
if [[ -n $RESP ]]; then
echo "No Altera Device found in JTAG chain"
echo "PTS_STATUS: Failed"
exit 64
fi
echo "Loading SOF to FPGA" | tee -a resp.txt
quartus_pgm -c "USB-Blaster" -m jtag -o "p;$SOFNAME@2" | tee -a resp.txt
sleep 2
echo "Done programming sof" | tee -a resp.txt
sleep 2
echo "Checking for Cypress device" | tee -a resp.txt
CYPRESS=$(lsusb | grep "Cypress") | tee -a resp.txt
echo "Checking for OpenMoko device" | tee -a resp.txt
OPENMOKO=$(lsusb | grep "1d50:6062 OpenMoko") | tee -a resp.txt
if [[ -n $CYPRESS ]] && [[ -n $OPENMOKO ]]; then
echo "PTS_STATUS: Failed . FPGA flashed but Cypress not visible on USB bus." | tee -a resp.txt
exit 64
elif [[ -n $CYPRESS ]]; then
echo "FPGA loaded, Cypress visible on USB bus. Now flash Cypress microcontroller." | tee -a resp.txt
echo "PTS_STATUS: OK" | tee -a resp.txt
exit 0
else #
echo "FPGA loaded, OpenMoko visible on USB bus. Configure FPGA flash." | tee -a resp.txt
echo "PTS_STATUS: OK" | tee -a resp.txt
exit 0
fi
This diff is collapsed.
#!/bin/bash
# $1 - test list
TEST_LIST=$1
echo "Type in 6 digit serial from the sticker"
read -n 6 SN
echo " "
echo "To confirm serial $SN press Enter or Escape to finish"
read -s -n 1 ANS
echo " "
if [ "$ANS" == $'\e' ]; then
echo "END TEST: $(date)"
exit
fi
read -p "Check that fan is ON and blowing over FPGA. Press Enter" -n 1
read -p "Check that Display is attached to the board. Press Enter" -n 1
read -p "Check SFP is inserted and that WR fiber is connected to WR master. Press Enter" -n 1
read -p "Check LEMO cables are connected to IO1 and IO3. Press Enter" -n 1
#set paths
PTS=$(pwd)
export $PTS
TEST_LOG_DIR=/home/$(whoami)/Desktop/board_test_reports
TEST_DELIM1='###############################################################################';
TEST_DELIM2='-------------------------------------------------------------------------------';
# assemble folder name for the board with serial SN
SN_LOG_NAME="amc"
SN_LOG_NAME+="_sn-$SN"
echo "SN_LOG_NAME : $SN_LOG_NAME"
SN_LOG_FOLDER="$TEST_LOG_DIR/$SN_LOG_NAME"
if [[ -d $SN_LOG_FOLDER ]];then
echo "Using existing folder : $SN_LOG_FOLDER"
else
echo "Creating SN report folder : $SN_LOG_FOLDER"
mkdir $SN_LOG_FOLDER
fi
# assemble folder and file name for the test
TEST_START=`date +%s`
TEST_TIME=`date "+%y-%m-%d_%H-%M-%S"`
SN_TIME_LOG="$SN_LOG_NAME_$TEST_TIME"
echo "SN_TIME_LOG : $SN_TIME_LOG"
LOG_FOLDER+="$SN_LOG_FOLDER/$SN_TIME_LOG"
mkdir $LOG_FOLDER
echo "LOG_FOLDER : $LOG_FOLDER"
LOG_FILE="$LOG_FOLDER/$SN_TIME_LOG.log"
echo "LOG_FILE: $LOG_FILE"
# create log file
touch $LOG_FILE
date | tee $LOG_FILE
echo "SN : $SN" | tee -a $LOG_FILE
#TESTS
#------------------------------------------------------------------------------
# ';' is the delimiter here, and there are three fields on each line in the file
# IFS set below is restricted to the context of `read`, it doesn't affect any other code
while IFS=';' read -r cmd testname folder testfile param1 param2 param3; do
# process the fields
# if the line has less than three fields, the missing fields will be set to an empty string
# if the line has more than three fields, `field3` will get all the values, including the
# third field plus the delimiter(s)
# echo "$cmd : $testname : $folder : $testfile : $param1 : $param2 : $param3;"
if [ "$cmd" == "x" ];then # xecute command
echo $TEST_DELIM1 | tee -a $LOG_FILE
echo "START : $(date)" | tee -a $LOG_FILE
if [ "$param1" == "PTS" ];then
param1=$PTS
fi
TESTLOG=$LOG_FOLDER/$testfile
TESTLOG+="_out.txt"
testfile+=".sh"
printf "$testname\n" | tee -a $LOG_FILE #| tee -a $TESTLOG
cd $folder
rm -f resp.txt # delete previous test report
./$testfile $param1 $param2 $param3 < /dev/tty # | tee resp_main.txt
RESP=`cat resp.txt`
sleep 0.5
cd $PTS
printf "%s\n" "$RESP" > $TESTLOG
PTS_STATUS=`echo "$RESP" | grep "PTS_STATUS:"`
printf "%s\n" "$PTS_STATUS" | tee -a $LOG_FILE
printf "END : $(date)\n\n" | tee -a $LOG_FILE
if [[ $PTS_STATUS != 'PTS_STATUS: OK' ]]; then
printf "\nLast test failed. Press ENTER to continue or ESC to stop.\n" | tee -a $LOG_FILE
read -n 1 -s ANS < /dev/tty
if [ "$ANS" == $'\e' ]; then
TEST_END=`date +%s`
echo "Test finished at $((TEST_END-$TEST_START)) seconds."
echo "END TEST: $(date)" | tee -a $LOG_FILE
./pcie-wb/ftrninsmod.sh $PTS r
exit
fi
fi
fi
done < $TEST_LIST
TEST_END=`date +%s`
echo "Test complete in $((TEST_END-$TEST_START)) seconds."
echo "END TEST: $(date)" | tee -a $LOG_FILE
./pcie-wb/ftrninsmod.sh $PTS r
echo " "
#!/bin/bash
# $1 - FTRN Saflib name
echo "##########################################################" | tee resp.txt
saft-io-ctl $1 -n HWT_EN -d 0
# 0 F A 5
HSPS=("0" "F" "A" "5")
HSW_POS0=(" " "Low" "Low" "Low" "Low")
HSW_POS1=(" " "High" "High" "High" "High")
HSW_POS_5=(" " "High" "Low" "High" "Low")
HSW_POS_A=(" " "Low" "High" "Low" "High")
echo "CPLD Hex Switch test" | tee -a resp.txt
echo "----------------------------------------------------------------" | tee -a resp.txt
echo "Move CPLD HEX switch into position 5 and press ENTER" | tee -a resp.txt
read -s -n 1 ANS
POS=0
echo "Reading HEX SW position" | tee -a resp.txt
for (( j=1; j<=4;j++ )); do
RESP=`saft-io-ctl $1 -n HSWP$j | grep "Input:" | grep "${HSW_POS_5[$j]}"`
echo "HEXSW$j : $RESP"
if [[ -n $RESP ]]; then
let POS=$POS+1
fi
done
if [[ $POS = 4 ]]; then
echo "HEX switch position ok." | tee -a resp.txt
else
echo "HEX switch position readback not OK." | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit 64
fi
echo "----------------------------------------------------------------" | tee -a resp.txt
echo "Move CPLD HEX switch into position A and press ENTER" | tee -a resp.txt
read -s -n 1 ANS
POS=0
echo "Reading HEX SW position" | tee -a resp.txt
for (( j=1; j<=4;j++ )); do
RESP=`saft-io-ctl $1 -n HSWP$j | grep "Input:" | grep "${HSW_POS_A[$j]}"`
echo "HEXSW$j : $RESP"
if [[ -n $RESP ]]; then
let POS=$POS+1
fi
done
if [[ $POS = 4 ]]; then
echo "HEX switch position ok." | tee -a resp.txt
else
echo "HEX switch position readback not OK." | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit 64
fi
echo "----------------------------------------------------------------" | tee -a resp.txt
echo "----------------------------------------------------------------" | tee -a resp.txt
echo "FPGA Hex Switch test" | tee -a resp.txt
echo "----------------------------------------------------------------" | tee -a resp.txt
echo "Move FPGA HEX switch into position 5 and press ENTER" | tee -a resp.txt
read -s -n 1 ANS
POS=0
echo "Reading HEX SW position" | tee -a resp.txt
for (( j=1; j<=4;j++ )); do
RESP=`saft-io-ctl $1 -n HSWF$j | grep "Input:" | grep "${HSW_POS_5[$j]}"`
echo "HEXSW$j : $RESP"
if [[ -n $RESP ]]; then
let POS=$POS+1
fi
done
if [[ $POS = 4 ]]; then
echo "HEX switch position ok." | tee -a resp.txt
else
echo "HEX switch position readback not OK." | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit 64
fi
echo "----------------------------------------------------------------" | tee -a resp.txt
echo "Move CPLD HEX switch into position A and press ENTER" | tee -a resp.txt
read -s -n 1 ANS
POS=0
echo "Reading HEX SW position" | tee -a resp.txt
for (( j=1; j<=4;j++ )); do
RESP=`saft-io-ctl $1 -n HSWF$j | grep "Input:" | grep "${HSW_POS_A[$j]}"`
echo "HEXSW$j : $RESP"
if [[ -n $RESP ]]; then
let POS=$POS+1
fi
done
if [[ $POS = 4 ]]; then
echo "HEX switch position ok." | tee -a resp.txt
else
echo "HEX switch position readback not OK." | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit 64
fi
echo "----------------------------------------------------------------" | tee -a resp.txt
echo "Test finished!"
echo "PTS_STATUS: OK" | tee -a resp.txt
exit 0
#!/bin/bash
for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev); do
(
syspath="${sysdevpath%/dev}"
devname="$(udevadm info -q name -p $syspath)"
[[ "$devname" == "bus/"* ]] && continue
eval "$(udevadm info -q property --export -p $syspath)";
[[ -z "$ID_SERIAL" ]] && continue
RESP=`echo "/dev/$devname - $ID_SERIAL" | grep Helmholtzzentrum;`
if [ -n "$RESP" ]
then
RESP=`echo $RESP | grep ttyUSB;`
if [ -n "$RESP" ]
then
echo "$devname"
fi
fi
)
done
#!/bin/bash
for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev); do
(
syspath="${sysdevpath%/dev}"
devname="$(udevadm info -q name -p $syspath)"
[[ "$devname" == "bus/"* ]] && continue
eval "$(udevadm info -q property --export -p $syspath)";
[[ -z "$ID_SERIAL" ]] && continue
RESP=`echo "/dev/$devname - $ID_SERIAL" | grep FTDI;`
if [ -n "$RESP" ]
then
RESP=`echo $RESP | grep ttyUSB;`
if [ -n "$RESP" ]
then
echo "$devname"
fi
fi
)
done
#!/bin/bash
for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev); do
(
syspath="${sysdevpath%/dev}"
devname="$(udevadm info -q name -p $syspath)"
[[ "$devname" == "bus/"* ]] && continue
eval "$(udevadm info -q property --export -p $syspath)"
[[ -z "$ID_SERIAL" ]] && continue
echo "/dev/$devname - $ID_SERIAL" | grep ttyUSB
)
done
#!/bin/bash
# $1 - Path to PTS
# $3 - wishbone master
# $3 - USER RAM address
TEST=0
echo "################################################################################" | tee resp.txt
TTY_USB=`$1/utils/find_ftrn_ttyUSB.sh`;
echo "Found FTRN $TTY_USB" | tee -a resp.txt
USB_DATA=`eb-read dev/$TTY_USB 0x$3/4`
printf "Reading via USB: address 0x$3 : 0x%s\n" "$USB_DATA" | tee -a resp.txt
PCI_DATA=`eb-read dev/$2 0x$3/4`
printf "Reading via PCI: address 0x$3 : 0x%s\n\n" "$PCI_DATA" | tee -a resp.txt
if [ $USB_DATA == $PCI_DATA ]; then
let TEST=$TEST+1
fi
sleep 1
USB_DATA="c007babe"
printf "Writing via USB: address 0x$3 : 0x$USB_DATA\n" | tee -a resp.txt
eb-write dev/$TTY_USB 0x$3/4 0x$USB_DATA
PCI_DATA=`eb-read dev/$2 0x$3/4`
printf "Reading via PCI: address 0x$3 : 0x%s\n\n" "$PCI_DATA" | tee -a resp.txt
if [ $USB_DATA == $PCI_DATA ]; then
let TEST=$TEST+1
fi
sleep 1
PCI_DATA="deadbeef"
printf "Writing via PCI: address 0x$3 : 0x$PCI_DATA\n" | tee -a resp.txt
eb-write dev/$2 0x$3/4 0x$PCI_DATA
USB_DATA=`eb-read dev/$TTY_USB 0x$3/4`
printf "Reading via USB: address 0x$3 : 0x%s\n\n" "$USB_DATA" | tee -a resp.txt
if [ $USB_DATA == $PCI_DATA ]; then
let TEST=$TEST+1
fi
sleep 1
if [ $TEST -eq 3 ]; then
echo "PTS_STATUS: OK" | tee -a resp.txt
else
echo "Not all read/write were ok." | tee -a resp.txt
echo "PTS_STATUS: Failed." | tee -a resp.txt
fi
#!/bin/bash
# $1 - FTRN Saftlib name
echo "Enabling MTCA.4 PORT 12-15 test" | tee resp.txt
saft-io-ctl $1 -n LED_USR1 -d 1
saft-io-ctl $1 -n LED_USR2 -d 1
saft-io-ctl $1 -n LED_USR3 -d 0
saft-io-ctl $1 -n LED_USR4 -d 0
saft-io-ctl $1 -n HWT_EN -d 1
echo "Check that BLUE IO LEDs blink with then press ENTER else press ESC" | tee -a resp.txt
read -s -n 1 ANS
if [ "$ANS" = $'\e' ];then
echo "Binary count NOT visible on RED IO LEDs" | tee -a resp.txt
echo "PTS_STATUS: Failed (64)" | tee -a resp.txt
exit
else
echo "Binary count visible on RED IO LEDs" | tee -a resp.txt
fi
saft-io-ctl $1 -n LED_USR1 -d 0
saft-io-ctl $1 -n LED_USR2 -d 0
saft-io-ctl $1 -n LED_USR3 -d 0
saft-io-ctl $1 -n LED_USR4 -d 0
saft-io-ctl $1 -n LED_USR8 -d 0
saft-io-ctl $1 -n HWT_EN -d 0
saft-io-ctl $1 -n IO_CLKIN_EN -d 0
echo "--------------------------------------------------------------"
echo "PTS_STATUS: OK" | tee -a resp.txt
echo ""
#!/bin/bash
IOS="MTCA4_IO1 MTCA4_IO2 MTCA4_IO3 MTCA4_IO4 MTCA4_IO5 MTCA4_IO6 MTCA4_IO7 MTCA4_IO8 MTCA4_CLK1 MTCA4_CLK2 MTCA4_CLK3 MTCA4_CLK4 IO1 IO2 IO3 IO4 IO5 LIBERA_TR1 LIBERA_TR2 LIBERA_TR3 LIBERA_TR4"
saft-io-ctl ftrn -i | grep LEMO
echo "Connect LEMO1 to LEMO 3 then press ENTER"
echo "LEMO 1 out to LEMO 3 in, term off"
saft-io-ctl ftrn -o 0 -t 0 -d 0 -n IO3
saft-io-ctl ftrn -o 1 -t 0 -d 0 -n IO1
read -p "Check that LEVEL is 0V then press ENTER"
saft-io-ctl ftrn -o 1 -t 0 -d 1 -n IO1
read -p "Check that LEVEL is 3V then press ENTER"
saft-io-ctl ftrn -o 0 -t 1 -d 0 -n IO3
read -p "Termination enabled! Check that LEVEL dropped <3V then press ENTER"
saft-io-ctl ftrn -o 1 -t 0 -d 0 -n IO1
echo "LEMO 3 out to LEMO 1 in, term off"
saft-io-ctl ftrn -o 0 -t 0 -d 0 -n IO1
saft-io-ctl ftrn -o 1 -t 0 -d 0 -n IO3
read -p "Check that LEVEL is 0V then press ENTER"
saft-io-ctl ftrn -o 1 -t 0 -d 1 -n IO3
read -p "Check that LEVEL is 3V then press ENTER"
saft-io-ctl ftrn -o 0 -t 1 -d 0 -n IO1
read -p "Termination enabled! Check that LEVEL dropped <3V then press ENTER"
saft-io-ctl ftrn -o 1 -t 0 -d 0 -n IO3
echo "Connect LEMO2 to LEMO 4 then press ENTER"
echo "LEMO 2 out to LEMO 4 in, term off"
saft-io-ctl ftrn -o 0 -t 0 -d 0 -n IO4
saft-io-ctl ftrn -o 1 -t 0 -d 0 -n IO2
read -p "Check that LEVEL is 0V then press ENTER"
saft-io-ctl ftrn -o 1 -t 0 -d 1 -n IO2
read -p "Check that LEVEL is 3V then press ENTER"
saft-io-ctl ftrn -o 0 -t 1 -d 0 -n IO4
read -p "Termination enabled! Check that LEVEL dropped <3V then press ENTER"
saft-io-ctl ftrn -o 1 -t 0 -d 0 -n IO2
echo "LEMO 4 out to LEMO 2 in, term off"
saft-io-ctl ftrn -o 0 -t 0 -d 0 -n IO2
saft-io-ctl ftrn -o 1 -t 0 -d 0 -n IO4
read -p "Check that LEVEL is 0V then press ENTER"
saft-io-ctl ftrn -o 1 -t 0 -d 1 -n IO4
read -p "Check that LEVEL is 3V then press ENTER"
saft-io-ctl ftrn -o 0 -t 1 -d 0 -n IO2
read -p "Termination enabled! Check that LEVEL dropped <3V then press ENTER"
saft-io-ctl ftrn -o 1 -t 0 -d 0 -n IO4
read -p "Connect LEMO2 to LEMO 5 then press ENTER"
echo "LEMO 1 out to LEMO 5 in, term off"
saft-io-ctl ftrn -o 0 -t 0 -d 0 -n IO5
saft-io-ctl ftrn -o 1 -t 0 -d 0 -n IO2
read -p "Check that LEVEL is 0V then press ENTER"
saft-io-ctl ftrn -o 1 -t 0 -d 1 -n IO2
read -p "Check that LEVEL is 3V then press ENTER"
saft-io-ctl ftrn -o 0 -t 1 -d 0 -n IO5
read -p "Termination enabled! Check that LEVEL dropped <3V then press ENTER"
saft-io-ctl ftrn -o 1 -t 0 -d 0 -n IO2
echo "LEMO 5 out to LEMO 2 in, term off"
saft-io-ctl ftrn -o 0 -t 0 -d 0 -n IO2
saft-io-ctl ftrn -o 1 -t 0 -d 0 -n IO5
read -p "Check that LEVEL is 0V then press ENTER"
saft-io-ctl ftrn -o 1 -t 0 -d 1 -n IO5
read -p "Check that LEVEL is 3V then press ENTER"
saft-io-ctl ftrn -o 0 -t 1 -d 0 -n IO2
read -p "Termination enabled! Check that LEVEL dropped <3V then press ENTER"
saft-io-ctl ftrn -o 1 -t 0 -d 0 -n IO5
echo "Test finished!"
#!/bin/bash
# $1 - FTRN Saflib name
saft-io-ctl $1 -i | grep MTCA4
echo "Enabling Libera buffers" | tee resp.txt
saft-io-ctl $1 -n LED_USR5 -d 1
saft-io-ctl $1 -n LED_USR6 -d 0
saft-io-ctl $1 -n LED_USR7 -d 1
saft-io-ctl $1 -n HWT_EN -d 1
sleep 0.5
echo "Checking Libera lines" | tee -a resp.txt
for ((i=1; i<=4; i++))
do
echo "--------------------------------------------------------" | tee -a resp.txt
echo "LIBERA_TR$i drive LO" | tee -a resp.txt
saft-io-ctl $1 -n "LIBERA_TR$i" -d 0
echo "Reding back HSWP$i:" | tee -a resp.txt
saft-io-ctl $1 -n "HSWP$i" | tee -a resp.txt
sleep 0.5
# echo "--------------------------------------------------------" | tee -a resp.txt
# for ((j=1; j<=8; j++))
# do
# if [ j!=i ] ; then
# saft-io-ctl $1 -n "MTCA4_IO$j" | grep Input
# fi
# done
echo "--------------------------------------------------------" | tee -a resp.txt
echo "LIBERA_TR$i drive HI" | tee -a resp.txt
saft-io-ctl $1 -n "LIBERA_TR$i" -d 1
echo "Reding back HSWP$i:" | tee -a resp.txt
saft-io-ctl $1 -n "HSWP$i" | tee -a resp.txt
sleep 1
done
echo "Disabling Libera buffers" | tee -a resp.txt
saft-io-ctl $1 -n LED_USR5 -d 0
saft-io-ctl $1 -n LED_USR6 -d 0
saft-io-ctl $1 -n LED_USR7 -d 0
saft-io-ctl $1 -n HWT_EN -d 0
echo "Test finished!" | tee -a resp.txt
echo "PTS_STATUS: OK" | tee -a resp.txt
#!/bin/bash
# $1 - FTRN Saflib name
FTRN=$1
saft-io-ctl $1 -i | grep MTCA4
echo "Enabling SW controlled HW tests"
saft-io-ctl $FTRN -n HWT_EN -d 1
echo "Enabling MTCA.4 MLVDS buffers" | tee resp.txt
saft-io-ctl $FTRN -n LED_USR5 -d 0
saft-io-ctl $FTRN -n LED_USR7 -d 1
sleep 0.5
echo "Turning all MTCA4 MLVDS outputs off" | tee resp.txt
for ((i=1; i<=8; i++))
do
saft-io-ctl $1 -n "MTCA4_IO$i" -d 0 -o 0
done
echo "Reading back MTCA4 MLVDS inputs" | tee resp.txt
for ((i=1; i<=8; i++))
do
saft-io-ctl $1 -n "MTCA4_IO$i"
done
echo " "
echo "Enabling Libera buffers" | tee resp.txt
saft-io-ctl $FTRN -n LED_USR5 -d 0
saft-io-ctl $FTRN -n LED_USR6 -d 1
sleep 0.5
echo "Driving Libera lines and reading them back on MTCA.4 MLVDS lines" | tee -a resp.txt
for ((i=1; i<=4; i++))
do
let j=i*2-1
let k=i*2
echo "--------------------------------------------------------" | tee -a resp.txt
echo "LIBERA_TR$i drive LO" | tee -a resp.txt
saft-io-ctl $1 -n "LIBERA_TR$i" -d 0
echo "Reding back MTCA4_IO$j and MTCA4_IO$k:" | tee -a resp.txt
RESP=`saft-io-ctl $1 -n "MTCA4_IO$j" | grep "Input:"`
echo " IO$j : $RESP" | tee -a resp.txt
IOSTATE=`echo "$RESP" | grep "Low"`
if [[ -z $IOSTATE ]];then
echo "Invalid state on input $j" | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit
fi
RESP=`saft-io-ctl $1 -n "MTCA4_IO$k" | grep "Input:"`
echo " IO$k : $RESP" | tee -a resp.txt
IOSTATE=`echo "$RESP" | grep "Low"`
if [[ -z $IOSTATE ]];then
echo "Invalid state on input $k" | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit
fi
sleep 0.5
echo "--------------------------------------------------------" | tee -a resp.txt
echo "LIBERA_TR$i drive HI" | tee -a resp.txt
saft-io-ctl $1 -n "LIBERA_TR$i" -d 1
echo "Reding back MTCA4_IO$j and MTCA4_IO$k:" | tee -a resp.txt
RESP=`saft-io-ctl $1 -n "MTCA4_IO$j" | grep "Input:"`
echo " IO$j : $RESP" | tee -a resp.txt
IOSTATE=`echo "$RESP" | grep "High"`
if [[ -z $IOSTATE ]];then
echo "Invalid state on input $j" | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit
fi
RESP=`saft-io-ctl $1 -n "MTCA4_IO$k" | grep "Input:"`
echo " IO$k : $RESP" | tee -a resp.txt
IOSTATE=`echo "$RESP" | grep "High"`
if [[ -z $IOSTATE ]];then
echo "Invalid state on input $k" | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit
fi
sleep 1
saft-io-ctl $1 -n "LIBERA_TR$i" -d 0
done
echo "Disabling Libera buffers" | tee -a resp.txt
saft-io-ctl $1 -n LED_USR5 -d 0
saft-io-ctl $1 -n LED_USR6 -d 0
saft-io-ctl $1 -n LED_USR7 -d 0
saft-io-ctl $1 -n HWT_EN -d 0
echo "Test finished!" | tee -a resp.txt
echo "PTS_STATUS: OK" | tee -a resp.txt
#!/bin/bash
# $1 - FTRN Saflib name
CLK_1=(1 2 3 4)
CLK_2=(2 1 4 3)
saft-io-ctl $1 -i | grep MTCA4
echo "Enabling MTCA.4 buffers" | tee resp.txt
saft-io-ctl $1 -n LED_USR5 -d 0
saft-io-ctl $1 -n LED_USR6 -d 1
saft-io-ctl $1 -n LED_USR7 -d 1
saft-io-ctl $1 -n HWT_EN -d 1
echo "Turning all MTCA4 CLK lines off" | tee -a resp.txt
for ((i=1; i<=4; i++))
do
saft-io-ctl $1 -n "MTCA4_CLK$i" -d 0 -o 0
done
echo "Reading MTCA4 CLK lines" | tee -a resp.txt
for ((i=1; i<=4; i++))
do
saft-io-ctl $1 -n "MTCA4_CLK$i" | grep Input
done
#echo "Driving MTCA4 CLK line"
for ((i=0; i<${#CLK_1[@]}; i++))
do
echo "---------------------------------------------------------" | tee -a resp.txt
echo "Testing MTCA.4 ${CLK_1[i]}-${CLK_2[i]} CLK pair" | tee -a resp.txt
echo ""
echo "MTCA4_CLK${CLK_1[i]} as output: drive LO" | tee -a resp.txt
saft-io-ctl $1 -n "MTCA4_CLK${CLK_1[i]}" -o 1 -d 0
saft-io-ctl $1 -n "MTCA4_CLK${CLK_1[i]}" | grep Output
printf "Reading back MTCA4_CLK%d : " "${CLK_2[i]}" | tee -a resp.txt
RESP=`saft-io-ctl $1 -n "MTCA4_CLK${CLK_2[i]}" | grep "Input:"`
echo "$RESP" | tee -a resp.txt
IOSTATE=`echo "$RESP" | grep "Low"`
if [[ -z $IOSTATE ]];then
echo "Invalid state on input MTCA4_CLK${CLK_2[i]}" | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit
fi
sleep 0.5
echo "--------------------------------------------------------" | tee -a resp.txt
echo "MTCA4_CLK${CLK_1[i]} as output: drive HI" | tee -a resp.txt
saft-io-ctl $1 -n "MTCA4_CLK${CLK_1[i]}" -o 1 -d 1
saft-io-ctl $1 -n "MTCA4_CLK${CLK_1[i]}" | grep Output
printf "Reading back MTCA4_CLK%d : " "${CLK_2[i]}" | tee -a resp.txt
RESP=`saft-io-ctl $1 -n "MTCA4_CLK${CLK_2[i]}" | grep Input`
echo "$RESP" | tee -a resp.txt
IOSTATE=`echo "$RESP" | grep "High"`
if [[ -z $IOSTATE ]];then
echo "Invalid state on input MTCA4_CLK${CLK_2[i]}" | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit
fi
sleep 0.1
saft-io-ctl $1 -n "MTCA4_CLK${CLK_1[i]}" -o 0 -d 0
sleep 1
done
echo "Disabling MTCA.4 buffers" | tee -a resp.txt
saft-io-ctl $1 -n LED_USR5 -d 0
saft-io-ctl $1 -n LED_USR6 -d 0
saft-io-ctl $1 -n LED_USR7 -d 0
saft-io-ctl $1 -n HWT_EN -d 0
echo "Test finished. IO voltage levels are OK" | tee -a resp.txt
echo "PTS_STATUS: OK" | tee -a resp.txt
#!/bin/bash
# $1 - FTRN Saflib name
saft-io-ctl $1 -i | grep MTCA4
echo "Enabling MTCA.4 buffers" | tee resp.txt
saft-io-ctl $1 -n LED_USR5 -d 0
saft-io-ctl $1 -n LED_USR6 -d 1
saft-io-ctl $1 -n LED_USR7 -d 1
saft-io-ctl $1 -n HWT_EN -d 1
echo "Turning all MTCA4 MLVDS lines off" | tee -a resp.txt
for ((i=1; i<=8; i++))
do
saft-io-ctl $1 -n "MTCA4_IO$i" -d 0
done
echo "Reading MTCA4 lines" | tee -a resp.txt
for ((i=1; i<=8; i++))
do
saft-io-ctl $1 -n "MTCA4_IO$i" | grep Input
done
echo "Testing IOs. One IO as output, others as intpus." | tee -a resp.txt
for ((i=1; i<=8; i++))
do
echo "--$i-----------------------------------------------------" | tee -a resp.txt
echo "MTCA4_IO$i as output: drive LO" | tee -a resp.txt
saft-io-ctl $1 -n "MTCA4_IO$i" -o 1 -d 0
saft-io-ctl $1 -n "MTCA4_IO$i" | grep Output
echo "--------------------------------------------------------" | tee -a resp.txt
for ((j=1; j<=8; j++))
do
RESP=`saft-io-ctl $1 -n "MTCA4_IO$j" | grep "Input:"`
echo " IO$j : $RESP" | tee -a resp.txt
IOSTATE=`echo "$RESP" | grep "Low"`
if [[ -z $IOSTATE ]];then
echo "Invalid state on input $j" | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit
fi
done
echo "--------------------------------------------------------" | tee -a resp.txt
echo "MTCA4_IO$i as output: drive HI" | tee -a resp.txt
saft-io-ctl $1 -n "MTCA4_IO$i" -o 1 -d 1
saft-io-ctl $1 -n "MTCA4_IO$i" | grep Output | tee -a resp.txt
echo "--------------------------------------------------------" | tee -a resp.txt
for ((j=1; j<=8; j++))
do
RESP=`saft-io-ctl $1 -n "MTCA4_IO$j" | grep "Input:"`
echo " IO$j : $RESP" | tee -a resp.txt
IOSTATE=`echo "$RESP" | grep "High"`
if [[ -z $IOSTATE ]];then
echo "Invalid state on input $j" | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
sleep 1
exit
fi
done
saft-io-ctl $1 -n "MTCA4_IO$i" -o 0 -d 0
sleep 1
done
echo "Reading MTCA4 lines" | tee -a resp.txt
for ((i=1; i<=8; i++))
do
saft-io-ctl $1 -n "MTCA4_IO$i" | grep Input
done
echo "--------------------------------------------------------" | tee -a resp.txt
echo "Disabling MTCA.4 buffers"
saft-io-ctl $1 -n LED_USR5 -d 0
saft-io-ctl $1 -n LED_USR6 -d 0
saft-io-ctl $1 -n LED_USR7 -d 0
saft-io-ctl $1 -n HWT_EN -d 0
echo "Test finished. IO voltage levels are OK" | tee -a resp.txt
echo "PTS_STATUS: OK" | tee -a resp.txt
#!/bin/bash
# $1 - FTRN Saflib name
IO_1=(1 2 3 4 5 6 7 8)
IO_2=(2 1 4 3 6 5 8 7)
saft-io-ctl $1 -i | grep MTCA4
echo "Front panel IO LEDs showing MTCA.4 IO 1-4 state"
saft-io-ctl $1 -n LED_USR1 -d 0
saft-io-ctl $1 -n LED_USR2 -d 1
saft-io-ctl $1 -n LED_USR3 -d 1
saft-io-ctl $1 -n LED_USR4 -d 0
echo "Enabling MTCA.4 buffers" | tee resp.txt
saft-io-ctl $1 -n LED_USR5 -d 0
saft-io-ctl $1 -n LED_USR6 -d 0
saft-io-ctl $1 -n LED_USR7 -d 1
saft-io-ctl $1 -n HWT_EN -d 1
echo "Turning all MTCA4 MLVDS lines off" | tee -a resp.txt
for ((i=1; i<=8; i++))
do
saft-io-ctl $1 -n "MTCA4_IO$i" -d 0 -o 0
done
echo "Reading MTCA4 lines" | tee -a resp.txt
for ((i=1; i<=8; i++))
do
saft-io-ctl $1 -n "MTCA4_IO$i" | grep Input
done
echo "Testing MTCA.4 MLVDS IOs in pairs. One IO as output, other as intput." | tee -a resp.txt
for ((i=0; i<8; i++))
do
if [[ $i == 4 ]];then
echo "Front panel IO LEDs showing MTCA.4 IO 5-8 state"
saft-io-ctl $1 -n LED_USR1 -d 1
saft-io-ctl $1 -n LED_USR2 -d 1
saft-io-ctl $1 -n LED_USR3 -d 1
saft-io-ctl $1 -n LED_USR4 -d 0
fi
echo "---------------------------------------------------------" | tee -a resp.txt
echo "MTCA4_IO${IO_1[i]} as output: drive LO" | tee -a resp.txt
saft-io-ctl $1 -n "MTCA4_IO${IO_1[i]}" -o 1 -d 0
saft-io-ctl $1 -n "MTCA4_IO${IO_1[i]}" | grep Output
echo " " | tee -a resp.txt
RESP=`saft-io-ctl $1 -n "MTCA4_IO${IO_1[i]}" | grep "Input:"`
echo " IO${IO_1[i]} : $RESP" | tee -a resp.txt
IOSTATE=`echo "$RESP" | grep "Low"`
if [[ -z $IOSTATE ]];then
echo "Invalid state on input ${IO_1[i]}" | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit
fi
RESP=`saft-io-ctl $1 -n "MTCA4_IO${IO_2[i]}" | grep "Input:"`
echo " IO${IO_2[i]} : $RESP" | tee -a resp.txt
IOSTATE=`echo "$RESP" | grep "Low"`
if [[ -z $IOSTATE ]];then
echo "Invalid state on input ${IO_2[i]}" | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit
fi
echo "--------------------------------------------------------" | tee -a resp.txt
echo "MTCA4_IO${IO_1[i]} as output: drive HI" | tee -a resp.txt
saft-io-ctl $1 -n "MTCA4_IO${IO_1[i]}" -o 1 -d 1
saft-io-ctl $1 -n "MTCA4_IO${IO_1[i]}" | grep Output | tee -a resp.txt
echo " " | tee -a resp.txt
RESP=`saft-io-ctl $1 -n "MTCA4_IO${IO_1[i]}" | grep "Input:"`
echo " IO${IO_1[i]} : $RESP" | tee -a resp.txt
IOSTATE=`echo "$RESP" | grep "High"`
if [[ -z $IOSTATE ]];then
echo "Invalid state on input ${IO_1[i]}" | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit
fi
RESP=`saft-io-ctl $1 -n "MTCA4_IO${IO_2[i]}" | grep "Input:"`
echo " IO${IO_2[i]} : $RESP" | tee -a resp.txt
IOSTATE=`echo "$RESP" | grep "High"`
if [[ -z $IOSTATE ]];then
echo "Invalid state on input ${IO_2[i]}" | tee -a resp.txt
echo "PTS_STATUS: Failed" | tee -a resp.txt
exit
fi
saft-io-ctl $1 -n "MTCA4_IO${IO_1[i]}" -o 0 -d 0
echo " "
sleep 0.5
done
echo " "
echo "Reading MTCA4 lines" | tee -a resp.txt
for ((i=1; i<=8; i++))
do
saft-io-ctl $1 -n "MTCA4_IO$i" | grep "Input:" | tee -a resp.txt
done
echo "--------------------------------------------------------" | tee -a resp.txt
echo "Disabling MTCA.4 buffers"
saft-io-ctl $1 -n LED_USR5 -d 0
saft-io-ctl $1 -n LED_USR6 -d 0
saft-io-ctl $1 -n LED_USR7 -d 0
saft-io-ctl $1 -n HWT_EN -d 0
saft-io-ctl $1 -n LED_USR1 -d 0
saft-io-ctl $1 -n LED_USR2 -d 0
saft-io-ctl $1 -n LED_USR3 -d 0
saft-io-ctl $1 -n LED_USR4 -d 0
echo "Test finished. IO voltage levels are OK" | tee -a resp.txt
echo "PTS_STATUS: OK" | tee -a resp.txt
#!/bin/bash
# $1 - FTRN Saftlib name
VHI='>3V'
VLO='<0.7V'
VT='<3V'
# IO pairs to test
IO_1=(1 3 2 4 2)
IO_2=(3 1 4 2 5)
echo "LEMO IO test" | tee resp.txt
#saft-io-ctl $1 -i | grep IO
for (( i=0; i<${#IO_1[@]}; i++ )); do
echo "==============================================================================="
echo "Connect LEMO ${IO_1[i]} to LEMO ${IO_2[i]} then press ENTER" | tee -a resp.txt
read -s -n 1 ANS
echo "LEMO ${IO_1[i]} out to LEMO ${IO_2[i]} in, term off" | tee -a resp.txt
saft-io-ctl $1 -o 1 -t 0 -d 0 -n "IO${IO_1[i]}"
saft-io-ctl $1 -o 0 -t 0 -d 0 -n "IO${IO_2[i]}"
echo "Check that LEVEL is $VLO then press ENTER else press ESC" | tee -a resp.txt
read -s -n 1 ANS
if [ "$ANS" != $'\e' ];then
echo "Voltage level is $VLO" | tee -a resp.txt
else
echo "Voltage level is not $VLO" | tee -a resp.txt
echo "PTS_STATUS: Failed (64)" | tee -a resp.txt
exit
fi
echo "-------------------------------------------------------------------------------"
saft-io-ctl $1 -o 1 -t 0 -d 1 -n "IO${IO_1[i]}"
echo "Check that LEVEL is $VHI then press ENTER else press ESC" | tee -a resp.txt
read -s -n 1 ANS
if [ "$ANS" != $'\e' ];then
echo "Voltage level is $VHI" | tee -a resp.txt
else
echo "Voltage level is not $VHI" | tee -a resp.txt
echo "PTS_STATUS: Failed (64)" | tee -a resp.txt
exit
fi
echo "-------------------------------------------------------------------------------"
saft-io-ctl $1 -o 0 -t 1 -d 0 -n "IO${IO_2[i]}"
echo "Termination enabled! Check that LEVEL is $VT then press ENTER else press ESC" | tee -a resp.txt
read -s -n 1 ANS
if [ "$ANS" != $'\e' ];then
echo "Voltage level is $VT" | tee -a resp.txt
else
echo "Voltage level is not $VT" | tee -a resp.txt
echo "PTS_STATUS: Failed (64)" | tee -a resp.txt
exit
fi
saft-io-ctl $1 -o 0 -t 0 -d 0 -n "IO${IO_1[i]}"
done # for
echo "--------------------------------------------------------------"
echo "All IO test finished!" | tee -a resp.txt
echo "PTS_STATUS: OK" | tee -a resp.txt
echo ""
#!/bin/bash
# $1 - FTRN Saftlib name
VHI='>3V'
VLO='<0.7V'
VT='<3V'
# IO pairs to test
IO_1=(1 2 3 4 5 ) # output
IO_2=(2 3 4 5 1) # input
echo "LEMO IO test - 5 lemo" | tee resp.txt
echo "Turning off all LEMO IOs"
for (( i=0; i<${#IO_1[@]}; i++ )); do
saft-io-ctl $1 -o 0 -t 0 -d 0 -n "IO${IO_1[i]}"
done
#saft-io-ctl $1 -i | grep IO
for (( i=0; i<${#IO_1[@]}; i++ )); do
echo "-----------------------------------------------------------------------------"
echo "LEMO ${IO_1[i]} out to LEMO ${IO_2[i]} in, term off" | tee -a resp.txt
saft-io-ctl $1 -o 1 -t 0 -d 0 -n "IO${IO_1[i]}"
saft-io-ctl $1 -o 0 -t 0 -d 0 -n "IO${IO_2[i]}"
echo "Check that LEVEL is $VLO then press ENTER else press ESC" | tee -a resp.txt
read -s -n 1 ANS
if [ "$ANS" = "" ];then
echo "Voltage level is $VLO" | tee -a resp.txt
else
echo "Voltage level is not $VLO" | tee -a resp.txt
echo "PTS_STATUS: Failed (64)" | tee -a resp.txt
exit
fi
echo " "
saft-io-ctl $1 -o 1 -t 0 -d 1 -n "IO${IO_1[i]}"
echo "Check that LEVEL is $VHI then press ENTER else press ESC" | tee -a resp.txt
read -s -n 1 ANS
if [ "$ANS" = "" ];then
echo "Voltage level is $VHI" | tee -a resp.txt
else
echo "Voltage level is not $VHI" | tee -a resp.txt
echo "PTS_STATUS: Failed (64)" | tee -a resp.txt
exit
fi
echo " "
saft-io-ctl $1 -o 0 -t 1 -d 0 -n "IO${IO_2[i]}"
echo "Termination on IO${IO_2[i]} enabled! Check that LEVEL is $VT then press ENTER else press ESC" | tee -a resp.txt
read -s -n 1 ANS
if [ "$ANS" = "" ];then
echo "Voltage level is $VT" | tee -a resp.txt
else
echo "Voltage level is not $VT" | tee -a resp.txt
echo "PTS_STATUS: Failed (64)" | tee -a resp.txt
exit
fi
saft-io-ctl $1 -o 0 -t 0 -d 0 -n "IO${IO_1[i]}"
saft-io-ctl $1 -o 0 -t 0 -d 0 -n "IO${IO_2[i]}"
done # for
echo "--------------------------------------------------------------"
echo "All IO test finished!" | tee -a resp.txt
echo "PTS_STATUS: OK" | tee -a resp.txt
echo ""
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
# $1 - bin file path
echo "################################################################################"
echo "Flashing MMC"
openocd -f "./openocd/mmc_openocd.cfg" -c lpprog "./LPC2136_FreeRTOS_CoreIPM.bin"
#echo "################################################################################"
#echo $OUTP
#echo "################################################################################"
sleep 1
echo "################################################################################"
echo "Flashing again"
openocd -f "./openocd/mmc_openocd.cfg" -c "lpprog $1"
printf "\n\n"
read -p "Power cycle the board then press ENTER"
echo "################################################################################"
printf "Done\n\n\n"
exit 0
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment