Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
FMC ADC 100M 14b 4cha - Testing
Commits
f8a6afef
Commit
f8a6afef
authored
Dec 07, 2012
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test23: Erase eeprom before writing the new content.
parent
052d64d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
test23.py
test/fmcadc100m14b4cha/python/test23.py
+11
-4
No files found.
test/fmcadc100m14b4cha/python/test23.py
View file @
f8a6afef
...
...
@@ -106,6 +106,7 @@ def main (default_directory='.'):
calibr_data
.
append
(
0xFF
&
int
(
line
,
16
))
calibr_data
.
append
(
0xFF
&
(
int
(
line
,
16
)
>>
8
))
f_calibr
.
close
()
#print "Raw calibration data:"
#for data in calibr_data:
# print "0x%02X" % (data)
...
...
@@ -143,7 +144,7 @@ def main (default_directory='.'):
eeprom_data
=
open
(
EEPROM_BIN_FILENAME
,
"rb"
)
.
read
()
mfg_date
=
ipmi_get_mfg_date
(
eeprom_data
)
# No manufacturi
i
ng date present in EEPROM, put the current date
# No manufacturing date present in EEPROM, put the current date
if
(
mfg_date
==
0
):
print
"No manufacturing date found in the EEPROM, taking current date:
%
d"
%
current_date
mfg_date
=
current_date
...
...
@@ -203,9 +204,9 @@ def main (default_directory='.'):
byte
=
f_ipmi
.
read
(
1
)
# reads one byte
f_ipmi
.
close
()
#print "Raw
EEPROM
data:"
#for
data in ipmi_data
:
# print "0x%02X
" % (
data)
#print "Raw
IPMI
data:"
#for
add, data in enumerate(ipmi_data)
:
# print "0x%02X
(%3d): 0x%02X" % (add, add,
data)
#==================================================
# Generate eeprom image with gensdbfs
...
...
@@ -221,6 +222,12 @@ def main (default_directory='.'):
byte
=
f_bin_eeprom
.
read
(
1
)
# reads one byte
f_bin_eeprom
.
close
()
#==================================================
# Erase EEPROM content
print
"Erase EEPROM content.
\n
"
eeprom_data
=
[
0x0
]
*
EEPROM_SIZE
fmc
.
sys_i2c_eeprom_write
(
eeprom_data
)
#==================================================
# Write content to EEPROM via I2C
print
"Write EEPROM content.
\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