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
b45cb368
Commit
b45cb368
authored
Jul 09, 2018
by
Denia Bouhired-Ferrag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hardware test with small modification. pts define includes adress for hw information
parent
3d62ae31
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
hwvertest.py
pts-fm/python/hwvertest.py
+4
-5
ptsdefine.py
pts-fm/python/ptsdefine.py
+1
-1
No files found.
pts-fm/python/hwvertest.py
View file @
b45cb368
...
...
@@ -63,7 +63,7 @@ def main(bus,tname,inf,log):
uses : pts.bit and hwvertest.py
"""
HWVERS
=
4.0
HWVERS
_target
=
4.0
pel
=
PTS_ERROR_LOGGER
(
inf
,
log
)
...
...
@@ -73,19 +73,18 @@ def main(bus,tname,inf,log):
# 4 MSB represent HW version number (major)
# 2 LSB represent number of execution (minor)
# Eg: value 010010 represents PCB version 4.2
hwvers
=
(
bus
.
vv_read
(
HWVERS
)
hwvers
=
bus
.
vv_read
(
HWVERS_reg
)
maj
=
int
(
hwvers
>>
HWVERS_VERS_OFS
)
min
=
float
(
hwvers
&
0x03
)
min
/=
10
hwvers
=
maj
+
min
# and now check if appropriate
if
(
hwvers
==
HWVERS
):
if
(
hwvers
==
HWVERS
_target
):
msg
=
"HW/PCB version correct:
%2.1
f
\n
"
%
(
hwvers
)
inf
.
write
(
msg
)
else
:
msg
=
"ERROR: HW/PCBe version (
%2.1
f) incorrect - expected
%2.1
f"
%
(
hwvers
,
HWVERS
)
msg
=
"ERROR: HW/PCBe version (
%2.1
f) incorrect - expected
%2.1
f"
%
(
hwvers
,
HWVERS
_target
)
pel
.
set
(
msg
)
print
"-->
%
s"
%
msg
...
...
pts-fm/python/ptsdefine.py
View file @
b45cb368
...
...
@@ -82,7 +82,7 @@ TER_ITERM_OFS = 0
TER_OTERM_OFS
=
6
# HW version register
HWVERS
=
0x10
HWVERS
_reg
=
0x10
HWVERS_EXEC_OFS
=
0
HWVERS_VERS_OFS
=
2
...
...
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