Skip to content
Snippets Groups Projects
Commit ba81cf75 authored by Paulus Kruger's avatar Paulus Kruger
Browse files

LTS config

parent 7a650b72
Branches
Tags
No related merge requests found
Pipeline #35896 passed
version: "1.0"
description: "1234"
name: "APSCTTR"
drivers:
- name: I2C
type: i2c
parameters: [4] #I2C port number
- name: I2C_CLK
type: i2c_dev #I2C devices
parent: I2C
status: APSCTTR_I2C_error
- name: SPIbb1
type: spibitbang2 #SPI bitbang via GPIO expander: CLK, SDI,SDO,CS
parent: I2C_CLK
devreg: [IO1.GPIO1,IO1.GPIO1,IO1.GPIO1,IO1.GPIO1]
parameters: [4,7,5,6]
- name: SPIbb2
type: spibitbang2 #SPI bitbang via GPIO expander: CLK, SDI,SDO,CS
parent: I2C_CLK
devreg: [IO2.GPIO1,IO2.GPIO1,IO2.GPIO1,IO2.GPIO1]
parameters: [4,7,5,6]
#This is the I2C devices in the RCU
device_registers:
- name: IO
dim: 2
description: IO-Expander (TCA6416APWR)
address: [0x20,0x21]
driver: I2C_CLK
registers:
- name: CONF1
description: Direction of port1
address: 6
store: True
- name: CONF2
description: Direction of port2
address: 7
store: True
- name: GPIO1
description: Input/Ouput port 1
address: [0,2] #Read / Write address different
store: True
- name: GPIO2
description: Input/Ouput port 2
address: [1,3] #Read / Write address different
store: True
- name: PLL2
driver: SPIbb1
registers:
- name: PLL_stat
description: PLL locked status
address: 0x0
- {name: r3, address: 0x03}
- {name: r5, address: 0x05}
- {name: r6, address: 0x06}
- name: PLL1
driver: SPIbb2
registers:
- name: PLL_stat
description: PLL locked status
address: 0x0
- {name: r3, address: 0x03}
- {name: r5, address: 0x05}
- {name: r6, address: 0x06}
- name: ROM
description: 24AA02UIDT
address: 0x50
driver: I2C_CLK
registers:
- name: ID
description: Random
address: 0xfc
- name: Version
description: Set in production
address: 0
- name: Serial
address: 0x20
- name: VSENSE
description: Monitor ADC
address: 0x74
device: LTC2495
driver: I2C_CLK
registers:
- name: V_0
address: 0xB080
wait: 250
- name: V_1
address: 0xB880
wait: 250
- name: V_2
address: 0xB180
wait: 250
- name: V_3
address: 0xB980
wait: 250
- name: V_4
address: 0xB280
wait: 250
- name: V_5
address: 0xBA80
wait: 250
- name: V_6
address: 0xB380
wait: 250
- name: Temp
address: 0xA0C0
wait: 250
variables:
- name: APSCTTR_I2C_error
description: 0=good, >0 indicates an I2C communication error
driver: I2C_CLK
rw: ro #server RW variable, not linked to IO
dtype: uint8
- name: APSCTTR_monitor_rate
description: Monitor rate in seconds
rw: variable
dtype: uint8
- name: APSCTTR_translator_busy
description: True when I2C line busy
rw: ro #server variable, not linked to IO
dtype: boolean
dim: 1
- name: APSCT_PCB_ID
description: Unique PCB ID
driver: I2C_CLK
devreg: ROM.ID
width: 32
rw: ro
dtype: uint32
- name: APSCT_PCB_version
description: Version number
driver: I2C_CLK
devreg: ROM.Version
width: 0x80 #16 characters
rw: ro
dtype: string
- name: APSCT_PCB_number
description: PCB number (astron.nl/webforms/IenS-Boarden/view.php?id=xxx)
driver: I2C_CLK
devreg: ROM.Serial
width: 0x80 #16 characters
rw: ro
dtype: string
- name: [APSCT_PWR_PLL_200MHz_on,APSCT_PWR_PLL_160MHz_on]
description: CLK power status. Controlled by APSCT_xxxMHz_ON and APSCT_OFF
rw: ro
dtype: boolean
driver: I2C_CLK
devreg: [IO1.GPIO1,IO2.GPIO1]
bitoffset: 1
width: 1
- name: APSCT_PWR_on
description: CLK power status. Controlled by APSCT_xxxMHz_ON and APSCT_OFF
rw: ro
dtype: boolean
driver: I2C_CLK
devreg: IO1.GPIO2
bitoffset: 3
width: 1
- name: APSCT_PPS_ignore
rw: rw
dtype: boolean
driver: I2C_CLK
devreg: IO1.GPIO2
bitoffset: 2
width: 1
- name: [APSCT_INPUT_10MHz_good,APSCT_INPUT_PPS_good]
rw: ro
dtype: boolean
driver: I2C_CLK
devreg: IO2.GPIO2
bitoffset: [0,1]
width: 1
monitor: true
- name: [APSCT_PLL_200MHz_locked,APSCT_PLL_160MHz_locked]
# description: First status pin give lock status
rw: ro
dtype: boolean
monitor: true
driver: I2C_CLK
devreg: [IO1.GPIO1,IO2.GPIO1]
bitoffset: 2
width: 1
- name: [APSCT_PLL_200MHz_error,APSCT_PLL_160MHz_error]
# description: Second status pin give error
rw: ro
dtype: boolean
monitor: true
driver: I2C_CLK
devreg: [IO1.GPIO1,IO2.GPIO1]
bitoffset: 3
width: 1
- name: APSCT_PLL_200MHz_locked_SPI
description: 0x81=locked
driver: I2C_CLK
devreg: PLL2.PLL_stat
width: 8
rw: ro
dtype: uint8
debug: True
- name: APSCT_PLL_160MHz_locked_SPI
description: 0x81=locked
driver: I2C_CLK
devreg: PLL1.PLL_stat
width: 8
rw: ro
dtype: uint8
debug: True
# - name: [APSCT_PLL_r3,APSCT_PLL_r5,APSCT_PLL_r6]
# driver: I2C_CLK
# devreg: [PLL.r3,PLL.r5,PLL.r6]
# width: 8
# rw: ro
# dtype: uint8
# debug: True
- name: [APSCT_IO1_GPIO1,APSCT_IO1_GPIO2,APSCT_IO2_GPIO1,APSCT_IO2_GPIO2]
driver: I2C_CLK
devreg: [IO1.GPIO1,IO1.GPIO2,IO2.GPIO1,IO2.GPIO2]
width: 8
rw: ro
dtype: uint8
debug: True
- name: APSCT_IO2_GPIO1
driver: I2C_CLK
devreg: IO2.GPIO1
width: 8
rw: ro
dtype: uint8
debug: True
- name: APSCT_TEMP
description: Temperature sensor on PCB
driver: I2C_CLK
devreg: VSENSE.Temp
width: 23
scale: 3.8265e-3
convert_unit: Kelvin2Celsius
rw: ro
dtype: double
monitor: true
- name: [APSCT_PWR_INPUT_3V3,APSCT_PWR_PLL_160MHz_3V3,APSCT_PWR_PLL_200MHz_3V3,APSCT_PWR_CLKDIST1_3V3,APSCT_PWR_CLKDIST2_3V3,APSCT_PWR_PPSDIST_3V3,APSCT_PWR_CTRL_3V3]
driver: I2C_CLK
devreg: [VSENSE.V_0,VSENSE.V_1,VSENSE.V_2,VSENSE.V_3,VSENSE.V_4,VSENSE.V_5,VSENSE.V_6]
width: 23
scale: 1.12165e-6
rw: ro
dtype: double
monitor: true
methods:
- name: APSCTTR_Init #Called after startup to load. Should have all stored registers
driver: I2C_CLK
debug: True
instructions:
- APSCTTR_I2C_error : 0
- APSCT_IO1_GPIO1 : Update
- APSCT_IO1_GPIO2 : Update
- APSCT_IO2_GPIO1 : Update
- APSCT_IO2_GPIO2 : Update
- IO1.CONF1: Update
- IO1.CONF2: Update
- IO2.CONF1: Update
- IO2.CONF2: Update
- APSCTTR_Update: 0
- name: APSCTTR_Update
driver: I2C_CLK
debug: True
instructions:
- APSCT_PCB_ID : Update
- APSCT_PCB_version : Update
- APSCT_PCB_number : Update
- APSCT_PWR_on: Update
- APSCT_PWR_PLL_200MHz_on: Update
- APSCT_PLL_200MHz_locked: Update
- APSCT_PLL_200MHz_error: Update
- APSCT_PWR_PLL_160MHz_on: Update
- APSCT_PLL_160MHz_locked: Update
- APSCT_PLL_160MHz_error: Update
- APSCT_PPS_ignore : Update
- name: APSCT_200MHz_on
driver: I2C_CLK
description: Configure clock. Monitored using APSCT_PWR_on, APSCT_PLL_error and APSCT_PLL_locked
instructions:
- APSCTTR_I2C_error : 0
- IO1.CONF1: 0x2C #0010 1100 PPS/PWR output, SCLK,CS,SDI
- IO1.CONF2: 0x00
- IO2.CONF1: 0x2C #0010 1100 PPS/PWR output, SCLK,CS,SDI
- IO2.CONF2: 0x03 #
- IO1.GPIO1: 0x42 #0100 0010 high:200MHz PLL enable, CS high
- IO1.GPIO2: 0xF8 #PWR enable ##Check if not 4??
- IO2.GPIO1: 0x00 #All low
- IO2.GPIO2: 0x00 #All low (just inputs)
- WAIT: 200
- APSCT_PLL200_setup: 0
- WAIT: 200 #ms to wait before checking lock
- APSCTTR_Update: 0 #refresh all settings
- name: APSCT_160MHz_on
driver: I2C_CLK
description: Configure clock. Monitored using APSCT_PWR_on, APSCT_PLL_error and APSCT_PLL_locked
instructions:
- APSCTTR_I2C_error : 0
- IO1.CONF1: 0x2C #0010 1100 PPS/PWR output, SCLK,CS,SDI
- IO1.CONF2: 0x00
- IO2.CONF1: 0x2C #0010 1100 PPS/PWR output, SCLK,CS,SDI
- IO2.CONF2: 0x03 #
- IO1.GPIO1: 0x00
- IO1.GPIO2: 0x08 #PWR enable ##Check if not 4??
- IO2.GPIO1: 0x42 #0100 0010 high:160MHz PLL enable, CS high
- IO2.GPIO2: 0x00 #All low (just inputs)
- WAIT: 200
- APSCT_PLL160_setup: 0
- WAIT: 200 #ms to wait before checking lock
- APSCTTR_Update: 0 #refresh all settings
- name: APSCT_off
driver: I2C_CLK
description: Switch clock off. Monitored using APSCT_PWR_on
instructions:
- APSCTTR_I2C_error : 0
- IO1.GPIO1: 0x00
- IO1.GPIO2: 0x00
- IO2.GPIO1: 0x00
- IO2.GPIO2: 0x00
- APSCTTR_Update: 0 #refresh all settings
- name: APSCT_PLL200_setup
driver: I2C_CLK
debug: true
instructions:
# - PLL2.0x03: 0x08 #Set power, this is default
#x - PLL2.0x04: 0xCF #LTS worked without it
- PLL2.0x05: 0x17 #was 97, set lock time = =x17?
- PLL2.0x06: 0x10
- PLL2.0x07: 0x04 #Stop R divider
- PLL2.0x08: 0x01 #Set R divider
- PLL2.0x07: 0x00 #Start R divider
- PLL2.0x09: 0x10 #Stop N divider
- PLL2.0x0A: 0x14 #Set N divider=20, 200MHz/20=10MHz = input clock
- PLL2.0x09: 0x00 #Start N divider
- PLL2.0x0D: 0x01 #Divider output 1=1
- PLL2.0x0F: 0x01 #Divider output 2=1
- PLL2.0x11: 0x01 #Divider output 3=1
- PLL2.0x13: 0x01 #Divider output 4=1
- name: APSCT_PLL160_setup
driver: I2C_CLK
debug: true
instructions:
# - PLL1.0x03: 0x08 #Set power, this is default
- PLL1.0x04: 0xCF #
- PLL1.0x05: 0x97 #was 97, set lock time = =x17?
- PLL1.0x06: 0x10
- PLL1.0x07: 0x04 #Stop R divider
- PLL1.0x08: 0x01 #Set R divider
- PLL1.0x07: 0x00 #Start R divider
- PLL1.0x09: 0x10 #Stop N divider
- PLL1.0x0A: 0x10 #Set N divider=16, 160MHz/16=10MHz = input clock
- PLL1.0x09: 0x00 #Start N divider
- PLL1.0x0D: 0x01 #Divider output 1=1
- PLL1.0x0F: 0x01 #Divider output 2=1
- PLL1.0x11: 0x01 #Divider output 3=1
- PLL1.0x13: 0x01 #Divider output 4=1
version: "1.0"
description: "1234"
name: "RECVTR"
drivers:
- name: I2C1 #TCA9548
type: i2c_switch
devreg: [0x70,0x71,0x72,0x73]
parameters: [1] #I2C port number
- name: I2C_RCU
type: i2c_array #An array of similar devices connected to an I2C switch
parent: I2C1
# parameters: [20,22,0,2, 4,6,10,12, 14,16,18,24, 26,28,30,8, 7,5,3,1, 23,21,19,13, 11,9,15,17, 31,29,27,25] #RCU lookup table
parameters: [32,32,32,32 ,32,32,32,32 ,32,32,32,32 ,32,32,32,32 ,32,32,32,32 ,32,32,32,32 ,32,32,32,32 ,32,32,32,32] #RCU lookup table
# parameters: [20,22,0,2,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32] #RCU lookup table
# parameters: [22,0,2,4,6,10,22,0,2,4,6,10,22,0,2,4,6,10,22,0,2,4,6,10,22,0,2,4,6,10,22,0]#repeat 1..7 for RCUH BF test
# 12,14,16,18,24,26,28,30,8,7,5,3,1,23,21,19,13,11,9,15,17,31,29,27,25] #RCU lookup table
I2Ccut: 35 #error count to disable I2C (14 for LTS?)
status: RECVTR_I2C_error
- name: I2C_HBAT
type: hba1 #Special driver to manage HBAT1s.
parent: I2C_RCU
devreg: [0x40.0xFF] #I2C broadcast register
parameters: [24] #PPS GPIO pin
- name: I2Cbb1
type: i2cbitbangp #I2C bitbang via GPIO expander
devreg: [IO3.GPIO2,IO3.GPIO2,IO3.CONF2]
parameters: [5,6,6] #pins
parent: I2C_RCU
- name: I2Cbb2
type: i2cbitbangp
devreg: [IO3.GPIO2,IO3.GPIO2,IO3.CONF2]
parameters: [4,6,6]
parent: I2C_RCU
- name: I2Cbb3
type: i2cbitbangp
devreg: [IO3.GPIO2,IO3.GPIO2,IO3.CONF2]
parameters: [3,6,6]
parent: I2C_RCU
# - name: I2Cbbp
# type: i2cbitbangp
# devreg: [IO3.GPIO2,IO3.GPIO2,IO3.CONF2]
# parameters: [5,4,3,6,6,6,6,6,6]
# parent: I2C_RCU
- name: SPIbb1
type: spibitbang1 #SPI bitbang via GPIO expander: CLK, SDIO, SDIOdir,CS
devreg: [IO3.GPIO1,IO3.GPIO1,IO3.CONF1,IO3.GPIO2]
parameters: [1,0,0,0]
parent: I2C_RCU
- name: SPIbb2
type: spibitbang1
devreg: [IO3.GPIO1,IO3.GPIO1,IO3.CONF1,IO3.GPIO2]
parameters: [3,2,2,1]
parent: I2C_RCU
- name: SPIbb3
type: spibitbang1
devreg: [IO3.GPIO1,IO3.GPIO1,IO3.CONF1,IO3.GPIO2]
parameters: [5,4,4,2]
parent: I2C_RCU
# - name: SPI3bb
# type: spibitbang3 #SPI bitbang via GPIO expander: CLK, SDIO, SDIOdir,CS
# devreg: [IO3.GPIO1,IO3.GPIO1,IO3.CONF1,IO3.GPIO2]
# parameters: [1,3,5, 0,2,4, 0,2,4, 0,1,2]
# parent: I2C_RCU
# - name: HBA_trigger
# type: gpio_hba_trigger
# parameters: [15] #PPS GPIO pin
# devreg: [0x40.0x10] #I2C broadcast register
# parent: I2C_RCU
#This is the I2C devices in the RCU
device_registers:
- name: IO
dim: 4
description: [IO-Expander for filter selection,IO-Expander for ON/OFF, Band, BUFx2,IO-Expander for ADC control]
address: [0x75,0x76,0x20,0x77]
device: [TCA9539,TCA9539,TCA6416,TCA9539]
driver: I2C1
registers:
- name: CONF1
description: Direction of port1
address: 6
store: True
- name: CONF2
description: Direction of port2
address: 7
store: True
- name: GPIO1
description: Input/Ouput port 1
address: [0,2] #Read / Write address different
store: True
- name: GPIO2
description: Input/Ouput port 2
address: [1,3]
store: True
- name: DIR1
address: 4
- name: DIR2
address: 5
- name: ROM
description: IO-Expander for filter selection
address: 0x50
driver: I2C1
registers:
- name: ID
description: Random
address: 0xfc
- name: Version
description: Set in production
address: 0
- name: Serial
address: 0x20
- name: AN
description: Monitor ADC on RCU
address: 0x74 #was 0x14 on RCU2-DIG PCBs
device: LTC2495
driver: I2C1
registers:
- name: V_1v8
address: 0xB080
- name: V_2v5
address: 0xB880
- name: V_3v3
address: 0xB180
- name: I_Ant0
address: 0xB980
- name: I_Ant1
address: 0xB280
- name: I_Ant2
address: 0xBA80
- name: V_Ant_I0
address: 0xB380
- name: V_Ant_O0
address: 0xBB80
- name: V_Ant_I1
address: 0xB480
- name: V_Ant_O1
address: 0xBC80
- name: V_Ant_I2
address: 0xB580
- name: V_Ant_O2
address: 0xBD80
- name: Temp
address: 0xA0C0
#This 'special' devices that uses I2C
- name: HB_UC
description: RCU microcontroller
address: 0x40
driver: I2C1
registers:
- { name: "waitPPS", address: 12, description: "1=wait for PPS"}
- { name: "VREF", address: 13, description: "0..15/16 ratio of Vref"}
- { name: "firmware", address: 0x10, description: "software version"}
# - name: HB_UC_update
# description: RCU microcontroller
# address: 0x40
# driver: HBA_trigger
# registers:
# - name: wait_pps
# address: 10
- name: HBAT
dim: 3
address: [0x41,0x42,0x43]
description: Virtual HBAT0 interface
driver: I2C_HBAT
registers:
- name: XY
address: 0x10
description: XY delay register
store: "w" #only store on write
- name: Version
address: 127
description: HBAT server version
- name: ADC
dim: 3
description: ADC SPI control
device: AD9683
driver: [SPIbb1,SPIbb2,SPIbb3]
registers:
- name: PLL_stat
description: PLL locked status
address: 0x0A
- name: JESD_control1
description: JESD link control
address: 0x5F
- name: SYNC_control
address: 0x3A
- name: CML_level
description: CML output adjust
address: 0x15
- name: Update
description: Global device uptate
address: 0xFF
- name: testmode
address: 0x0D
- name: dither
address: 0x0C
- name: JESDscramble
address: 0x6E
- name: PDWNmodes
address: 0x08
- name: DCcorrect
address: 0x40
- name: DTH
dim: 3
description: CW dither source
device: SI4012
driver: [I2Cbb1,I2Cbb2,I2Cbb3]
address: 0x70
registers:
- name: Freq
description: Frequency
address: [0x1240,0x1140]
- name: Property
description: Properties
address: [0x12,0x11]
- name: State
address: [0x61,0x60]
- name: Start
description: Start CW
address: [0x62,0x62]
- name: Stop
description: Stop CW
address: [0x67,0x67]
- name: Rev
address: 0x10
- name: Tune
address: [0x1221,0x1121]
- name: CONF
address: [0x1210,0x1110]
- name: PA_CONFIG
address: [0x1260,0x1160]
store: True
variables:
- name: RECVTR_monitor_rate
description: Rate at which monitored points are polled (seconds)
driver: I2C_RCU
rw: variable
dtype: uint8
- name: ANT_mask
description: Only RF chains with a true mask is set
driver: I2C_RCU
rw: variable #server RW variable, not linked to IO
dtype: boolean
dim: 96
dim2: [3,32]
- name: RCU_mask
description: Only RCUs with a true mask is set
driver: I2C_RCU
rw: variable #server RW variable, not linked to IO
dtype: boolean
dim: 32
- name: RECVTR_I2C_error
description: 0=Good, >0 communication error
driver: I2C_RCU
rw: ro #server RW variable, not linked to IO
dtype: uint8
mask: RCU_mask
dim: 32
# - name: RCU_state
# description: State of RCUs 0=unknown, 1=ready, 2=busy, 3= wait PPS, 4=error
# driver: I2C_RCU
# rw: ro #server variable, not linked to IO
# dtype: uint8
# dim: 1
- name: RECVTR_translator_busy
description: True when I2C line is busy
rw: ro #server variable, not linked to IO
dtype: boolean
dim: 1
- name: RCU_attenuator_dB
description: RCU Attenuation (dB)
driver: I2C_RCU
devreg: [IO1.GPIO1,IO1.GPIO2,IO2.GPIO1]
bitoffset: [0,0,0]
width: 6
rw: rw
dtype: uint8
dim: 96
dim2: [3,32]
mask: ANT_mask
- name: RCU_band_select
description: Band select for highband 2,1,4 for 110-190,170-230,210-240
driver: I2C_RCU
devreg: [IO2.GPIO2,IO2.GPIO2,IO4.GPIO2]
bitoffset: [0,3,0]
width: 3
rw: rw
dtype: uint8
dim: 96
dim2: [3,32]
mask: ANT_mask
- name: [RCU_IO1_GPIO1,RCU_IO1_GPIO2,RCU_IO2_GPIO1,RCU_IO2_GPIO2,RCU_IO3_GPIO1,RCU_IO3_GPIO2]
driver: I2C_RCU
devreg: [IO1.GPIO1,IO1.GPIO2,IO2.GPIO1,IO2.GPIO2,IO3.GPIO1,IO3.GPIO2]
width: 8
rw: ro
dtype: uint8
dim: 32
mask: RCU_mask
debug: True
- name: RCU_LED_red_on
driver: I2C_RCU
description: Red LED on front panel
devreg: IO2.GPIO2
bitoffset: 6
width: 1
rw: rw
dtype: boolean
convert_unit: bool_invert
dim: 32
mask: RCU_mask
- name: RCU_LED_green_on
driver: I2C_RCU
description: Green LED on front panel
devreg: IO2.GPIO2
bitoffset: 7
width: 1
rw: rw
dtype: boolean
convert_unit: bool_invert
dim: 32
mask: RCU_mask
- name: RCU_TEMP
description: RCU PCB Temperature (Celsius)
driver: I2C_RCU
devreg: AN.Temp
width: 23
scale: 4.210e-3 #Scaled 1.1 for 3.3V ref. 3.827e-3 for 3.0V #T=DATAOUT * Vref/12.25/32. Vref=1.5 V
convert_unit: Kelvin2Celsius
rw: ro
dtype: double
dim: 32
monitor: true
read_parallel: true
mask: RECVTR_I2C_error
- name: RCU_PWR_3V3
description: RCU 3.3V voltage (V)
driver: I2C_RCU
devreg: AN.V_3v3
width: 23
scale: 1.609e-6 #Scaled 1.1: 1.463e-6 #3.0V
rw: ro
dtype: double
dim: 32
read_parallel: true
monitor: true
mask: RECVTR_I2C_error
- name: RCU_PWR_1V8
description: RCU 1.8V voltage (V)
driver: I2C_RCU
devreg: AN.V_1v8
width: 23
scale: 7.8679e-7 #Scaled 1.1: 7.1526e-7 #3.0V ref
rw: ro
dtype: double
dim: 32
read_parallel: true
monitor: true
mask: RECVTR_I2C_error
- name: RCU_PWR_2V5
description: RCU 2.5V voltage (V)
driver: I2C_RCU
devreg: AN.V_2v5
width: 23
scale: 7.8679e-7 #Scaled 1.1: 7.1526e-7 #3.0V ref
rw: ro
dtype: double
dim: 32
read_parallel: true
monitor: true
mask: RECVTR_I2C_error
- name: RCU_PWR_ANT_VOUT
description: Voltage on antenna output of RCU (V). Controlled by ANT_PWR_ON.
driver: I2C_RCU
devreg: [AN.V_Ant_O0,AN.V_Ant_O1,AN.V_Ant_O2]
width: 23
scale: 1.57356e-5 #Scaled 1.1: 1.43051e-5 #3V ref
rw: ro
dtype: double
dim: 96
dim2: [3,32]
read_parallel: true
monitor: true
mask: RECVTR_I2C_error
- name: RCU_PWR_ANT_VIN
description: RCU antenna voltage before switch (V)
driver: I2C_RCU
devreg: [AN.V_Ant_I0,AN.V_Ant_I1,AN.V_Ant_I2]
width: 23
scale: 1.57356e-5 #Scaled 1.1: 1.43051e-5 #3V ref
rw: ro
dtype: double
dim: 96
dim2: [3,32]
read_parallel: true
monitor: true
mask: RECVTR_I2C_error
- name: RCU_PWR_ANT_IOUT
description: Current drawn on antenna output of RCU (A). 15mA offset due to LED on RCU
driver: I2C_RCU
devreg: [AN.I_Ant0,AN.I_Ant1,AN.I_Ant2]
width: 23
scale: 2.62262e-7 #4.5K res
rw: ro
dtype: double
dim: 96
dim2: [3,32]
read_parallel: true
monitor: true
mask: RECVTR_I2C_error
- name: RCU_PWR_DIGITAL_on
description: RCU digital power enable. Controlled by calling RCU_on/RCU_off
driver: I2C_RCU
devreg: IO2.GPIO1
width: 1
bitoffset: 6
rw: ro #rw for testing
dtype: boolean
dim: 32
mask: RCU_mask
- name: RCU_PWR_good
description: Status of RCU power given by LDOs.
driver: I2C_RCU
devreg: IO2.GPIO1
width: 1
bitoffset: 7
rw: ro
dtype: boolean
dim: 32
monitor: true
mask: RECVTR_I2C_error
- name: RCU_PWR_ANALOG_on
description: RCU analog power enable. Controlled by RCU_on/off
driver: I2C_RCU
devreg: IO1.GPIO2
width: 1
bitoffset: 7
rw: rw #rw for testing
dtype: boolean
dim: 32
mask: RCU_mask
- name: RCU_DTH_shutdown
description: False means dither source & ADC powered on.
driver: I2C_RCU
devreg: [IO3.GPIO1,IO3.GPIO1,IO3.GPIO2]
width: 1
bitoffset: [7,6,7]
rw: ro
dtype: boolean
dim: 96
dim2: [3,32]
mask: ANT_mask
debug: True
- name: RCU_PWR_ANT_on
description: Antenna power output ON/OFF control. Monitored by Ant_VOUT.
driver: I2C_RCU
devreg: [IO1.GPIO1,IO1.GPIO1,IO1.GPIO2]
width: 1
bitoffset: [6,7,6]
rw: rw
dtype: boolean
dim: 96
dim2: [3,32]
mask: ANT_mask
- name: RCU_PCB_ID
description: Unique PCB ID
driver: I2C_RCU
devreg: ROM.ID
width: 32
rw: ro
dtype: uint32
dim: 32
mask: RCU_mask
- name: RCU_PCB_version
description: RCU version number
driver: I2C_RCU
devreg: ROM.Version
width: 0x80 #16 characters
rw: ro
dtype: string
dim: 32
mask: RCU_mask
- name: RCU_PCB_number
description: PCB number (astron.nl/webforms/IenS-Boarden/view.php?id=xxx)
driver: I2C_RCU
devreg: ROM.Serial
width: 0x80 #16 characters
rw: ro
dtype: string
dim: 32
mask: RCU_mask
- name: RCU_ADC_locked
description: RCU ADC lock status. May generated noise and polling disabled in future
driver: I2C_RCU
devreg: [ADC1.PLL_stat,ADC2.PLL_stat,ADC3.PLL_stat]
width: 1
rw: ro
dtype: boolean
dim: 96
dim2: [3,32]
# monitor: true
read_parallel: true
- name: RCU_ADC_sync
driver: I2C_RCU
devreg: [ADC1.SYNC_control,ADC2.SYNC_control,ADC3.SYNC_control]
width: 8
rw: ro
dtype: uint8
dim: 96
dim2: [3,32]
debug: true
- name: RCU_ADC_JESD
driver: I2C_RCU
devreg: [ADC1.JESD_control1,ADC2.JESD_control1,ADC3.JESD_control1]
width: 8
rw: ro
dtype: uint8
dim: 96
dim2: [3,32]
debug: true
- name: RCU_ADC_CML_level
driver: I2C_RCU
devreg: [ADC1.CML_level,ADC2.CML_level,ADC3.CML_level]
width: 8
rw: ro
dtype: uint8
dim: 96
dim2: [3,32]
debug: true
- name: RCU_DTH_freq
description: RCU Dither source frequency (Hz). Should be around 102MHz.
driver: I2C_RCU
devreg: [DTH1.Freq,DTH2.Freq,DTH3.Freq]
width: 32
rw: rw
dtype: uint32
dim: 96
dim2: [3,32]
mask: ANT_mask
read_parallel: all
- name: RCU_DTH_PWR
description: RCU Dither source power
driver: I2C_RCU
devreg: [DTH1.PA_CONFIG,DTH2.PA_CONFIG,DTH3.PA_CONFIG]
width: 48
rw: rw
dtype: double
scale: si4012_6bytes_to_pwr
dim: 96
dim2: [3,32]
mask: ANT_mask
read_parallel: all
# debug: true
- name: RCU_DTH_on
description: RCU Dither on. Controlled by RCU_DTH_on/off
driver: I2C_RCU
devreg: [DTH1.State,DTH2.State,DTH3.State]
width: 1 #read only first of 2 bytes
bitoffset: [1,1,1]
rw: ro
dtype: boolean
dim: 96
dim2: [3,32]
mask: ANT_mask
read_parallel: all
#RCU2H points
- name: RCU_DAB_select
description: Band select ...
driver: I2C_RCU
devreg: [IO4.GPIO1,IO4.GPIO1,IO4.GPIO1]
bitoffset: [0,2,4]
width: 2
rw: rw
dtype: uint8
dim: 96
dim2: [3,32]
mask: ANT_mask
- name: RCU_firmware_version
description: git firmware version
driver: I2C_RCU
devreg: HB_UC.firmware
width: 32
rw: ro
dtype: uint32
endian: "<"
dim: 32
mask: RCU_mask
#HBAT points
- name: HBAT_BF_delay_steps
description: HBAT1 frontend delays (0.5ns steps)
driver: I2C_HBAT
devreg: [HBAT1.XY,HBAT2.XY,HBAT3.XY]
bitoffset: [2,2,2]
width: 5
rw: rw
dtype: uint8
dim: 3072
dim2: [32,96]
mask: ANT_mask
wait: PPS
# wait: 1000 #ms
- name: [RCU_IO4_GPIO1,RCU_IO4_GPIO2]
driver: I2C_RCU
devreg: [IO4.GPIO1,IO4.GPIO2]
width: 8
rw: ro
dtype: uint8
dim: 32
mask: RCU_mask
debug: True
- name: HBAT_LED_on
description: HBA frontend control
driver: I2C_HBAT
devreg: [HBAT1.XY,HBAT2.XY,HBAT3.XY]
bitoffset: 0
width: 1
rw: rw
dtype: boolean
dim: 3072
dim2: [32,96]
mask: ANT_mask
wait: 100 #ms
- name: HBAT_PWR_LNA_on
description: HBA frontend control
driver: I2C_HBAT
devreg: [HBAT1.XY,HBAT2.XY,HBAT3.XY]
bitoffset: 7
width: 1
rw: rw
dtype: boolean
dim: 3072
dim2: [32,96]
mask: ANT_mask
wait: 100 #ms
- name: HBAT_PWR_on
description: HBA frontend control
driver: I2C_HBAT
devreg: [HBAT1.XY,HBAT2.XY,HBAT3.XY]
bitoffset: 1
width: 1
rw: rw
dtype: boolean
convert_unit: bool_invert
dim: 3072
dim2: [32,96]
mask: ANT_mask
wait: 100 #ms
methods:
- name: RECVTR_Init #Called after startup to load. Should have all stored registers
driver: I2C_RCU
debug: True
instructions:
- RCU_IO1_GPIO1: Update
- RCU_IO1_GPIO2: Update
- RCU_IO2_GPIO1: Update
- RCU_IO2_GPIO2: Update
- RCU_IO3_GPIO1: Update
- RCU_IO3_GPIO2: Update
# - IO1.GPIO2: Update
# - IO2.GPIO1: Update
# - IO2.GPIO2: Update
# - IO3.GPIO1: Update
# - IO3.GPIO2: Update
- IO3.CONF1: Update
- RCU_update: 0
- RCU_ADC_locked: Update #check if not also in RCU_update
- RCU_DTH_on: Update #check if not also in RCU_update
- RCU_IO4_GPIO1: Update #should be last, as it will fail for low-band
- RCU_IO4_GPIO2: Update
- name: RCU_on
description: Initialize RCU and it in the ON state
driver: I2C_RCU
mask: RCU_mask
instructions:
- RECVTR_I2C_error: 0
- IO2.CONF1: 0x80 #Pgood on 0x80
- IO2.GPIO1: 0x4A #0x40 Dig on, 0x0a =10dB att
- IO2.GPIO2: 0x52 #0x09 #Band0 (or 0x12 or 0x24) #LED green=on=low 0x40
# - IO3.GPIO1: 0xD5 #ADC_SDIO=high, clk=low, DTH_EN=high
# - IO3.GPIO2: 0xC7 #ADC SC=high, DTH_SDA=high
- IO3.GPIO1: 0x15 #ADC_SDIO=high, clk=low, DTH_EN=low
- IO3.GPIO2: 0x47 #ADC SC=high, DTH_SDA=high
- IO1.GPIO1: 0x0A #0x0a = 10dB att
- IO1.GPIO2: 0x8A #0x80 Analog on, 0x0a=10dB att
- IO2.CONF2: 0
- IO3.CONF1: 0
- IO3.CONF2: 0
- IO3.DIR1: 0
- IO3.DIR2: 0
- IO1.CONF1: 0
- IO1.CONF2: 0
- IO4.CONF1: 0xC0 #pin 0x40, 0x80 not used
- IO4.CONF2: 0xF8
- IO4.GPIO1: 0x2A #DAB switch states: 0x2A or 0x51
- IO4.GPIO2: 0x02 #Band select
- HB_UC.waitPPS: 1 #wait for PPS
- HB_UC.VREF: 0x0C
- RCU_update: 0
# - RCU_GPIO1: Update
# - RCU_GPIO2: Update
# - RCU_attenuator: [10,10,10] #Set OPC-UA variable
# - WAIT: 500 #ms to wait
- ADC1_on: 0 #call another opc-ua method
- ADC2_on: 0
- ADC3_on: 0
# - IO3.GPIO1: 0xD5 #DTH_EN=high -> ADCs disables
# - IO3.GPIO2: 0xC7 #
- RCU_DTH_shutdown : [1,1,1]
- WAIT: 100 #ms to wait
- RCU_DTH_shutdown : [0,0,0]
# - IO3.GPIO1: 0x15 #DTH_EN=low -> ADC enabled
# - IO3.GPIO2: 0x47
- RCU_DTH_on: Update #check dither while giving ADCs some time to lock
- RCU_ADC_locked: Update #disabled for testing
- name: RCU_update
driver: I2C_RCU
mask: RCU_mask
debug: True
instructions:
- RCU_PWR_DIGITAL_on: Update #Read value and update the OPC-UA variable
- RCU_PWR_ANALOG_on: Update
- RCU_PWR_ANT_on: Update
- RCU_PCB_ID: Update
- RCU_PCB_version: Update
- RCU_PCB_number: Update
- RCU_LED_red_on: Update
- RCU_LED_green_on: Update
- RCU_attenuator_dB: Update
- RCU_band_select: Update
# - RCU_ADC_locked: Update #disabled for testing
# - RCU_ADC_sync: Update #disabled for testing
# - RCU_DTH_shutdown: Update
# - RCU_DTH_freq: Update
# - RCU_DTH_on: Update #disabled for testing
# - RCU_hband_select: Update
- RCU_DAB_select: Update
- RCU_firmware_version: Update
- RCU_IO1_GPIO1: Update #needed for debug/testing
- RCU_IO1_GPIO2: Update
- RCU_IO2_GPIO1: Update
- RCU_IO2_GPIO2: Update
- RCU_IO3_GPIO1: Update
- RCU_IO3_GPIO2: Update
- RCU_IO4_GPIO1: Update
- RCU_IO4_GPIO2: Update
- name: ADC1_on
driver: I2C_RCU
debug: True
# rw: hidden
instructions:
- ADC1.JESD_control1 : 0x14
- ADC1.SYNC_control: 1 #Setup ADCs
- ADC1.CML_level: 0x7
- ADC1.dither : 0x00
- ADC1.Update: 1 #Needed to update ADC registers
- name: ADC2_on
driver: I2C_RCU
debug: True
# rw: hidden
instructions:
- ADC2.JESD_control1 : 0x14
- ADC2.SYNC_control: 1 #Setup ADCs
- ADC2.CML_level: 0x7
- ADC2.dither : 0x00
- ADC2.Update: 1 #Needed to update ADC registers
- name: ADC3_on
driver: I2C_RCU
debug: True
# rw: hidden
instructions:
- ADC3.JESD_control1 : 0x14
- ADC3.SYNC_control: 1 #Setup ADCs
- ADC3.CML_level: 0x7
- ADC3.dither : 0x00
- ADC3.Update: 1 #Needed to update ADC registers
- name: RCU_off
description: Put RCU in low-power state
driver: I2C_RCU
mask: RCU_mask
instructions:
- RECVTR_I2C_error: 0
- RCU_PWR_ANALOG_on: 0 #Switch power off
- RCU_PWR_DIGITAL_on: 0 #Switch power off
- IO2.GPIO1: 0
- IO2.GPIO2: 0
- IO3.GPIO1: 0
- IO3.GPIO2: 0
- IO1.GPIO1: 0
- IO1.GPIO2: 0
- RCU_update: 0
#todo, also make all GPIO pins (except power enables) inputs to remove all power from devices.
# - name: RCU_HBAT_WAIT_PPS
# driver: I2C_RCU
# mask: RCU_mask
# debug: True
# instructions:
# - RCU_state: 3
# - HB_UC_update.wait_pps : 1
# - RCU_state: 1
- name: RCU_DTH_on
description: Switch dither source on
driver: I2C_RCU
mask: RCU_mask
# rw: hidden
instructions:
# - RCU_DTH_config : [0,0,0]
# - RCU_DTH_config: Update #debug
- DTH1.CONF : [0,0,0]
- DTH2.CONF : [0,0,0]
- DTH3.CONF : [0,0,0]
- DTH1.Tune : [0,0] #no tuning
- DTH2.Tune : [0,0] #no tuning
- DTH3.Tune : [0,0] #no tuning
# - RCU_DTH_tune: Update #debug
- DTH1.Start : [0,1,0,0,1]
- DTH2.Start : [0,1,0,0,1]
- DTH3.Start : [0,1,0,0,1]
- RCU_DTH_on : Update
- name: RCU_DTH_off
description: Switch dither source off
driver: I2C_RCU
mask: RCU_mask
# rw: hidden
instructions:
# - RCU_DTH_SHUTDOWN : [1,1,1]
# - WAIT: 100
# - RCU_DTH_SHUTDOWN : [0,0,0]
# - RCU_DTH_SHUTDOWN : 1
- DTH1.Stop : [0,0]
- DTH2.Stop : [0,0]
- DTH3.Stop : [0,0]
# - DTH1.State : [0,0]
# - DTH2.State : [0,0]
# - DTH3.State : [0,0]
# - RCU_DTH_on: Update
- name: RCU_DTH_restart #restart to update frequency
driver: I2C_RCU
mask: RCU_mask
debug: True
instructions:
- DTH1.Stop : [0,0]
- DTH2.Stop : [0,0]
- DTH3.Stop : [0,0]
- DTH1.Start : [0,1,0,0,1]
- DTH2.Start : [0,1,0,0,1]
- DTH3.Start : [0,1,0,0,1]
version: "1.0"
description: "1234"
name: "RECVTR"
drivers:
- name: I2C1 #TCA9548
type: i2c_switch
devreg: [0x70,0x71,0x72,0x73]
parameters: [1] #I2C port number
- name: I2C_RCU
type: i2c_array #An array of similar devices connected to an I2C switch
parent: I2C1
# parameters: [20,22,0,2, 4,6,10,12, 14,16,18,24, 26,28,30,8, 7,5,3,1, 23,21,19,13, 11,9,15,17, 31,29,27,25] #RCU lookup table
parameters: [1,0,3,2 ,4,5,32,32 ,32,32,32,32 ,32,32,32,32 ,32,32,32,32 ,32,32,32,32 ,32,32,32,32 ,32,32,32,32] #RCU lookup table
# parameters: [20,22,0,2,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32] #RCU lookup table
# parameters: [22,0,2,4,6,10,22,0,2,4,6,10,22,0,2,4,6,10,22,0,2,4,6,10,22,0,2,4,6,10,22,0]#repeat 1..7 for RCUH BF test
# 12,14,16,18,24,26,28,30,8,7,5,3,1,23,21,19,13,11,9,15,17,31,29,27,25] #RCU lookup table
I2Ccut: 35 #error count to disable I2C (14 for LTS?)
status: RECVTR_I2C_error
- name: I2Cbb1
type: i2cbitbangp #I2C bitbang via GPIO expander
devreg: [IO3.GPIO2,IO3.GPIO2,IO3.CONF2]
parameters: [5,6,6] #pins
parent: I2C_RCU
- name: I2Cbb2
type: i2cbitbangp
devreg: [IO3.GPIO2,IO3.GPIO2,IO3.CONF2]
parameters: [4,6,6]
parent: I2C_RCU
- name: I2Cbb3
type: i2cbitbangp
devreg: [IO3.GPIO2,IO3.GPIO2,IO3.CONF2]
parameters: [3,6,6]
parent: I2C_RCU
# - name: I2Cbbp
# type: i2cbitbangp
# devreg: [IO3.GPIO2,IO3.GPIO2,IO3.CONF2]
# parameters: [5,4,3,6,6,6,6,6,6]
# parent: I2C_RCU
- name: SPIbb1
type: spibitbang1 #SPI bitbang via GPIO expander: CLK, SDIO, SDIOdir,CS
devreg: [IO3.GPIO1,IO3.GPIO1,IO3.CONF1,IO3.GPIO2]
parameters: [1,0,0,0]
parent: I2C_RCU
- name: SPIbb2
type: spibitbang1
devreg: [IO3.GPIO1,IO3.GPIO1,IO3.CONF1,IO3.GPIO2]
parameters: [3,2,2,1]
parent: I2C_RCU
- name: SPIbb3
type: spibitbang1
devreg: [IO3.GPIO1,IO3.GPIO1,IO3.CONF1,IO3.GPIO2]
parameters: [5,4,4,2]
parent: I2C_RCU
#This is the I2C devices in the RCU
device_registers:
- name: IO
dim: 3
description: [IO-Expander for filter selection,IO-Expander for ON/OFF, Band, BUFx2,IO-Expander for ADC control]
address: [0x75,0x76,0x20]
device: [TCA9539,TCA9539,TCA6416]
driver: I2C1
registers:
- name: CONF1
description: Direction of port1
address: 6
store: True
- name: CONF2
description: Direction of port2
address: 7
store: True
- name: GPIO1
description: Input/Ouput port 1
address: [0,2] #Read / Write address different
store: True
- name: GPIO2
description: Input/Ouput port 2
address: [1,3]
store: True
- name: DIR1
address: 4
- name: DIR2
address: 5
- name: ROM
description: IO-Expander for filter selection
address: 0x50
driver: I2C1
registers:
- name: ID
description: Random
address: 0xfc
- name: Version
description: Set in production
address: 0
- name: Serial
address: 0x20
- name: AN
description: Monitor ADC on RCU
address: 0x74 #was 0x14 on RCU2-DIG PCBs
device: LTC2495
driver: I2C1
registers:
- name: V_1v8
address: 0xB080
- name: V_2v5
address: 0xB880
- name: V_3v3
address: 0xB180
- name: I_Ant0
address: 0xB980
- name: I_Ant1
address: 0xB280
- name: I_Ant2
address: 0xBA80
- name: V_Ant_I0
address: 0xB380
- name: V_Ant_O0
address: 0xBB80
- name: V_Ant_I1
address: 0xB480
- name: V_Ant_O1
address: 0xBC80
- name: V_Ant_I2
address: 0xB580
- name: V_Ant_O2
address: 0xBD80
- name: Temp
address: 0xA0C0
#This 'special' devices that uses I2C
- name: ADC
dim: 3
description: ADC SPI control
device: AD9683
driver: [SPIbb1,SPIbb2,SPIbb3]
registers:
- name: PLL_stat
description: PLL locked status
address: 0x0A
- name: JESD_control1
description: JESD link control
address: 0x5F
- name: SYNC_control
address: 0x3A
- name: CML_level
description: CML output adjust
address: 0x15
- name: Update
description: Global device uptate
address: 0xFF
- name: testmode
address: 0x0D
- name: dither
address: 0x0C
- name: JESDscramble
address: 0x6E
- name: PDWNmodes
address: 0x08
- name: DCcorrect
address: 0x40
- name: DTH
dim: 3
description: CW dither source
device: SI4012
driver: [I2Cbb1,I2Cbb2,I2Cbb3]
address: 0x70
registers:
- name: Freq
description: Frequency
address: [0x1240,0x1140]
- name: Property
description: Properties
address: [0x12,0x11]
- name: State
address: [0x61,0x60]
- name: Start
description: Start CW
address: [0x62,0x62]
- name: Stop
description: Stop CW
address: [0x67,0x67]
- name: Rev
address: 0x10
- name: Tune
address: [0x1221,0x1121]
- name: CONF
address: [0x1210,0x1110]
- name: PA_CONFIG
address: [0x1260,0x1160]
store: True
variables:
- name: RECVTR_monitor_rate
description: Rate at which monitored points are polled (seconds)
driver: I2C_RCU
rw: variable
dtype: uint8
- name: ANT_mask
description: Only RF chains with a true mask is set
driver: I2C_RCU
rw: variable #server RW variable, not linked to IO
dtype: boolean
dim: 96
dim2: [3,32]
- name: RCU_mask
description: Only RCUs with a true mask is set
driver: I2C_RCU
rw: variable #server RW variable, not linked to IO
dtype: boolean
dim: 32
- name: RECVTR_I2C_error
description: 0=Good, >0 communication error
driver: I2C_RCU
rw: ro #server RW variable, not linked to IO
dtype: uint8
mask: RCU_mask
dim: 32
# - name: RCU_state
# description: State of RCUs 0=unknown, 1=ready, 2=busy, 3= wait PPS, 4=error
# driver: I2C_RCU
# rw: ro #server variable, not linked to IO
# dtype: uint8
# dim: 1
- name: RECVTR_translator_busy
description: True when I2C line is busy
rw: ro #server variable, not linked to IO
dtype: boolean
dim: 1
- name: RCU_attenuator_dB
description: RCU Attenuation (dB)
driver: I2C_RCU
# devreg: [IO1.GPIO1,IO1.GPIO2,IO2.GPIO1]
devreg: [IO2.GPIO1,IO1.GPIO2,IO1.GPIO1] #first bottom
bitoffset: [0,0,0]
width: 6
rw: rw
dtype: uint8
dim: 96
dim2: [3,32]
mask: ANT_mask
- name: RCU_band_select
description: Band select 1=10MHz,2=30MHz
driver: I2C_RCU
devreg: [IO2.GPIO2,IO2.GPIO2,IO2.GPIO2]
# bitoffset: [0,2,4]
bitoffset: [4,2,0] #first on bottom
width: 2
rw: rw
dtype: uint8
dim: 96
dim2: [3,32]
mask: ANT_mask
- name: [RCU_IO1_GPIO1,RCU_IO1_GPIO2,RCU_IO2_GPIO1,RCU_IO2_GPIO2,RCU_IO3_GPIO1,RCU_IO3_GPIO2]
driver: I2C_RCU
devreg: [IO1.GPIO1,IO1.GPIO2,IO2.GPIO1,IO2.GPIO2,IO3.GPIO1,IO3.GPIO2]
width: 8
rw: ro
dtype: uint8
dim: 32
mask: RCU_mask
debug: True
- name: RCU_LED_red_on
driver: I2C_RCU
description: Red LED on front panel
devreg: IO2.GPIO2
bitoffset: 6
width: 1
rw: rw
dtype: boolean
convert_unit: bool_invert
dim: 32
mask: RCU_mask
- name: RCU_LED_green_on
driver: I2C_RCU
description: Green LED on front panel
devreg: IO2.GPIO2
bitoffset: 7
width: 1
rw: rw
dtype: boolean
convert_unit: bool_invert
dim: 32
mask: RCU_mask
- name: RCU_TEMP
description: RCU PCB Temperature (Celsius)
driver: I2C_RCU
devreg: AN.Temp
width: 23
scale: 3.827e-3 #T=DATAOUT * Vref/12.25/32. Vreg=1.5 V
convert_unit: Kelvin2Celsius
rw: ro
dtype: double
dim: 32
monitor: true
read_parallel: true
mask: RECVTR_I2C_error
- name: RCU_PWR_3V3
description: RCU 3.3V voltage (V)
driver: I2C_RCU
devreg: AN.V_3v3
width: 23
scale: 1.463e-6
rw: ro
dtype: double
dim: 32
read_parallel: true
monitor: true
mask: RECVTR_I2C_error
- name: RCU_PWR_1V8
description: RCU 1.8V voltage (V)
driver: I2C_RCU
devreg: AN.V_1v8
width: 23
scale: 7.1526e-7
rw: ro
dtype: double
dim: 32
read_parallel: true
monitor: true
mask: RECVTR_I2C_error
- name: RCU_PWR_2V5
description: RCU 2.5V voltage (V)
driver: I2C_RCU
devreg: AN.V_2v5
width: 23
scale: 7.1526e-7
rw: ro
dtype: double
dim: 32
read_parallel: true
monitor: true
mask: RECVTR_I2C_error
- name: RCU_PWR_ANT_VOUT
description: Voltage on antenna output of RCU (V). Controlled by ANT_PWR_ON.
driver: I2C_RCU
# devreg: [AN.V_Ant_O0,AN.V_Ant_O1,AN.V_Ant_O2]
devreg: [AN.V_Ant_O2,AN.V_Ant_O1,AN.V_Ant_O0] #first on bottom
width: 23
scale: 2.7895e-6
rw: ro
dtype: double
dim: 96
dim2: [3,32]
read_parallel: true
monitor: true
mask: RECVTR_I2C_error
- name: RCU_PWR_ANT_VIN
description: RCU antenna voltage before switch (V)
driver: I2C_RCU
# devreg: [AN.V_Ant_I0,AN.V_Ant_I1,AN.V_Ant_I2]
devreg: [AN.V_Ant_I2,AN.V_Ant_I1,AN.V_Ant_I0] #first on bottom
width: 23
scale: 2.7895e-6
rw: ro
dtype: double
dim: 96
dim2: [3,32]
read_parallel: true
monitor: true
mask: RECVTR_I2C_error
- name: RCU_PWR_ANT_IOUT
description: Current drawn on antenna output of RCU (A). 15mA offset due to LED on RCU
driver: I2C_RCU
devreg: [AN.I_Ant0,AN.I_Ant1,AN.I_Ant2]
width: 23
scale: 7.1526e-8
rw: ro
dtype: double
dim: 96
dim2: [3,32]
read_parallel: true
monitor: true
mask: RECVTR_I2C_error
- name: RCU_PWR_DIGITAL_on
description: RCU digital power enable. Controlled by calling RCU_on/RCU_off
driver: I2C_RCU
devreg: IO2.GPIO1
width: 1
bitoffset: 6
rw: ro #rw for testing
dtype: boolean
dim: 32
mask: RCU_mask
- name: RCU_PWR_good
description: Status of RCU power given by LDOs.
driver: I2C_RCU
devreg: IO2.GPIO1
width: 1
bitoffset: 7
rw: ro
dtype: boolean
dim: 32
monitor: true
mask: RECVTR_I2C_error
- name: RCU_PWR_ANALOG_on
description: RCU analog power enable. Controlled by RCU_on/off
driver: I2C_RCU
devreg: IO1.GPIO2
width: 1
bitoffset: 7
rw: rw #rw for testing
dtype: boolean
dim: 32
mask: RCU_mask
- name: RCU_DTH_shutdown
description: False means dither source & ADC powered on.
driver: I2C_RCU
devreg: [IO3.GPIO1,IO3.GPIO1,IO3.GPIO2]
width: 1
bitoffset: [7,6,7]
rw: ro
dtype: boolean
dim: 96
dim2: [3,32]
mask: ANT_mask
debug: True
- name: RCU_PWR_ANT_on
description: Antenna power output ON/OFF control. Monitored by Ant_VOUT.
driver: I2C_RCU
devreg: [IO1.GPIO1,IO1.GPIO1,IO1.GPIO2]
width: 1
bitoffset: [6,7,6]
rw: rw
dtype: boolean
dim: 96
dim2: [3,32]
mask: ANT_mask
- name: RCU_PCB_ID
description: Unique PCB ID
driver: I2C_RCU
devreg: ROM.ID
width: 32
rw: ro
dtype: uint32
dim: 32
mask: RCU_mask
- name: RCU_PCB_version
description: RCU version number
driver: I2C_RCU
devreg: ROM.Version
width: 0x80 #16 characters
rw: ro
dtype: string
dim: 32
mask: RCU_mask
- name: RCU_PCB_number
description: PCB number (astron.nl/webforms/IenS-Boarden/view.php?id=xxx)
driver: I2C_RCU
devreg: ROM.Serial
width: 0x80 #16 characters
rw: ro
dtype: string
dim: 32
mask: RCU_mask
- name: RCU_ADC_locked
description: RCU ADC lock status. May generated noise and polling disabled in future
driver: I2C_RCU
# devreg: [ADC1.PLL_stat,ADC2.PLL_stat,ADC3.PLL_stat]
devreg: [ADC3.PLL_stat,ADC2.PLL_stat,ADC1.PLL_stat] #first on bottom
width: 1
rw: ro
dtype: boolean
dim: 96
dim2: [3,32]
# monitor: true
read_parallel: true
- name: RCU_ADC_sync
driver: I2C_RCU
# devreg: [ADC1.SYNC_control,ADC2.SYNC_control,ADC3.SYNC_control]
devreg: [ADC3.SYNC_control,ADC2.SYNC_control,ADC1.SYNC_control] #first bottom
width: 8
rw: ro
dtype: uint8
dim: 96
dim2: [3,32]
debug: true
- name: RCU_ADC_testmode
driver: I2C_RCU
# devreg: [ADC1.testmode,ADC2.testmode,ADC3.testmode]
devreg: [ADC3.testmode,ADC2.testmode,ADC1.testmode] #first bottom
width: 8
rw: rw
dtype: uint8
dim: 96
dim2: [3,32]
# debug: true
- name: RCU_ADC_JESD
driver: I2C_RCU
# devreg: [ADC1.JESD_control1,ADC2.JESD_control1,ADC3.JESD_control1]
devreg: [ADC3.JESD_control1,ADC2.JESD_control1,ADC1.JESD_control1] #first bottom
width: 8
rw: ro
dtype: uint8
dim: 96
dim2: [3,32]
debug: true
- name: RCU_ADC_CML_level
driver: I2C_RCU
# devreg: [ADC1.CML_level,ADC2.CML_level,ADC3.CML_level]
devreg: [ADC3.CML_level,ADC2.CML_level,ADC1.CML_level] #first bottom
width: 8
rw: ro
dtype: uint8
dim: 96
dim2: [3,32]
debug: true
- name: RCU_DTH_freq
description: RCU Dither source frequency (Hz). Should be around 102MHz.
driver: I2C_RCU
devreg: [DTH1.Freq,DTH2.Freq,DTH3.Freq]
width: 32
rw: rw
dtype: uint32
dim: 96
dim2: [3,32]
mask: ANT_mask
read_parallel: all
- name: RCU_DTH_PWR
description: RCU Dither source power
driver: I2C_RCU
devreg: [DTH1.PA_CONFIG,DTH2.PA_CONFIG,DTH3.PA_CONFIG]
width: 48
rw: rw
dtype: double
scale: si4012_6bytes_to_pwr
dim: 96
dim2: [3,32]
mask: ANT_mask
read_parallel: all
# debug: true
# - name: RCU_DTH_tune
# driver: I2C_RCU
# devreg: [DTH1.Tune,DTH2.Tune,DTH3.Tune]
# width: 16
# rw: rw
# dtype: uint32
# dim: 96
# dim2: [3,32]
# mask: ANT_mask
# debug: true
# read_parallel: all
# - name: RCU_DTH_config
# driver: I2C_RCU
# devreg: [DTH1.CONF,DTH2.CONF,DTH3.CONF]
# width: 8
# rw: rw
# dtype: uint32
# dim: 96
# dim2: [3,32]
# mask: ANT_mask
# debug: true
# read_parallel: all
- name: RCU_DTH_on
description: RCU Dither on. Controlled by RCU_DTH_on/off
driver: I2C_RCU
devreg: [DTH1.State,DTH2.State,DTH3.State]
width: 1 #read only first of 2 bytes
bitoffset: [1,1,1]
rw: ro
dtype: boolean
dim: 96
dim2: [3,32]
mask: ANT_mask
read_parallel: all
# - name: RCU_DTH_Rev
# driver: I2C_RCU
# devreg: [DTH1.Rev,DTH2.Rev,DTH3.Rev]
# width: 88
# rw: rw
# dtype: uint32
# dim: 96
# dim2: [3,32]
# mask: ANT_mask
# debug: true
# read_parallel: all
methods:
- name: RECVTR_Init #Called after startup to load. Should have all stored registers
driver: I2C_RCU
debug: True
instructions:
- RCU_IO1_GPIO1: Update
- RCU_IO1_GPIO2: Update
- RCU_IO2_GPIO1: Update
- RCU_IO2_GPIO2: Update
- RCU_IO3_GPIO1: Update
- RCU_IO3_GPIO2: Update
# - IO1.GPIO2: Update
# - IO2.GPIO1: Update
# - IO2.GPIO2: Update
# - IO3.GPIO1: Update
# - IO3.GPIO2: Update
- IO3.CONF1: Update
- RCU_update: 0
- RCU_ADC_locked: Update #check if not also in RCU_update
- RCU_DTH_on: Update #check if not also in RCU_update
- name: RCU_on
description: Initialize RCU and it in the ON state
driver: I2C_RCU
mask: RCU_mask
instructions:
- RECVTR_I2C_error: 0
- IO2.CONF1: 0x80 #Pgood on 0x80
- IO2.GPIO1: 0x4A #0x40 Dig on, 0x0a =10dB att
- IO2.GPIO2: 0x55 #0x15 #Band0 (or 0x2a band 1) #LED green=on=low
- IO3.GPIO1: 0x15 #ADC_SDIO=high, clk=low, DTH_EN=low
- IO3.GPIO2: 0x47 #ADC SC=high, DTH_SDA=high, DTH_EN=low
- IO1.GPIO1: 0x0A #0x0a = 10dB att
- IO1.GPIO2: 0x8A #0x80 Analog on, 0x0a=10dB att
- IO2.CONF2: 0
- IO3.CONF1: 0
- IO3.CONF2: 0
- IO3.DIR1: 0
- IO3.DIR2: 0
- IO1.CONF1: 0
- IO1.CONF2: 0
# - RCU_GPIO1: Update
# - RCU_GPIO2: Update
# - RCU_attenuator: [10,10,10] #Set OPC-UA variable
#name="RCU_DTH_shutdown"
- RCU_update: 0
- WAIT: 500 #ms to wait
- ADC3_on: 0 #call another opc-ua method
- WAIT: 500 #ms to wait
- ADC2_on: 0
- WAIT: 500 #ms to wait
- ADC1_on: 0
- WAIT: 500 #ms to wait
#Toggle enable pin
# - IO3.GPIO1: 0xD5 #ADC_SDIO=high, clk=low, DTH_EN=high
# - IO3.GPIO2: 0xC7 #ADC SC=high, DTH_SDA=high, DTH_EN=high
# - WAIT: 100 #ms to wait #todo: test if necessary
# - IO3.GPIO1: 0x15 #enable ADC 0,1
# - IO3.GPIO2: 0x47 #enable ADC 2
# - RCU_DTH_on: Update #check dither while giving ADCs some time to lock
- WAIT: 500 #ms to wait
- RCU_ADC_locked: Update #disabled for testing
- name: RCU_update
driver: I2C_RCU
mask: RCU_mask
debug: True
instructions:
- RCU_PWR_DIGITAL_on: Update #Read value and update the OPC-UA variable
- RCU_PWR_ANALOG_on: Update
- RCU_PWR_ANT_on: Update
- RCU_PCB_ID: Update
- RCU_PCB_version: Update
- RCU_PCB_number: Update
- RCU_LED_red_on: Update
- RCU_LED_green_on: Update
- RCU_attenuator_dB: Update
- RCU_band_select: Update
- RCU_ADC_testmode: Update
# - RCU_ADC_locked: Update #disabled for testing
# - RCU_ADC_sync: Update #disabled for testing
# - RCU_DTH_shutdown: Update
# - RCU_DTH_freq: Update
# - RCU_DTH_on: Update #disabled for testing
- RCU_IO1_GPIO1: Update #needed for debug/testing
- RCU_IO1_GPIO2: Update
- RCU_IO2_GPIO1: Update
- RCU_IO2_GPIO2: Update
- RCU_IO3_GPIO1: Update
- RCU_IO3_GPIO2: Update
- name: ADC1_on
driver: I2C_RCU
debug: True
# rw: hidden
instructions:
- ADC1.JESD_control1 : 0x14
- ADC1.SYNC_control: 1 #Setup ADCs
- ADC1.CML_level: 0x7
# - ADC1.dither : 0x00
# - ADC1.testmode : 0x00 #output long PSN
- ADC1.Update: 1 #Needed to update ADC registers
- name: ADC2_on
driver: I2C_RCU
debug: True
# rw: hidden
instructions:
- ADC2.JESD_control1 : 0x14
- ADC2.SYNC_control: 1 #Setup ADCs
- ADC2.CML_level: 0x7
# - ADC2.dither : 0x00
# - ADC2.testmode : 0x00 #output long PSN
- ADC2.Update: 1 #Needed to update ADC registers
- name: ADC3_on
driver: I2C_RCU
debug: True
# rw: hidden
instructions:
- ADC3.JESD_control1 : 0x14
- ADC3.SYNC_control: 1 #Setup ADCs
- ADC3.CML_level: 0x7
# - ADC3.dither : 0x00
# - ADC3.testmode : 0x00 #output long PSN
- ADC3.Update: 1 #Needed to update ADC registers
- name: RCU_off
description: Put RCU in low-power state
driver: I2C_RCU
mask: RCU_mask
instructions:
- RECVTR_I2C_error: 0
- RCU_PWR_ANALOG_on: 0 #Switch power off
- RCU_PWR_DIGITAL_on: 0 #Switch power off
- IO2.GPIO1: 0
- IO2.GPIO2: 0
- IO3.GPIO1: 0
- IO3.GPIO2: 0
- IO1.GPIO1: 0
- IO1.GPIO2: 0
- RCU_update: 0
#todo, also make all GPIO pins (except power enables) inputs to remove all power from devices.
- name: RCU_DTH_on
description: Switch dither source on
driver: I2C_RCU
mask: RCU_mask
# rw: hidden
instructions:
# - RCU_DTH_config : [0,0,0]
# - RCU_DTH_config: Update #debug
- DTH1.CONF : [0,0,0]
- DTH2.CONF : [0,0,0]
- DTH3.CONF : [0,0,0]
- DTH1.Tune : [0,0] #no tuning
- DTH2.Tune : [0,0] #no tuning
- DTH3.Tune : [0,0] #no tuning
# - RCU_DTH_tune: Update #debug
- DTH1.Start : [0,1,0,0,1]
- DTH2.Start : [0,1,0,0,1]
- DTH3.Start : [0,1,0,0,1]
- RCU_DTH_on : Update
- name: RCU_DTH_off
description: Switch dither source off
driver: I2C_RCU
mask: RCU_mask
# rw: hidden
instructions:
# - RCU_DTH_SHUTDOWN : [1,1,1]
# - WAIT: 100
# - RCU_DTH_SHUTDOWN : [0,0,0]
# - RCU_DTH_SHUTDOWN : 1
- DTH1.Stop : [0,0]
- DTH2.Stop : [0,0]
- DTH3.Stop : [0,0]
# - DTH1.State : [0,0]
# - DTH2.State : [0,0]
# - DTH3.State : [0,0]
# - RCU_DTH_on: Update
......@@ -23,6 +23,7 @@ class i2c_array(i2c_dev):
print("enable mask",self.enablemask)
self.I2Cmask=[0]*self.N
self.disableI2ConError=self.I2Ccut>0;
self.RCUi=0
# self.devregs,RCU_storeReg=DevRegList(yaml)
# print("Init",config['name'],'len=',len(self.RCU_Switch1),' stored reg=',RCU_storeReg)
# self.previous =np.zeros([self.N,RCU_storeReg],dtype='int')
......
tmux new -s translators 'cd ~/pypcc;python3 pypcc2.py -p 4840 -c RECVTR' \; \
new-window 'cd ~/pypcc;python3 pypcc2.py -p 4843 -c CLK' \; \
detach-client
#\
# detach-client
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment