Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
openMMC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
openMMC
Commits
57882881
Commit
57882881
authored
Mar 01, 2016
by
Henrique Silva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment Board ID byte array construction
Insert comments in-line to ease future changes
parent
519632a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
21 deletions
+31
-21
board_version.c
modules/board_version.c
+31
-21
No files found.
modules/board_version.c
View file @
57882881
...
...
@@ -154,27 +154,36 @@ void board_discover( void )
#ifdef WRITE_ID_EEPROM
uint8_t
unlock
[
2
]
=
{
0x09
,
0x00
};
/* Carrier type (1-byte):
* 01h: artix based (AFC)
* 02h: kintex based (AFCK)
* ....
Board version (1-byte):
* 00h: AFCv1
* 01h: AFCv2
* 02h: AFCv3
* 03h: AFCv3.1
Manufacturer Private Enterprise Numbers assigned by IANA (3-bytes big-endian)
* 00h 9Ah 65h (39525): Creotech
* .....
Manufacturing day since 1996-01-01 (2-bytes big-endian)
* 1Bh 1Ch (6940) : 2015-01-01
Checksum (1-byte) */
uint8_t
ee_write
[
9
]
=
{
0xF0
,
0x01
,
0x03
,
0x00
,
0x9A
,
0x65
,
0x1B
,
0x1C
,
0x00
};
uint8_t
ee_write
[
9
]
=
{
/* Reserved (EEPROM starting Address */
0xF0
,
/* Carrier type (1-byte):
* 01h: artix based (AFC)
* 02h: kintex based (AFCK)
* .... */
0x01
,
/* Board version (1-byte):
* 00h: AFCv1
* 01h: AFCv2
* 02h: AFCv3
* 03h: AFCv3.1 */
0x03
,
/* Manufacturer Private Enterprise Numbers assigned by IANA (3-bytes big-endian)
* 00h 9Ah 65h (39525): Creotech
* ..... */
0x00
,
0x9A
,
0x65
,
/* Manufacturing day since 1996-01-01 (2-bytes big-endian)
* 1Bh 1Ch (6940) : 2015-01-01 */
0x1B
,
0x1C
,
/* Checksum (1-byte) */
0x00
};
/* Calculate checksum */
ee_write
[
8
]
=
calculate_chksum
(
&
ee_write
[
1
],
8
);
/* Unlock protected EEPROM */
...
...
@@ -182,6 +191,7 @@ void board_discover( void )
xI2CMasterWrite
(
I2C1
,
0x6F
,
unlock
,
2
);
unlock
[
1
]
=
0xAA
;
xI2CMasterWrite
(
I2C1
,
0x6F
,
unlock
,
2
);
/* Write data */
xI2CMasterWrite
(
I2C1
,
0x57
,
ee_write
,
sizeof
(
ee_write
));
#endif
...
...
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