Skip to content

Commit

Permalink
Add readout of configuration flash UID.
Browse files Browse the repository at this point in the history
  • Loading branch information
martinling committed Mar 12, 2024
1 parent 579353f commit e670d08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dependencies/apollo
Submodule apollo updated 1 files
+19 −0 apollo_fpga/ecp5.py
3 changes: 3 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,9 @@ def test_flash_id(apollo, expected_mfg, expected_part):
programmer = apollo.create_jtag_programmer(jtag)
with task("Reading flash ID"):
mfg, part = programmer.read_flash_id()
with task("Reading flash UID"):
uid = programmer.read_flash_uid()
item(f"Flash UID is {info(f'0x{uid:08X}')}")
with task(f"Checking manufacturer ID is {info(f'0x{expected_mfg:02X}')}"):
if mfg != expected_mfg:
raise ValueError(f"Wrong flash chip manufacturer ID: 0x{mfg:02X}")
Expand Down

0 comments on commit e670d08

Please sign in to comment.