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
Commits
0ef795d4
"SAS/ResourceAssignment/git@git.astron.nl:ro/lofar.git" did not exist on "8a23f33dbce33e7c99217430b7c131994fefcf66"
Commit
0ef795d4
authored
2 months ago
by
Paulus Kruger
Browse files
Options
Downloads
Patches
Plain Diff
fix bug in AHBAFE analog trigger
parent
500c8b33
No related branches found
No related tags found
No related merge requests found
Pipeline
#108940
passed
2 months ago
Stage: run
Stage: image
Changes
3
Pipelines
5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pypcc/config/RECVTR_HB.yaml
+12
-0
12 additions, 0 deletions
pypcc/config/RECVTR_HB.yaml
pypcc/i2cserv/hba2.py
+1
-1
1 addition, 1 deletion
pypcc/i2cserv/hba2.py
scripts/AHBAT_test.py
+11
-5
11 additions, 5 deletions
scripts/AHBAT_test.py
with
24 additions
and
6 deletions
pypcc/config/RECVTR_HB.yaml
+
12
−
0
View file @
0ef795d4
...
...
@@ -198,6 +198,7 @@ device_registers:
-
{
name
:
PCB_version
,
address
:
0x24
}
-
{
name
:
PCB_number
,
address
:
0x32
}
-
{
name
:
ADC
,
address
:
0x50
}
-
{
name
:
Vref
,
address
:
0x1c
}
-
name
:
ADC
dim
:
3
...
...
@@ -905,6 +906,17 @@ variables:
dim
:
96
dim2
:
[
3
,
32
]
-
name
:
AHBAT_Vref
description
:
0..16
driver
:
I2C_AHBAT
devreg
:
[
AHBAT1.Vref
,
AHBAT2.Vref
,
AHBAT3.Vref
]
width
:
8
rw
:
rw
dtype
:
uint8
dim
:
96
dim2
:
[
1
,
96
]
mask
:
AHBAT_mask
wait
:
700
#ms
methods
:
-
name
:
RECVTR_Init
#Called after startup to load. Should have all stored registers
...
...
This diff is collapsed.
Click to expand it.
pypcc/i2cserv/hba2.py
+
1
−
1
View file @
0ef795d4
...
...
@@ -43,7 +43,7 @@ class hba2(hwdev):
# logging.warning("SetHba2 not implemented")
logging
.
info
(
"
setHba2 addr=0x%x reg=0x%x len=%i
"
,
addr
,
reg
,
len
(
data
))
I2Ccallback
=
self
.
conf
[
'
parentcls
'
].
i2csetget
if
not
(
I2Ccallback
(
addr
,[
reg
,
1
,
data
[
0
]],
reg
=
0x0e
)):
return
False
;
if
not
(
I2Ccallback
(
addr
,[
reg
,
2
,
data
[
0
]],
reg
=
0x0e
)):
return
False
;
#only len=2 (BF) implemented
return
True
def
gethba
(
self
,
addr
,
reg
,
data
):
...
...
This diff is collapsed.
Click to expand it.
scripts/AHBAT_test.py
+
11
−
5
View file @
0ef795d4
...
...
@@ -16,11 +16,13 @@ setAntmask([RCU],AntMask)
wait_not_busy
(
busy
,
timeout_sec
=
4
)
#val,tp=get_value_type(name+"_R")
#set_value("HBAT_PWR_on_RW",[False]*(32*96))
#set_value("HBAT_PWR_LNA_on_RW",[False]*(32*96))
if
False
:
print
(
"
LEDs on
"
)
print
(
"
LEDs & PWR on
"
)
set_value
(
"
HBAT_PWR_on_RW
"
,[
True
]
*
(
32
*
96
))
set_value
(
"
HBAT_PWR_LNA_on_RW
"
,[
True
]
*
(
32
*
96
))
set_value
(
"
HBAT_LED_on_RW
"
,[
True
]
*
(
32
*
96
))
val
,
tp
=
get_value_type
(
"
HBAT_BF_delay_steps_R
"
)
set_value
(
"
HBAT_BF_delay_steps_RW
"
,
val
,
tp
)
wait_not_busy
(
busy
,
timeout_sec
=
4
)
setAntmask
([
RCU
],
AntMask
,
name
=
"
AHBAT_mask_RW
"
)
...
...
@@ -28,7 +30,11 @@ wait_not_busy(busy,timeout_sec=4)
sinr
=
1
if
True
:
if
False
:
set_value
(
"
AHBAT_Vref_RW
"
,[
0x04
]
*
96
)
wait_not_busy
(
busy
,
timeout_sec
=
4
)
if
False
:
print
(
"
Configuration:
"
)
callmethod
(
"
AHBAT_update
"
)
wait_not_busy
(
busy
,
timeout_sec
=
8
)
...
...
@@ -56,7 +62,7 @@ if True:
uid
=
get_value
(
"
AHBAT_ADC_R
"
)[
16
*
sinr
:
16
*
(
sinr
+
1
)]
for
cnt
,
val
in
enumerate
(
uid
):
print
(
'
%2i %6i %6i %6i %6i
'
%
(
cnt
+
1
,
val
&
0xfff
,(
val
>>
16
)
&
0xfff
,(
val
>>
32
)
&
0xfff
,(
val
>>
48
)
&
0xfff
))
print
(
'
%2i %6i %6i %6i
%6i
%6i
'
%
(
cnt
+
1
,
val
&
0xfff
f
,(
val
>>
16
)
&
0xfff
f
,(
val
>>
32
)
&
0xfff
f
,(
val
>>
48
)
&
0xfff
f
,((
val
>>
16
)
&
0xffff
)
-
((
val
)
&
0xffff
)
))
# print("ADC",['%016x'%x for x in uid])
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