# ECAL pulser
http://hades33/daqtools/addons/pulseraddon.pl?Control
+board 0xfe61 (0X0120)
+-->Control:
+EnKelFirst16: 0xffff (switch pulser on)
+
+-->PulserConfig
+Slices:
+PulserPeriod:
+PulserWidth:
+
# power switch
./spi_slave.pl -e=0x6040 -c=0 -flashcmd=8 -enablecfgflash=1 -x=writecfgflash -f ../../daq/ecal/bitfiles/padiwa_amps2_20180712.dump
for ((i = 1; i<=3; i++)); do echo "Test $i"; done
+for ((i = 0; i<=2; i++)); do ./spi_slave.pl -e=0x6040 -c=$i -flashcmd=8 -enablecfgflash=1 -x=writecfgflash -f ../../daq/ecal/bitfiles/padiwa_amps2_20180712.dump; done
+
+
# trb flash
trbflash info 0x6040
trbcmd reload 6040
#padiwa:load memory (with thresholds,...) to flash
-./spi_slave.pl -e=0x6041 -c=1 -flashcmd=8 -enablecfgflash=1 -x=memtoflash --range '0x00..0x2b'
\ No newline at end of file
+./spi_slave.pl -e=0x6041 -c=1 -flashcmd=8 -enablecfgflash=1 -x=memtoflash --range '0x00..0x2b'
+
+#padiwa enable leds
+./spi_slave.pl -e 0x6026 -c 0 -x=led --data=0x0100
+0x0ff on permanent?
+
+
+
+###Trehsolds
+./HADESthreshscan_v1 -l 0 --loading-file best_baselines.thr -t 0 50 25
+
+
+
+###HV
+vncviewer lxhaddcs06:30
#0xfe71 0 0x50003000 0x802800c8 0xFFFFFFFF 0x0000FFFF 0x00000010 0x00000000 # trb3sc1 TDC
-0xfe71 0 0x50003000 0x802800c8 0xffffffff 0x0000ffff 0x00000010 0x00000000 # trb3sc1 TDC
+0xfe71 0 0x50003000 0x802800c8 0xffffffff 0x0000ffff 0x00000010 0x00000000 # trb3sc1 TDC
\ No newline at end of file
set_addresses serials_trb3sc.db addresses_ecal.db
!endif
+# ECAL pulser configuration
+trbcmd w 0x0120 0xa101 0xa0000 #PulserPeriod=2730688ns
+trbcmd w 0x0120 0xa104 0xa0000 #PulserPeriod=2730688ns
+trbcmd w 0x0120 0xa105 0xa0000 #PulserPeriod=2730688ns
+trbcmd w 0x0120 0xa106 0xa0000 #PulserPeriod=2730688ns
+trbcmd w 0x0120 0xa107 0xa0000 #PulserPeriod=2730688ns
+trbcmd w 0x0120 0xa108 0xa0000 #PulserPeriod=2730688ns
+trbcmd w 0x0120 0xa201 0xb #PulserWidth=45ns
+trbcmd w 0x0120 0xa204 0xb #PulserWidth=45ns
+trbcmd w 0x0120 0xa205 0xb #PulserWidth=45ns
+trbcmd w 0x0120 0xa206 0xb #PulserWidth=45ns
+trbcmd w 0x0120 0xa207 0xb #PulserWidth=45ns
+trbcmd w 0x0120 0xa208 0xb #PulserWidth=45ns
+
# set trigger for cosmics -> not working!
#exec_cmd{local} /home/hadaq/trbsoft/daq/ecal/loadregisterdb.pl /home/hadaq/trbsoft/daq/ecal/register_monitoring_trigger.db
trbcmd w 0xfe71 0x7111 500 #max number of words per board
-trbcmd loadbit 0xfe71 0x7114 0x00ff0000 0x00050000 #minimum event size
+trbcmd w 0xfe71 0x7114 0x00050000 #min number of words per board
#prepare PaDiWa-AMPS2
#set global thresholds
-#DEACTIVATED FOR ECAL COSMIC TEST -> tuning by hand
#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=0 --execute=pwm --data=0x99c
#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=1 --execute=pwm --data=0xd990
#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=2 --execute=pwm --data=0x99c