Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyPCC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
PyPCC
Merge requests
!13
Pypcc RCU2LQM
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Pypcc RCU2LQM
pypcc_despi2
into
master
Overview
0
Commits
2
Pipelines
0
Changes
7
Merged
Paulus Kruger
requested to merge
pypcc_despi2
into
master
3 years ago
Overview
0
Commits
2
Pipelines
0
Changes
7
Expand
RCU2L QM M&C points and I2C bitbang added
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
f68e99ac
2 commits,
3 years ago
7 files
+
1041
−
126
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
Search (e.g. *.vue) (Ctrl+P)
config/RCUL.yaml
0 → 100644
+
537
−
0
Options
version
:
"
1.0"
description
:
"
1234"
drivers
:
-
name
:
I2C1
#TCA9548
type
:
i2c_switch
devreg
:
[
0x70
]
#0x70 / 0x00=disabled
parameters
:
[
1
]
#I2C port number
-
name
:
I2C_RCU
type
:
i2c_array
#An array of similar devices connected to an I2C switch
parent
:
I2C1
parameters
:
[
0
,
31
]
#start,number of RCUs
status
:
RCU_I2C_STATUS
-
name
:
I2Cbb1
type
:
i2cbitbang1
#I2C bitbang via GPIO expander
devreg
:
[
IO3.GPIO2
,
IO3.GPIO2
,
IO3.CONF2
]
parameters
:
[
5
,
6
,
6
]
#pins
parent
:
I2C_RCU
-
name
:
I2Cbb2
type
:
i2cbitbang1
devreg
:
[
IO3.GPIO2
,
IO3.GPIO2
,
IO3.CONF2
]
parameters
:
[
4
,
6
,
6
]
parent
:
I2C_RCU
-
name
:
I2Cbb3
type
:
i2cbitbang1
devreg
:
[
IO3.GPIO2
,
IO3.GPIO2
,
IO3.CONF2
]
parameters
:
[
3
,
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
:
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
:
AN
description
:
Monitor ADC on RCU
address
:
0x74
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
:
ID
description
:
Device ID
address
:
0
-
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
:
Offset
address
:
0x10
-
name
:
Update
description
:
Global device uptate
address
:
0xFF
-
name
:
DTH
dim
:
3
description
:
CW dither source
device
:
SI4012
driver
:
[
I2Cbb1
,
I2Cbb1
,
I2Cbb1
]
address
:
0x70
registers
:
-
name
:
Freq
description
:
Frequency
address
:
[
0x1240
,
0x1140
]
-
name
:
Property
description
:
Properties
address
:
[
0x12
,
0x11
]
-
name
:
Start
description
:
Start CW
address
:
[
0x62
,
0x62
]
-
name
:
Stop
description
:
Stop CW
address
:
[
0x67
,
0x67
]
-
name
:
Rev
address
:
0x10
variables
:
-
name
:
Ant_mask
description
:
Only masked RF chains are updated
driver
:
I2C_RCU
rw
:
variable
#server RW variable, not linked to IO
dtype
:
boolean
dim
:
96
-
name
:
RCU_mask
description
:
Only masked RCUs are updated
driver
:
I2C_RCU
rw
:
variable
#server RW variable, not linked to IO
dtype
:
boolean
dim
:
32
-
name
:
RCU_I2C_STATUS
description
:
0=Good, 1=No communication, 2=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
:
RCU_translator_busy
description
:
False when idle
rw
:
ro
#server variable, not linked to IO
dtype
:
boolean
dim
:
1
-
name
:
RCU_attenuator
description
:
Attenuator before ADC
driver
:
I2C_RCU
devreg
:
[
IO1.GPIO1
,
IO1.GPIO2
,
IO2.GPIO1
]
bitoffset
:
[
0
,
0
,
0
]
width
:
5
rw
:
rw
dtype
:
uint8
dim
:
96
mask
:
Ant_mask
-
name
:
RCU_band
description
:
Band select switch 1=10MHz,2=30MHz
driver
:
I2C_RCU
devreg
:
[
IO2.GPIO2
,
IO2.GPIO2
,
IO2.GPIO2
]
bitoffset
:
[
0
,
2
,
4
]
width
:
2
rw
:
rw
dtype
:
uint8
dim
:
96
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_LED0
driver
:
I2C_RCU
description
:
LED on RCU
devreg
:
IO2.GPIO2
bitoffset
:
6
width
:
1
rw
:
rw
dtype
:
boolean
dim
:
32
mask
:
RCU_mask
-
name
:
RCU_LED1
driver
:
I2C_RCU
description
:
LED on RCU
devreg
:
IO2.GPIO2
bitoffset
:
7
width
:
1
rw
:
rw
dtype
:
boolean
dim
:
32
mask
:
RCU_mask
-
name
:
RCU_temperature
description
:
Temperature sensor on RCU
driver
:
I2C_RCU
devreg
:
AN.Temp
width
:
23
scale
:
3.8265e-3
rw
:
ro
dtype
:
double
dim
:
32
monitor
:
true
mask
:
RCU_I2C_STATUS
-
name
:
RCU_3V3
driver
:
I2C_RCU
devreg
:
AN.V_3v3
width
:
23
scale
:
1.463e-6
rw
:
ro
dtype
:
double
dim
:
32
# monitor: true
mask
:
RCU_I2C_STATUS
-
name
:
RCU_1V8
driver
:
I2C_RCU
devreg
:
AN.V_1v8
width
:
23
scale
:
7.1526e-7
rw
:
ro
dtype
:
double
dim
:
32
# monitor: true
mask
:
RCU_I2C_STATUS
-
name
:
RCU_2V5
driver
:
I2C_RCU
devreg
:
AN.V_2v5
width
:
23
scale
:
7.1526e-7
rw
:
ro
dtype
:
double
dim
:
32
# monitor: true
mask
:
RCU_I2C_STATUS
-
name
:
ANT_Vout
driver
:
I2C_RCU
devreg
:
[
AN.V_Ant_O0
,
AN.V_Ant_O1
,
AN.V_Ant_O2
]
width
:
23
scale
:
2.7895e-6
rw
:
ro
dtype
:
double
dim
:
96
mask
:
Ant_mask
-
name
:
ANT_Vin
driver
:
I2C_RCU
devreg
:
[
AN.V_Ant_I0
,
AN.V_Ant_I1
,
AN.V_Ant_I2
]
width
:
23
scale
:
2.7895e-6
rw
:
ro
dtype
:
double
dim
:
96
mask
:
Ant_mask
-
name
:
ANT_I
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
mask
:
Ant_mask
-
name
:
RCU_Pwr_dig
description
:
Enable LDOs
driver
:
I2C_RCU
devreg
:
IO2.GPIO1
width
:
1
bitoffset
:
6
rw
:
ro
dtype
:
boolean
dim
:
32
mask
:
RCU_mask
-
name
:
RCU_ID
description
:
Unique RCU ID
driver
:
I2C_RCU
devreg
:
ROM.ID
width
:
32
rw
:
ro
dtype
:
uint32
dim
:
32
mask
:
RCU_mask
-
name
:
RCU_version
description
:
RCU version number
driver
:
I2C_RCU
devreg
:
ROM.Version
width
:
80
#10 characters
rw
:
ro
dtype
:
string
dim
:
32
mask
:
RCU_mask
-
name
:
RCU_ADC_lock
description
:
0x81=locked
driver
:
I2C_RCU
devreg
:
[
ADC1.PLL_stat
,
ADC2.PLL_stat
,
ADC3.PLL_stat
]
width
:
8
rw
:
ro
dtype
:
uint8
dim
:
96
monitor
:
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
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
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
debug
:
true
-
name
:
RCU_DTH_freq
driver
:
I2C_RCU
devreg
:
[
DTH1.Freq
,
DTH2.Freq
,
DTH3.Freq
]
width
:
32
rw
:
rw
dtype
:
uint32
dim
:
96
mask
:
Ant_mask
-
name
:
RCU_DTH_Rev
driver
:
I2C_RCU
devreg
:
[
DTH1.Rev
,
DTH2.Rev
,
DTH3.Rev
]
width
:
88
rw
:
rw
dtype
:
uint32
dim
:
96
mask
:
Ant_mask
methods
:
-
name
:
RCU_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
-
name
:
RCU_SETUP_IO1
driver
:
I2C_RCU
mask
:
RCU_mask
rw
:
hidden
instructions
:
-
IO2.CONF1
:
0
#Set device register, can also specify a register adress direction e.g. OIO2.0: 0
-
IO2.GPIO1
:
0x4A
-
IO2.GPIO2
:
0x55
-
IO1.GPIO1
:
0xCA
-
IO1.GPIO2
:
0xCA
-
IO2.CONF2
:
0
-
IO1.CONF1
:
0
-
IO1.CONF2
:
0
-
name
:
RCU_on
driver
:
I2C_RCU
mask
:
RCU_mask
instructions
:
-
RCU_I2C_STATUS
:
0
-
RCU_SETUP_IO1
:
0
-
IO3.GPIO1
:
0x15
-
IO3.GPIO2
:
0x47
-
IO3.CONF1
:
0
-
IO3.CONF2
:
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
-
WAIT
:
500
#ms to wait
-
RCU_update
:
0
-
name
:
RCU_update
driver
:
I2C_RCU
mask
:
RCU_mask
debug
:
True
instructions
:
-
RCU_Pwr_dig
:
Update
#Read value and update the OPC-UA variable
-
RCU_ID
:
Update
-
RCU_version
:
Update
-
RCU_LED0
:
Update
-
RCU_attenuator
:
Update
-
RCU_band
:
Update
-
RCU_ADC_lock
:
Update
-
RCU_ADC_sync
:
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.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.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.Update
:
1
#Needed to update ADC registers
-
name
:
RCU_off
driver
:
I2C_RCU
mask
:
RCU_mask
instructions
:
-
RCU_I2C_STATUS
:
0
-
RCU_Pwr_dig
:
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.
Loading