Skip to content
GitLab
Explore
Sign in
Register
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
PyPCC
Commits
6403c0c4
Commit
6403c0c4
authored
2 years ago
by
Paulus Kruger
Browse files
Options
Downloads
Patches
Plain Diff
RCU2L 32 startup delay
parent
ca6023eb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#49598
passed
2 years ago
Stage: run
Stage: image
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
pypcc/config/RECVTR_LB.yaml
+34
-13
34 additions, 13 deletions
pypcc/config/RECVTR_LB.yaml
pypcc/i2cserv/i2c_array.py
+2
-1
2 additions, 1 deletion
pypcc/i2cserv/i2c_array.py
scripts/get_all_apspu.py
+11
-0
11 additions, 0 deletions
scripts/get_all_apspu.py
with
47 additions
and
14 deletions
pypcc/config/RECVTR_LB.yaml
+
34
−
13
View file @
6403c0c4
...
...
@@ -393,10 +393,11 @@ variables:
devreg
:
IO2.GPIO1
width
:
1
bitoffset
:
6
rw
:
r
o
#rw for testing
rw
:
r
w
#rw for testing
dtype
:
boolean
dim
:
32
mask
:
RCU_mask
# wait: 1
-
name
:
RCU_PWR_good
description
:
Status of RCU power given by LDOs.
...
...
@@ -420,6 +421,7 @@ variables:
dtype
:
boolean
dim
:
32
mask
:
RCU_mask
# wait: 1
-
name
:
RCU_DTH_shutdown
description
:
False means dither source powered on.
...
...
@@ -637,46 +639,62 @@ methods:
instructions
:
-
RECVTR_I2C_error
:
0
-
RCU_PCB_version
:
Update
-
IO2.CONF1
:
0x80
#Pgood on 0x80
#Start with all off
-
IO2.GPIO1
:
0x00
#default is 1, so should be cleared before making output
-
IO2.CONF1
:
0x80
#
-
IO1.GPIO2
:
0x00
#
-
IO1.CONF2
:
0
#
#Put ADC in shutdown mode for powerup
# - IO3.GPIO1: 0x7D #0111 1101 ADC_SDIO=high, clk=low, DTH_EN=low
#Power on
-
RCU_PWR_DIGITAL_on
:
1
#switch on with delay
-
RCU_PWR_ANALOG_on
:
1
#switch on with delay
#Set registers to default values
-
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.GPIO1
:
0x15
#
0001 0101
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
# - IO1.POL1: 0
# - IO1.POL2: 0
# - IO2.POL1: 0
# - IO2.POL2: 0
-
IO2.CONF2
:
0
-
IO1.CONF1
:
0
-
IO3.POL2
:
0
-
IO3.POL1
:
0
-
IO3.CONF1
:
0
-
IO3.CONF2
:
0
-
IO3.POL1
:
0
-
IO3.POL2
:
0
-
IO1.CONF1
:
0
-
IO1.CONF2
:
0
# - RCU_GPIO1: Update
#
- RCU_GPIO2: 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
#
- WAIT: 500 #ms to wait
-
ADC1_on
:
0
#call another opc-ua method
# - WAIT: 1000 #ms to wait
-
ADC2_on
:
0
# - WAIT: 1000 #ms to wait
-
ADC3_on
:
0
#
- WAIT:
5
00 #ms to wait
-
WAIT
:
1
00
#ms to wait
#Toggle enable pin
-
RCU_ADC_shutdown
:
[
1
,
1
,
1
]
# - 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
-
RCU_PWR_3V3
:
Update
-
RCU_ADC_shutdown
:
[
1
,
1
,
0
]
-
WAIT
:
100
#ms to wait
-
RCU_ADC_shutdown
:
[
1
,
0
,
0
]
-
WAIT
:
100
#ms to wait
-
RCU_ADC_shutdown
:
[
0
,
0
,
0
]
# - 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
#
- RCU_DTH_on: Update #check dither while giving ADCs some time to lock
# - WAIT: 500 #ms to wait
-
RCU_PWR_1V8
:
Update
-
RCU_PWR_2V5
:
Update
-
RCU_ADC_locked
:
Update
#disabled for testing
-
name
:
RCU_update
...
...
@@ -756,6 +774,9 @@ methods:
-
IO1.GPIO2
:
0
-
RCU_update
:
0
#todo, also make all GPIO pins (except power enables) inputs to remove all power from devices.
-
RCU_PWR_1V8
:
Update
-
RCU_PWR_2V5
:
Update
-
RCU_PWR_3V3
:
Update
-
name
:
RCU_DTH_on
description
:
Switch dither source on
...
...
This diff is collapsed.
Click to expand it.
pypcc/i2cserv/i2c_array.py
+
2
−
1
View file @
6403c0c4
...
...
@@ -4,7 +4,7 @@ from .spibitbang1 import spibitbang1
from
pypcc.queuetypes
import
*
from
.hwdev
import
hwdev
from
.i2c_dev
import
*
from
time
import
sleep
class
i2c_array
(
i2c_dev
):
def
__init__
(
self
,
config
):
...
...
@@ -115,6 +115,7 @@ class i2c_array(i2c_dev):
self
.
SetSwitch
(
RCUi
);
self
.
RCUi
=
RCUi
;
res
=
self
.
SetVarValue
(
devreg
,
width
,
bitoffset
,
data
[
i0
:
i1
])
if
var1
.
get
(
'
wait
'
,
0
)
>
0
:
sleep
(
var1
[
'
wait
'
]
/
1000
)
if
not
(
res
):
if
self
.
disableI2ConError
:
self
.
I2Cmask
[
RCUi
]
+=
1
;
if
self
.
I2Cmask
[
RCUi
]
>
self
.
I2Ccut
:
mask
[
RCUi
*
Step
+
Vari
]
=
False
;
...
...
This diff is collapsed.
Click to expand it.
scripts/get_all_apspu.py
0 → 100644
+
11
−
0
View file @
6403c0c4
from
test_common
import
*
from
time
import
sleep
connect
(
"
opc.tcp://localhost:4842/
"
)
names
=
get_all_variables
()
for
name
in
names
:
att
=
get_value
(
name
)
print
(
name
,
'
=
'
,
att
)
disconnect
();
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment