diff --git a/applications/apertif/commissioning/dish_commands.sh b/applications/apertif/commissioning/dish_commands.sh index 8220a8c269f280b6da0ce6c2f39e5b13a77008b6..5c87a137d30322d398b0b243707fa12cc1069e77 100755 --- a/applications/apertif/commissioning/dish_commands.sh +++ b/applications/apertif/commissioning/dish_commands.sh @@ -101,37 +101,86 @@ python $UPE/peripherals/util_system_info.py --unb $UNBS --fn 0:3 --bn 0:3 -n 4 python $UPE/peripherals/util_system_info.py --unb $UNBS --fn 0:3 --bn 0:3 -n 2 ############################################################################### -# Call ADC initialization sequence #FIXME Strip down called command sequence -# in ADU_functions.py. +# Call ADU initialization sequence ############################################################################### -python $UPE/apps/apertif_beamformer/util_apertif_beamformer.py --unb $UNBS --bn 0:3 --fn 0:3 --cmd 371 --sp 0:3 +# Set ADU normal mode +python $UPE/peripherals/util_adu_i2c_commander.py --unb $UNBS --bn 0:3 --sp 0:3 -n 1 + +# Update ADU I2C sequences +python $UPE/apps/apertif_beamformer/util_apertif_beamformer.py --unb $UNBS --bn 0:3 --fn 0:3 --sp 0:3 -v 3 --cmd 39 +# Set ADU ADC[1,0] to 0 dB +python $UPE/peripherals/util_adu_i2c_commander.py --unb $UNBS --bn 0:3 --sp 0:3 -n 5 +# Set ADU led on +python $UPE/peripherals/util_adu_i2c_commander.py --unb $UNBS --bn 0:3 --sp 0:3 -n 31 ############################################################################### -# Load the application images (2nd time as workaround for ADU lock issue) +# Optional reload the application images (reload has no effect [erko 23 jun]) ############################################################################### -# Revert to facory image so we can reflash the user firmware -python $UPE/peripherals/util_wdi.py --unb $UNBS --fn 0:3 --bn 0:3 -n 0 +#RELOAD=True +RELOAD=False +if [ "$RELOAD" == "True" ]; then + sleep 1 + # Revert to facory image so we can reflash the user firmware + python $UPE/peripherals/util_wdi.py --unb $UNBS --fn 0:3 --bn 0:3 -n 0 -# Wait until the factory images are online -sleep 4 # It takes at least a second + # Wait until the factory images are online + sleep 4 # It takes at least a second -# Get memory map of factory image -python $UPE/peripherals/util_system_info.py --unb $UNBS --fn 0:3 --bn 0:3 -n 4 + # Get memory map of factory image + python $UPE/peripherals/util_system_info.py --unb $UNBS --fn 0:3 --bn 0:3 -n 4 -# Wait until PPS -python $UPE/peripherals/util_ppsh.py --unb "${UNBS:$i:1}" --bn 0 -n 4 + # Wait until PPS + python $UPE/peripherals/util_ppsh.py --unb "${UNBS:$i:1}" --bn 0 -n 4 -# Load all dish firmware images from flash -python $UPE/peripherals/util_epcs.py --unb $UNBS --fn 0:3 --bn 0:3 -n 8 & + # Load all dish firmware images from flash + python $UPE/peripherals/util_epcs.py --unb $UNBS --fn 0:3 --bn 0:3 -n 8 & -# Wait until the user images are online -sleep 4 + # Wait until the user images are online + sleep 4 -# Get memory map of the user images -python $UPE/peripherals/util_system_info.py --unb $UNBS --fn 0:3 --bn 0:3 -n 4 + # Get memory map of the user images + python $UPE/peripherals/util_system_info.py --unb $UNBS --fn 0:3 --bn 0:3 -n 4 -# Print the user firmware image design names -python $UPE/peripherals/util_system_info.py --unb $UNBS --fn 0:3 --bn 0:3 -n 2 + # Print the user firmware image design names + python $UPE/peripherals/util_system_info.py --unb $UNBS --fn 0:3 --bn 0:3 -n 2 +fi + +############################################################################### +# Optional set ADU lock phase (does not work yet [erko 23 jun]) +############################################################################### +#SET_ADUH_CLKPHS=True +SET_ADUH_CLKPHS=False +if [ "$SET_ADUH_CLKPHS" == "True" ]; then + # Wait some time for ADUH lock + sleep 10 + # Pre-read of ADUH lock status + python $UPE/peripherals/util_aduh_quad.py --unb $UNBS --bn 0:3 --sp 0:3 -n 4 + # Second read of ADUH lock status + python $UPE/peripherals/util_aduh_quad.py --unb $UNBS --bn 0:3 --sp 0:3 -n 0 + + # Enable only the ADUH clk phase that it is locked to + python $UPE/peripherals/util_aduh_quad.py --unb 0:7 --bn 0:3 --sp 0:3 -n 7 --rep 3 + + # Read ADUH clk phase control to see selected clk phase + python $UPE/peripherals/util_aduh_quad.py --unb 0:7 --bn 0:3 --sp 0:3 -n 2 + + # Pre-read of ADUH lock status + python $UPE/peripherals/util_aduh_quad.py --unb $UNBS --bn 0:3 --sp 0:3 -n 4 + # Second read of ADUH lock status + python $UPE/peripherals/util_aduh_quad.py --unb $UNBS --bn 0:3 --sp 0:3 -n 0 +fi + +############################################################################### +# Pre read to start measurement interval for PPS count stable +############################################################################### +sleep 2 +python $UPE/peripherals/util_ppsh.py --unb $UNBS --bn 0:3 -n 10 + +############################################################################### +# Pre-read to start measurement interval for ADU lock stable +############################################################################### +sleep 5 +python $UPE/peripherals/util_aduh_quad.py --unb $UNBS --bn 0:3 --sp 0:3 -n 4 ############################################################################### # Set Pre-Transpose