Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
python_test_scripts
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
python_test_scripts
Merge requests
!6
Apsct ad9511
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Apsct ad9511
APSCT_AD9511
into
master
Overview
1
Commits
9
Pipelines
0
Changes
1
Merged
Apsct ad9511
Gijs Schoonderbeek
requested to merge
APSCT_AD9511
into
master
Mar 1, 2023
Overview
1
Commits
9
Pipelines
0
Changes
1
With this change the code is ready for APSCT rev. 3
0
0
Merge request reports
Viewing commit
2b6a92f7
Prev
Next
Show latest version
1 file
+
11
−
10
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
2b6a92f7
Update lock read-out.
· 2b6a92f7
GijsSchoonderbeek
authored
Feb 13, 2023
apsct_lib.py
+
11
−
10
View file @ 2b6a92f7
Edit in single-file editor
Open in Web IDE
Show full file
@@ -246,7 +246,6 @@ class PllClass:
#
# Read all registers on the PLL and print on screen
#
self
.
dev_i2c_pll
.
write_bytes
(
0x07
,
0x00
)
bytes_to_read
=
12
ret_value
=
self
.
read_byte_pll
(
0
,
nof_bytes
=
bytes_to_read
)
for
cnt
in
range
(
bytes_to_read
):
@@ -258,19 +257,21 @@ class PllClass:
#
# Read lock status
#
ret_value
=
self
.
read_byte_pll
(
0x00
,
nof_bytes
=
1
)
status_pll
=
int
(
ret_value
,
2
)
if
status_pll
==
0x04
:
if
(
self
.
frequency
==
'
200MHz
'
):
i2_c_io_device
=
I2C
(
0x20
,
BUSNR
=
I2CBUSNR
)
else
:
i2_c_io_device
=
I2C
(
0x21
,
BUSNR
=
I2CBUSNR
)
i2_c_io_device
.
write_bytes
(
0x06
,
0x2C
)
# '0' is output
i2_c_io_device
.
write_bytes
(
0x07
,
0x00
)
# '0' is output
ack
,
ret_value
=
i2_c_io_device_b
.
read_bytes
(
0x00
,
1
)
status_pll
=
ret_value
&
0x02
if
status_pll
==
0x02
:
self
.
lock
=
True
stri
=
f
"
PLL
{
self
.
frequency
}
is in lock
"
elif
(
status_pll
&
0x10
)
>
0
:
self
.
lock
=
False
stri
=
f
"
PLL
{
self
.
frequency
}
Not Locked --> No 10 MHz ref
"
else
:
self
.
lock
=
False
stri
=
f
"
PLL
{
self
.
frequency
}
Not locked --> PLL Error
"
if
print_on
:
print
(
stri
)
stri
=
f
"
PLL
{
self
.
frequency
}
is not locked
"
print
(
stri
)
return
self
.
lock
def
read_lol
(
self
):
Loading