[subexp-daq] Question on default firmware for VULOM

Weber, Guenter Dr. g.weber at hi-jena.gsi.de
Tue Feb 20 13:54:22 CET 2024


Dear friends,


attached please find a script that automatically choses the right firmware for the VULOM.


If you find time, please have a look at it and tell me if you think it is useful or if there is any mistake.


On my system it works fine so far.




Best greetings

Günter

________________________________
Von: subexp-daq <subexp-daq-bounces at lists.chalmers.se> im Auftrag von Weber, Guenter Dr. <g.weber at hi-jena.gsi.de>
Gesendet: Dienstag, 20. Februar 2024 10:46:52
An: Hans Toshihide Törnqvist; Discuss use of Nurdlib, TRLO II, drasi and UCESB.
Betreff: Re: [subexp-daq] Question on default firmware for VULOM


Dear Hans,


just to close this issue, here is what we are doing now to set the VULOM to the right firmware. As it is possible that a DAQ system is operating with different software versions that also require different VULOM firmware, we now load the right firmware 'on-the-fly' as part of the startup of the DAQ system. After loading of the firmware a short waiting time is necessary before the VULOM is ready again.


---------------------------------------------------

# Obtain the right firmware

VULOM4_FW=`cat ${TRLOII_PATH}/fw/vulom4b_trlo/trlo_defs.h | grep MD5SUM_STAMP | sed 's/.*0x//'`
export VULOM4_CTRL=$trloiipath/trloctrl/fw_${VULOM4_FW}_trlo/bin_${machine}_${version}/trlo_ctrl


# setup local constants
addr=3
firmware_region=2

# restarting the VULOM to set the correct firmware version
echo "Restarting VULOM with firmware region" $firmware_region
$TRLOII_PATH/bin/vulomflash --addr=$addr --restart=$firmware_region
echo "Waiting for VULOM to answer..."
exit_code=1
while [ $exit_code -ne 0 ] ; do
    $TRLOII_PATH/bin/vulomflash --addr=$addr --read &> /dev/null
    exit_code=$?
    if [ $exit_code -ne 0 ] ; then
        sleep 1 #sleep for 1 sec before retrying
    fi
done


# Trigger on VULOM pulser
$VULOM4_CTRL --addr=$addr --clear-setup --config=vulom.trlo standalone module_trigger

----------------------------------------------------


If we did understand the naming convention in "bin/vulomflash --addr=$ADDR --readprogs" a bit better, we would probably also be able to estimate from the name/number of the firmware the right firmware region on the VULOM (and we could check if the right firmware was already loaded). But at the moment, we set firmware_region by hand.


In the ideal world, we would then have an init script for the DAQ that takes care of the VULOM settings just by looking at the state of the software under TRLOII_PATH. This could help our guys a lot who have no idea about all this stuff :-)




Best greetings

Günter


________________________________
Von: Hans Toshihide Törnqvist <hans.tornqvist at chalmers.se>
Gesendet: Montag, 19. Februar 2024 10:37:37
An: Discuss use of Nurdlib, TRLO II, drasi and UCESB.; Weber, Guenter Dr.; Discuss use of Nurdlib, TRLO II, drasi and UCESB.
Betreff: Re: [subexp-daq] Question on default firmware for VULOM

Dear Günter,

As I understand it, the firmware you would like to have has been flashed and tested quite a lot and seems to work?

Then you can flash program area 0, but you will need the --force option too. Area 0 will only be flashed if the firmware in question has been flashed into another area, as in your present case.

After that it will load after every power cycle.

Cheers,
Hans


"Weber, Guenter Dr." <g.weber at hi-jena.gsi.de> skrev: (19 februari 2024 10:15:37 CET)

Dear friends,


I restarted the crate and now get the following error message when starting the DAQ:


10: crate/crate.c:923: .Slow-init module[0]=GSI_VULOM.
LOG: TRLO: MD5SUM: 0x426cb99c (CT: 5bba6507 = 2018-10-07 19:56:55 UTC)
WARNING: Known firmware (alias): 0x6e4ba1a9.
WARNING: Known firmware (alias): 0x1409285e.
WARNING: Known firmware (alias): 0xa73c5093.
WARNING: Known firmware (alias): 0x6e4ba1a9.
WARNING: Known firmware (alias): 0x1409285e.
FATAL: TRLO firmware wrong: 0x426cb99c, expected 0x6e4ba1a9 or alias.


I assume that upon power-on the VULOM is booting with a default firmware that is not the one necessary to run with the most recent version of NURDLIB, etc.


How can I tell the VULOM which firmware version from its memory it should load as default?




Thank you very much!




Best greetings

Günter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chalmers.se/pipermail/subexp-daq/attachments/20240220/b00cd88d/attachment.html>
-------------- next part --------------
#!/bin/sh

# hardware address of the VULOM
addr=3

# the following script checks if the VULOM is running with the firmware required by the software in TRLOII_PATH
# if necessary, the script looks for the location of the required firmware on the memory of the VULOM and sets the VULOM to the desired firmware version
VULOM4_FW=`cat ${TRLOII_PATH}/fw/vulom4b_trlo/trlo_defs.h | grep MD5SUM_STAMP | sed 's/.*0x//'`
export VULOM4_CTRL=$trloiipath/trloctrl/fw_${VULOM4_FW}_trlo/bin_${machine}_${version}/trlo_ctrl
VULOM_FW_NOW=`${TRLOII_PATH}/bin/vulomflash --addr=3 --read | grep "VOLUM+0 =>" | sed "s/.*0x//"`
echo "Current firmware on VULOM -> " $VULOM_FW_NOW
echo "Necessary firmware on VULOM -> " $VULOM4_FW
if [ $VULOM4_FW != $VULOM_FW_NOW ] ; then
    firmware_region=`${TRLOII_PATH}/bin/vulomflash --addr=3 --readprogs | sed -n -e "/$VULOM4_FW/{s/^.*Rng \([0-9]\+\):.*$/\1/p;q}"`
    if [ -z $firmware_region ] ; then
        echo "Necessary firmware not found on VULOM!"
        exit 1
    else
        # restarting the VULOM to set the correct firmware version
        echo "Restarting VULOM with firmware region" $firmware_region
        $TRLOII_PATH/bin/vulomflash --addr=$addr --restart=$firmware_region
        echo "Waiting for VULOM to answer..."
        exit_code=1
        while [ $exit_code -ne 0 ] ; do
            $TRLOII_PATH/bin/vulomflash --addr=$addr --read &> /dev/null
            exit_code=$?
            if [ $exit_code -ne 0 ] ; then
                sleep 1 #sleep for 1 sec before retrying
            fi
        done
    fi
fi


More information about the subexp-daq mailing list