Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL RS485 - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Conv TTL RS485 - Testing
Commits
f0b4ca7b
Commit
f0b4ca7b
authored
Nov 25, 2014
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw: Small changes in output of rs485_pulse_rtm.py
parent
8f0e37a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
rs485_pulse_rtm.py
pts/python/rs485_pulse_rtm.py
+11
-7
No files found.
pts/python/rs485_pulse_rtm.py
View file @
f0b4ca7b
...
...
@@ -19,7 +19,7 @@
## send pulses back to inputs. Externally to the RTM, there should be two boards
## containing differential multiplexers, and these are controlled by the FPGA HDL
## through this script such that each channel sends pulses back to itself, in the
## sequence O
1->I, O2->I, O3->I
.
## sequence O
ut1->In, Out2->In, Out3->In
.
##
## In short, what this script does is to turn on pulse repetition, sleep for a
## predefined amount of time, and then check that the same number of pulses that has
...
...
@@ -188,10 +188,12 @@ def main(bus, tname, inf, log):
val
=
bus
.
vv_read
(
CSR
)
val
|=
(
1
<<
CSR_TESTER_VCC_OFS
)
bus
.
vv_write
(
CSR
,
val
)
time
.
sleep
(
1
)
#---------------------------
# Test with terminations OFF
#---------------------------
inf
.
write
(
'
\n
'
)
# Read out fail-safe lines -- should now be high, since the MUXes are
# powered but not enabled
...
...
@@ -229,7 +231,7 @@ def main(bus, tname, inf, log):
time
.
sleep
(
1
)
# Generate pulses from different outputs to inputs
msg
=
"Testing channel connections (term. OFF): O
1 -> I
"
msg
=
"Testing channel connections (term. OFF): O
ut1 -> In
"
print
(
msg
)
mux_sel
(
bus
,
0x1
)
inf
.
write
(
'
\n
'
)
...
...
@@ -241,7 +243,7 @@ def main(bus, tname, inf, log):
clear_counters
(
pc
)
time
.
sleep
(
1
)
msg
=
"Testing channel connections (term. OFF): O
2 -> I
"
msg
=
"Testing channel connections (term. OFF): O
ut2 -> In
"
print
(
msg
)
mux_sel
(
bus
,
0x2
)
inf
.
write
(
'
\n
'
)
...
...
@@ -253,7 +255,7 @@ def main(bus, tname, inf, log):
clear_counters
(
pc
)
time
.
sleep
(
1
)
msg
=
"Testing channel connections (term. OFF): O
3 -> I
"
msg
=
"Testing channel connections (term. OFF): O
ut3 -> In
"
print
(
msg
)
mux_sel
(
bus
,
0x3
)
inf
.
write
(
'
\n
'
)
...
...
@@ -275,6 +277,8 @@ def main(bus, tname, inf, log):
#--------------------------
# Test with terminations ON
#--------------------------
inf
.
write
(
'
\n
'
)
# Read out fail-safe lines -- should now be high, since the MUXes are
# powered but not enabled
val
=
bus
.
vv_read
(
LSR
)
...
...
@@ -319,7 +323,7 @@ def main(bus, tname, inf, log):
time
.
sleep
(
1
)
# Generate pulses from different outputs to inputs
msg
=
"Testing channel connections (term. ON): O
1 -> I
"
msg
=
"Testing channel connections (term. ON): O
ut1 -> In
"
print
(
msg
)
mux_sel
(
bus
,
0x1
)
inf
.
write
(
'
\n
'
)
...
...
@@ -331,7 +335,7 @@ def main(bus, tname, inf, log):
clear_counters
(
pc
)
time
.
sleep
(
1
)
msg
=
"Testing channel connections (term. ON): O
2 -> I
"
msg
=
"Testing channel connections (term. ON): O
ut2 -> In
"
print
(
msg
)
mux_sel
(
bus
,
0x2
)
inf
.
write
(
'
\n
'
)
...
...
@@ -343,7 +347,7 @@ def main(bus, tname, inf, log):
clear_counters
(
pc
)
time
.
sleep
(
1
)
msg
=
"Testing channel connections (term. ON): O
3 -> I
"
msg
=
"Testing channel connections (term. ON): O
ut3 -> In
"
print
(
msg
)
mux_sel
(
bus
,
0x3
)
inf
.
write
(
'
\n
'
)
...
...
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