Skip to content
Snippets Groups Projects
Select Git revision
  • 7ca0733fad95f2e14346d6a85ee17b16a5dfabb1
  • master default protected
  • L2SS-1914-fix_job_dispatch
  • TMSS-3170
  • TMSS-3167
  • TMSS-3161
  • TMSS-3158-Front-End-Only-Allow-Changing-Again
  • TMSS-3133
  • TMSS-3319-Fix-Templates
  • test-fix-deploy
  • TMSS-3134
  • TMSS-2872
  • defer-state
  • add-custom-monitoring-points
  • TMSS-3101-Front-End-Only
  • TMSS-984-choices
  • SDC-1400-Front-End-Only
  • TMSS-3079-PII
  • TMSS-2936
  • check-for-max-244-subbands
  • TMSS-2927---Front-End-Only-PXII
  • Before-Remove-TMSS
  • LOFAR-Release-4_4_318 protected
  • LOFAR-Release-4_4_317 protected
  • LOFAR-Release-4_4_316 protected
  • LOFAR-Release-4_4_315 protected
  • LOFAR-Release-4_4_314 protected
  • LOFAR-Release-4_4_313 protected
  • LOFAR-Release-4_4_312 protected
  • LOFAR-Release-4_4_311 protected
  • LOFAR-Release-4_4_310 protected
  • LOFAR-Release-4_4_309 protected
  • LOFAR-Release-4_4_308 protected
  • LOFAR-Release-4_4_307 protected
  • LOFAR-Release-4_4_306 protected
  • LOFAR-Release-4_4_304 protected
  • LOFAR-Release-4_4_303 protected
  • LOFAR-Release-4_4_302 protected
  • LOFAR-Release-4_4_301 protected
  • LOFAR-Release-4_4_300 protected
  • LOFAR-Release-4_4_299 protected
41 results

t_radb_functionality.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    production_apsct.py 1.92 KiB
    """
    Copyright 2021 Stichting Nederlandse Wetenschappelijk Onderzoek Instituten,
    ASTRON Netherlands Institute for Radio Astronomy
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
     http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    
    Check APSCT_CLK
    
    """
    import apsct_lib
    import sys
    
    READ_ALL = True
    
    CLK_FREQ = '200MHz'
    
    if len(sys.argv) < 2:
        print("Production_apsct.py <ASTRON NR> <Serial number>")
        print("e.g. python3 production_apsct.py 2023-01 1234")
        exit()
    
    apsct = apsct_lib.ApsctClass(CLK_FREQ)
    
    print*("Check APSCT in 200MHz mode")
    apsct.frequency = "200MHz"
    apsct.set_apsct()
    apsct.pll_200.read_lock()
    apsct.pll_200.read_lol()
    apsct.pll_160.read_lock()
    apsct.pll_160.read_lol()
    apsct.sensors.apsct_sensors()
    
    print*("Check APSCT in 160MHz mode")
    apsct.frequency = "160MHz"
    apsct.set_apsct()
    apsct.pll_200.read_lock()
    apsct.pll_200.read_lol()
    apsct.pll_160.read_lock()
    apsct.pll_160.read_lol()
    apsct.sensors.apsct_sensors()
    
    print*("Check APSCT in off mode")
    apsct.frequency = "OFF"
    apsct.set_apsct()
    apsct.pll_200.read_lock()
    apsct.pll_200.read_lol()
    apsct.pll_160.read_lock()
    apsct.pll_160.read_lol()
    apsct.sensors.apsct_sensors()
    
    if READ_ALL:
        apsct.pll_200.read_all_regs_pll()
    #    apsct.pll_160.read_all_regs_pll()
        apsct.read_IO_expanderis()
    
    if apsct.check_apsct():
        apsct_id = "APSCT-" + sys.argv[1]
        serial = sys.argv[2]
        rw_ok = apsct.eeprom.wr_rd_eeprom(apsct_id, address=0)
        if rw_ok:
            rw_ok = apsct.eeprom.wr_rd_eeprom(serial, address=0x20)
        if not rw_ok:
            print("EEPROM Error")