From 982d5eee9022834f1b62b3f9abbded7171556a8e Mon Sep 17 00:00:00 2001 From: Dmitry Makarin Date: Mon, 28 Oct 2024 12:51:18 +0300 Subject: [PATCH] add cmp zero init and new flash chip --- bk7231tools/serial/cmd_hl_flash.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bk7231tools/serial/cmd_hl_flash.py b/bk7231tools/serial/cmd_hl_flash.py index 1e6c322..71a1c21 100644 --- a/bk7231tools/serial/cmd_hl_flash.py +++ b/bk7231tools/serial/cmd_hl_flash.py @@ -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, @@ -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()}")