Commit c3205308 authored by Denia Bouhired-Ferrag's avatar Denia Bouhired-Ferrag

Bug fix: hardware version register address and offset were incorrect. Fix should…

Bug fix: hardware version register address and offset were incorrect. Fix should allow now for reading of correct address on pts
parent f59bbb92
...@@ -63,7 +63,7 @@ def main(bus,tname,inf,log): ...@@ -63,7 +63,7 @@ def main(bus,tname,inf,log):
uses : pts.bit and hwvertest.py uses : pts.bit and hwvertest.py
""" """
HWVERS_target = 0.0 HWVERS_target = 4.0
pel = PTS_ERROR_LOGGER(inf,log) pel = PTS_ERROR_LOGGER(inf,log)
...@@ -73,8 +73,8 @@ def main(bus,tname,inf,log): ...@@ -73,8 +73,8 @@ def main(bus,tname,inf,log):
# 4 MSB represent HW version number (major) # 4 MSB represent HW version number (major)
# 2 LSB represent number of execution (minor) # 2 LSB represent number of execution (minor)
# Eg: value 010010 represents PCB version 4.2 # Eg: value 010010 represents PCB version 4.2
hwvers = bus.vv_read(HWVERS_reg) hwvers = (bus.vv_read(TER) & 0x3F0000) >> TER_HWVERS_OFS
maj = int(hwvers >> HWVERS_VERS_OFS) maj = int(hwvers >> 2)
min = float(hwvers & 0x03) min = float(hwvers & 0x03)
min /= 10 min /= 10
hwvers = maj + min hwvers = maj + min
......
...@@ -80,11 +80,7 @@ LSR_REARFS_OFS = 26 ...@@ -80,11 +80,7 @@ LSR_REARFS_OFS = 26
TER = 0x00c TER = 0x00c
TER_ITERM_OFS = 0 TER_ITERM_OFS = 0
TER_OTERM_OFS = 6 TER_OTERM_OFS = 6
TER_HWVERS_OFS = 16
# HW version register
HWVERS_reg = 0x10
HWVERS_EXEC_OFS = 0
HWVERS_VERS_OFS = 2
# 1-Wire base address, used in therm_id.py # 1-Wire base address, used in therm_id.py
TEMP_1WIRE_BASE = 0x010 TEMP_1WIRE_BASE = 0x010
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment