Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyPCC
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
PyPCC
Commits
fde287b0
Commit
fde287b0
authored
3 years ago
by
Paulus Kruger
Browse files
Options
Downloads
Patches
Plain Diff
APSPU CRC and FAN init, UNB2 I2C setup on startup
parent
79fca3e5
No related branches found
No related tags found
No related merge requests found
Pipeline
#22538
passed
3 years ago
Stage: image
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/APSPUTR.yaml
+47
-19
47 additions, 19 deletions
config/APSPUTR.yaml
config/UNB2TR.yaml
+2
-0
2 additions, 0 deletions
config/UNB2TR.yaml
i2cserv/i2c_dev.py
+2
-1
2 additions, 1 deletion
i2cserv/i2c_dev.py
with
51 additions
and
20 deletions
config/APSPUTR.yaml
+
47
−
19
View file @
fde287b0
...
@@ -25,20 +25,48 @@ device_registers:
...
@@ -25,20 +25,48 @@ device_registers:
-
name
:
Serial
-
name
:
Serial
address
:
0x20
address
:
0x20
-
name
:
POL_LBA
address
:
0x3C
driver
:
i2c_smbus
registers
:
-
{
name
:
"
TEMP"
,
address
:
0x8D
,
crc
:
True
}
-
{
name
:
"
VIN"
,
address
:
0x88
,
crc
:
True
}
-
{
name
:
"
VOUT"
,
address
:
0x8B
,
crc
:
True
}
-
{
name
:
"
IOUT"
,
address
:
0x8C
,
crc
:
True
}
-
name
:
POL_RCU2A
address
:
0x3D
driver
:
i2c_smbus
registers
:
-
{
name
:
"
TEMP"
,
address
:
0x8D
,
crc
:
True
}
-
{
name
:
"
VIN"
,
address
:
0x88
,
crc
:
True
}
-
{
name
:
"
VOUT"
,
address
:
0x8B
,
crc
:
True
}
-
{
name
:
"
IOUT"
,
address
:
0x8C
,
crc
:
True
}
-
name
:
POL_RCU2D
address
:
0x3E
driver
:
i2c_smbus
registers
:
-
{
name
:
"
TEMP"
,
address
:
0x8D
,
crc
:
True
}
-
{
name
:
"
VIN"
,
address
:
0x88
,
crc
:
True
}
-
{
name
:
"
VOUT"
,
address
:
0x8B
,
crc
:
True
}
-
{
name
:
"
IOUT"
,
address
:
0x8C
,
crc
:
True
}
-
name
:
MAX
-
name
:
MAX
description
:
MAX6620 fan speed controller
description
:
MAX6620 fan speed controller
address
:
0x29
address
:
0x29
driver
:
I2C_PU
driver
:
I2C_PU
registers
:
registers
:
-
name
:
GLOBAL
-
{
name
:
GLOBAL
,
address
:
0x00
}
address
:
0x00
-
{
name
:
TACH1
,
address
:
0x10
}
-
name
:
TACH1
-
{
name
:
TACH2
,
address
:
0x12
}
address
:
0x10
-
{
name
:
TACH3
,
address
:
0x14
}
-
name
:
TACH2
-
{
name
:
r2
,
address
:
0x2
}
address
:
0x12
-
{
name
:
r3
,
address
:
0x3
}
-
name
:
TACH3
-
{
name
:
r4
,
address
:
0x4
}
address
:
0x14
-
{
name
:
r5
,
address
:
0x5
}
-
{
name
:
r6
,
address
:
0x6
}
-
{
name
:
r7
,
address
:
0x7
}
-
{
name
:
r8
,
address
:
0x8
}
variables
:
variables
:
...
@@ -82,10 +110,9 @@ variables:
...
@@ -82,10 +110,9 @@ variables:
rw
:
ro
rw
:
ro
dtype
:
string
dtype
:
string
-
name
:
[
APSPU_LBA_VOUT
,
APSPU_RCU2A_VOUT
,
APSPU_RCU2D_VOUT
]
-
name
:
[
APSPU_LBA_VOUT
,
APSPU_RCU2A_VOUT
,
APSPU_RCU2D_VOUT
]
driver
:
I2C_PU
driver
:
I2C_PU
devreg
:
[
0x3C.0x8B
,
0x3D.0x8B
,
0x3E.0x8B
]
devreg
:
[
POL_LBA.VOUT
,
POL_RCU2A.VOUT
,
POL_RCU2D.VOUT
]
width
:
16
width
:
16
rw
:
ro
rw
:
ro
dtype
:
double
dtype
:
double
...
@@ -95,7 +122,7 @@ variables:
...
@@ -95,7 +122,7 @@ variables:
-
name
:
[
APSPU_LBA_IOUT
,
APSPU_RCU2A_IOUT
,
APSPU_RCU2D_IOUT
]
-
name
:
[
APSPU_LBA_IOUT
,
APSPU_RCU2A_IOUT
,
APSPU_RCU2D_IOUT
]
driver
:
I2C_PU
driver
:
I2C_PU
devreg
:
[
0x3C.0x8C
,
0x3D.0x8C
,
0x3E.0x8C
]
devreg
:
[
POL_LBA.IOUT
,
POL_RCU2A.IOUT
,
POL_RCU2D.IOUT
]
width
:
16
width
:
16
rw
:
ro
rw
:
ro
dtype
:
double
dtype
:
double
...
@@ -104,7 +131,7 @@ variables:
...
@@ -104,7 +131,7 @@ variables:
-
name
:
[
APSPU_LBA_TEMP
,
APSPU_RCU2A_TEMP
,
APSPU_RCU2D_TEMP
]
-
name
:
[
APSPU_LBA_TEMP
,
APSPU_RCU2A_TEMP
,
APSPU_RCU2D_TEMP
]
driver
:
I2C_PU
driver
:
I2C_PU
devreg
:
[
0x3C.0x8D
,
0x3D.0x8D
,
0x3E.0x8D
]
devreg
:
[
POL_LBA.TEMP
,
POL_RCU2A.TEMP
,
POL_RCU2D.TEMP
]
width
:
16
width
:
16
rw
:
ro
rw
:
ro
dtype
:
double
dtype
:
double
...
@@ -131,15 +158,16 @@ methods:
...
@@ -131,15 +158,16 @@ methods:
-
APSPU_PCB_ID
:
Update
-
APSPU_PCB_ID
:
Update
-
APSPU_PCB_version
:
Update
-
APSPU_PCB_version
:
Update
-
APSPU_PCB_number
:
Update
-
APSPU_PCB_number
:
Update
-
APSPU_FAN_monitor_on
:
0
-
name
:
APSPU_FAN_monitor_on
-
name
:
APSPU_FAN_monitor_on
description
:
Setup the FAN monitor to give RPM
description
:
Setup the FAN monitor to give RPM
driver
:
I2C_PU
driver
:
I2C_PU
instructions
:
instructions
:
-
MAX.GLOBAL
:
0x02
;
#Run monitor
-
MAX.GLOBAL
:
0x02
#Run monitor
-
MAX.
0x0
2
:
0x88
;
-
MAX.
r
2
:
0x88
-
MAX.
0x0
6
:
0x80
;
# int((math.log(TACH_PERIODS{16}) / math.log(2))) << 5,
-
MAX.
r
6
:
0x80
# int((math.log(TACH_PERIODS{16}) / math.log(2))) << 5,
-
MAX.
0x0
3
:
0x88
;
-
MAX.
r
3
:
0x88
-
MAX.
0x0
7
:
0x80
;
-
MAX.
r
7
:
0x80
-
MAX.
0x0
4
:
0x88
;
-
MAX.
r
4
:
0x88
-
MAX.
0x0
8
:
0x80
;
-
MAX.
r
8
:
0x80
This diff is collapsed.
Click to expand it.
config/UNB2TR.yaml
+
2
−
0
View file @
fde287b0
...
@@ -483,9 +483,11 @@ methods:
...
@@ -483,9 +483,11 @@ methods:
debug
:
True
debug
:
True
instructions
:
instructions
:
-
UNB2TR_I2C_error
:
0
-
UNB2TR_I2C_error
:
0
-
UNB2_I2C_enabled
:
1
#Make sure I2C switches are enabled
-
UNB2_PCB_ID
:
Update
-
UNB2_PCB_ID
:
Update
-
UNB2_PCB_version
:
Update
-
UNB2_PCB_version
:
Update
-
UNB2_PCB_number
:
Update
-
UNB2_PCB_number
:
Update
# - FP_IO.CONF: 0xf8 #bit 0-2 output for LED
-
UNB2_Front_Panel_LED_colour
:
Update
-
UNB2_Front_Panel_LED_colour
:
Update
-
UNB2_PWR_on
:
Update
-
UNB2_PWR_on
:
Update
...
...
This diff is collapsed.
Click to expand it.
i2cserv/i2c_dev.py
+
2
−
1
View file @
fde287b0
...
@@ -290,7 +290,8 @@ class i2c_dev(hwdev):
...
@@ -290,7 +290,8 @@ class i2c_dev(hwdev):
callback
(
0
,[
devreg
[
'
wait
'
]],
read
=
3
)
callback
(
0
,[
devreg
[
'
wait
'
]],
read
=
3
)
if
not
(
callback
(
devreg
[
'
addr
'
],
value2
,
read
=
1
)):
return
False
;
if
not
(
callback
(
devreg
[
'
addr
'
],
value2
,
read
=
1
)):
return
False
;
else
:
else
:
if
not
(
callback
(
devreg
[
'
addr
'
],
value2
,
reg
=
reg
,
read
=
1
)):
return
False
;
rd
=
(
5
if
devreg
.
get
(
'
crc
'
)
else
1
)
if
not
(
callback
(
devreg
[
'
addr
'
],
value2
,
reg
=
reg
,
read
=
rd
)):
return
False
;
if
value2
[
0
]
is
None
:
return
False
if
value2
[
0
]
is
None
:
return
False
value
[:]
=
value2
[:];
value
[:]
=
value2
[:];
if
devreg
.
get
(
'
store
'
):
if
devreg
.
get
(
'
store
'
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment