Skip to content

Commit

Permalink
Clear flash CMP bit, add new SR size (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
mokap13 authored Nov 1, 2024
1 parent 8ab94e5 commit 38ef9c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bk7231tools/serial/cmd_hl_flash.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class BK7231SerialCmdHLFlash(BK7231SerialInterface):
b"\x51\x40\x14": 1,
b"\x5E\x40\x14": 1,
b"\x85\x42\x15": 1,
b"\x85\x20\x15": 2,
b"\x85\x60\x13": 2,
b"\x85\x60\x14": 2,
b"\x85\x60\x16": 2,
Expand Down Expand Up @@ -55,7 +56,7 @@ class BK7231SerialCmdHLFlash(BK7231SerialInterface):
#
# | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
# |SRP0 | BP4 | BP3 | BP2 | BP1 | BP0 | WEL | WIP |
def flash_unprotect(self, mask: int = 0b01111100) -> None:
def flash_unprotect(self, mask: int = 0b0100000001111100) -> None:
flash_id: bytes = self.flash_read_id()["id"]
if flash_id not in self.FLASH_SR_SIZE:
raise ValueError(f"Flash ID not known: {flash_id.hex()}")
Expand Down

0 comments on commit 38ef9c9

Please sign in to comment.