From 3775d97da088fa8dd5618add0491278ddc30a2c2 Mon Sep 17 00:00:00 2001 From: Hades DAQ Date: Mon, 1 Oct 2018 13:37:47 +0200 Subject: [PATCH] update ecal scripts --- ecal/HowTo.txt | 28 +++++++++++++++++++++++++++- ecal/register_tdc_ecal.db | 2 +- ecal/startup.script | 17 +++++++++++++++-- 3 files changed, 43 insertions(+), 4 deletions(-) diff --git a/ecal/HowTo.txt b/ecal/HowTo.txt index 45f84b4..9174e6c 100644 --- a/ecal/HowTo.txt +++ b/ecal/HowTo.txt @@ -16,6 +16,15 @@ Start ECAL file # ECAL pulser http://hades33/daqtools/addons/pulseraddon.pl?Control +board 0xfe61 (0X0120) +-->Control: +EnKelFirst16: 0xffff (switch pulser on) + +-->PulserConfig +Slices: +PulserPeriod: +PulserWidth: + # power switch @@ -30,6 +39,9 @@ export PERL5LIB=~/trbsoft/daqtools/perllibs/ ./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 @@ -37,4 +49,18 @@ trbflash program 0x6040 *.bit 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 diff --git a/ecal/register_tdc_ecal.db b/ecal/register_tdc_ecal.db index 2c9814a..b435abb 100644 --- a/ecal/register_tdc_ecal.db +++ b/ecal/register_tdc_ecal.db @@ -12,4 +12,4 @@ #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 diff --git a/ecal/startup.script b/ecal/startup.script index f3519cc..0401565 100644 --- a/ecal/startup.script +++ b/ecal/startup.script @@ -3,16 +3,29 @@ 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 -- 2.43.0