#!/bin/bash
-cd nxyter/
+cd ./nxyter
-nxarr=(0x3800 0x3801 0x3810 0x3811)
+NXYTER_LIST="0x3800 0x3801 0x3810 0x3811"
echo "======================"
echo $(date)
-for i in ${nxarr[*]}; do
+for i in ${NXYTER_LIST} ; do
echo "nxyter: $i"
res=$(trbcmd i $i 2> /dev/null | wc -l)
if [ $res -eq 0 ]; then
fi
msg="+ n-XYTER found"
echo -e $msg
- ./trb3_setup.sh $i
+ ./setup.sh $i
done
-#./trb3_setup.sh 0x3800
-#./trb3_setup.sh 0x3801
-#./trb3_setup.sh 0x3802
-#./trb3_setup.sh 0x3803
+# Configure Central FPGA Hubs
+trbcmd w 0x8900 0xc0 0xfff6
+trbcmd w 0x8900 0xc1 0xfff6
+trbcmd w 0x8900 0xc3 0xfff6
+# 9
+trbcmd w 0x8910 0xc0 0xfff6
+trbcmd w 0x8910 0xc1 0xfff6
+trbcmd w 0x8910 0xc3 0xfff7
-trbcmd w 0x8900 0xc0 0xfff9
-trbcmd w 0x8900 0xc1 0xfff9
-trbcmd w 0x8900 0xc3 0xfff9
-
-trbcmd w 0x8910 0xc0 0xfff3
-trbcmd w 0x8910 0xc1 0xfff3
-trbcmd w 0x8910 0xc3 0xfff3
+#TDC channel for spill signal
+trbcmd w 0x3830 0xc802 0x3000
#Trigger forwarding setting
-trbcmd setbit 0x8900 0xcf00 0x8000 #3801 only
-trbcmd clearbit 0x8900 0xcf00 0x0008 #3800 disabled
+trbcmd setbit 0x8900 0xcf00 0x0800 #3801 only
+trbcmd clearbit 0x8900 0xcf00 0x0080 #3800 disabled
+
+trbcmd setbit 0x8910 0xcf00 0x0080 #3810
+trbcmd clearbit 0x8910 0xcf00 0x0800 #3811 disabled
-trbcmd setbit 0x8910 0xcf00 0x0008 #3810
-trbcmd clearbit 0x8910 0xcf00 0x0080 #3811 disabled
+#Enable SED for debugging
+trbcmd w 0xfe49 0xd500 1
cd ..
# enable TT mode (calibration)
#../nxscripts/mode_t.sh
-