TWiki> Main Web>AmsTracker>DaqSpecial (revision 9)EditAttachPDF

Special Operations

How to directly command a JINF/TDR:

  • Go to /home/ams/TrackerUser/AMSWireCommands/
  • here you can find the program TESTjmdc
    this is a program that let talk to JINJ boards and to all the nodes after it

    The syntax for this program is:
    ./TESTjmdc port amsw_node cmd arg1 arg2 ...
    • port
    • amsw_node is the address (in AMSWire scheme, NOT in JMDC scheme!!!) of the node you want talk to:
      Node address examples:
      JINJ-itself = ffff
      JINF-T0 = 033f
      TDR-0-00-A (T0 TDR00) = 003f033f
      TDR-4-10-B (T4 TDR21) = 153f103f
      AllTDR-7 = 4000173f
          JINJ   JMDC  
+ WAKE + 1 T0 0x033f 03 0xA6 0xA7 0xA8 0xA9  
- WAKE + 2 T1 0x093f 09 0xAA 0xAB 0xAC 0xAD  
- RAM + 4 T2 0x003f 00 0xAE 0xAF 0xB0 0xB1  
+ RAM + 3 T3 0x013f 01 0xB2 0xB3 0xB4 0xB5  
+ WAKE - 5 T4 0x103f 16 0xB6 0xB7 0xB8 0xB9  
- WAKE - 6 T5 0x113f 17 0xBA 0xBB 0xBC 0xBD  
- RAM - 8 T6 0x163f 22 0xBE 0xBF 0xC0 0xC1  
+ RAM - 7 T7 0x173f 23 0xC2 0xC3 0xC4 0xC5  
    • cmd is the command to send to the node (from Kounine document)
      Examples of Command (from Kounine document):
      Read Status: C [no pars]
      Read Flash: 7 [no pars]
      Read last Event Number: 2 [no pars]
    • args are the parameters you want to pass to cmd
      you can pass how many args (command's parameters) you need
    • numbers must be written in hex

Filenames convention and history:

The dsp codes are stored in : /home/ams/TrackerUser/AMSWireCommands/DspCodes/

the file name has to be file_ node _ name.dat


  • node = tdr, jinft, jinj, jlvl1
  • name = versnumber = same name as in Philipp list i.e. 3ee3, MUST be THE SAME as the first line in the contents of the file itself.

How to Load a new JINF-T/TDR firmware

  • Get the new dsp code in : /home/ams/TrackerUser/AMSWireCommands/DspCodes/file_ node _ name.dat
  • copy the file as file.dat in : /home/ams/TrackerUser/AMSWireCommands/
  • edit the first line of the file.dat and set it as:
    • 2932 if it will be the default file for JINFT (will become 29F2)
    • 29F3 if it will be the default file for TDR
  • REMEMBER: when a DSP code is written in the flash it will be effectively used only if it is loaded in memory with the right command (AMSWire 0x46).
  • There are useful scripts:

  1. port# filename#
    where node=TDR,JINF
  2. a - port# filename#
    where node=TDR,JINF
    It loads file.dat from the current directory, read back the flash content and
    checks that filename# is in the flash memory.
    b - port# filename#
    where node=TDR,JINF
    checks for file_ node _ name.dat in the /DspCodes directory and copies it in file.dat in current directory before uploading.
  3. port# filename# #status
    where node=TDR,JINF
    looks for the filename in the flash and if it is found and set the default bit according to #status
    status=1 set it to default (from 3xxx to 2xxx, from 7xxx to 6xxx)
    status=0 downgrade from default
  4. LoadFlashFileOnAllnodes #port #filename
    runs the #filename on all nodes
  5. port# new_filename# old_filename#
  6. port# new_filename# old_filename#
    Performs either 2a or 2b on the new_filename + 3 with status=0 on old filename and 3 with status=1 + 4 on new filename.
  7. Output:
    during the running of these script you can see two types of info/output:
    if the AMSWire Command was sended without (with) problems -> rxdone=0x0000 (0x0001)
    if the operations was done -> File Erased (Not Erased) / File Loaded (Not Loaded)

How to Create and Load a TDR config file:

  • The stuff to create a config files, create the script to load config files, and then load config files is in:

    In this directory you can find all the stuff (except for TESTjmdc of which there's a simbolic link) needed for create and load configuration files for TDRs:

    - ConfigFile: this is the program to create binary config files for TDRs starting from a "human readable" parameters file
    (as example TDRParamFile.txt) and to create the script ( usefull to uplaod the binary files

    - the script that load the correct configuration file in each TDR

    - TDRParamFile.txt: can be used as a template for the "human readable" parameter file for TDR

    The file of parameters ("human readable file") can be filled using the TDR documentation by Philipp Azzarello
    and taking into account that for "compliantness" a parameter indicated as "N" here has to written as "0 0 N"
    (where the first two numbers are the Group and the SubGroup, here 0).

    The script for loading the configuration file has to be called using 1 parameter
    (the JMDC port to be used, i.e.
    to use JINF-T-B [JMDC ports: 0,3]
    to use JINF-T-A [JMDC ports: 1,2])
  • The procedure has to be:
    1. Create a parameter file or edit the template (TDRParamFile.txt)
    2. ./ConfigFile TDRParamFile.txt
    3. ./LoadConfs #port

-- PaoloZuccon - 03-Dec-2009

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt TDRParamFile.txt r1 manage 1.7 K 2009-12-23 - 18:53 MatteoDuranti Human readable TDR parameter file
Unknown file formatdat TDRconfigfile_0.dat r1 manage 0.3 K 2009-12-23 - 19:04 MatteoDuranti TDR configfile (created starting from TDRParamFile.txt) generic
Unknown file formatdat TDRconfigfile_1.dat r1 manage 0.3 K 2009-12-23 - 19:05 MatteoDuranti TDR configfile (created starting from TDRParamFile.txt) for ladder TAS type 1
Unknown file formatdat TDRconfigfile_2.dat r1 manage 0.3 K 2009-12-23 - 19:05 MatteoDuranti TDR configfile (created starting from TDRParamFile.txt) for ladder TAS type 2
Unknown file formatdat TDRconfigfile_3.dat r1 manage 0.3 K 2009-12-23 - 19:06 MatteoDuranti TDR configfile (created starting from TDRParamFile.txt) for ladder TAS type 3
Unknown file formatdat TDRconfigfile_4.dat r1 manage 0.3 K 2009-12-23 - 19:11 MatteoDuranti TDR configfile (created starting from TDRParamFile.txt) for ladder TAS type 4
Edit | Attach | Watch | Print version | History: r20 | r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r9 - 2009-12-23 - MatteoDuranti
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback