Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
euro-adc-65m-14b-40cha-gw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
eurocard
euro-adc-65m-14b-40cha
euro-adc-65m-14b-40cha-gw
Commits
0716e1a9
Commit
0716e1a9
authored
Aug 31, 2017
by
Dave Newbold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding SI5345 register dump script
parent
25b684f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
Si5345_status.py
projects/64ch/software/Si5345_status.py
+22
-0
No files found.
projects/64ch/software/Si5345_status.py
0 → 100755
View file @
0716e1a9
#!/usr/bin/python
import
uhal
import
time
import
sys
from
I2CuHal
import
I2CCore
from
si5344
import
si5344
uhal
.
setLogLevelTo
(
uhal
.
LogLevel
.
ERROR
)
hw
=
uhal
.
getDevice
(
"board"
,
"ipbusudp-2.0://192.168.235.50:50001"
,
"file://addrtab/top.xml"
)
hw
.
getNode
(
"csr.ctrl.soft_rst"
)
.
write
(
1
)
# Reset ipbus registers
hw
.
dispatch
()
hw
.
getNode
(
"csr.ctrl.io_sel"
)
.
write
(
9
)
# Talk via CPLD to Si5345
clock_I2C
=
I2CCore
(
hw
,
10
,
5
,
"io.i2c"
,
None
)
zeClock
=
si5344
(
clock_I2C
)
res
=
zeClock
.
getDeviceVersion
()
for
ipage
in
range
(
10
):
zeClock
.
setPage
(
0
,
True
)
for
ireg
in
range
(
0x100
):
print
hex
(
ipage
),
hex
(
ireg
),
hex
(
zeClock
.
readRegister
(
ireg
,
1
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment