-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isp checksum check not valid for CH569 #6
Comments
If I comment out the following lines, the tool works just fine for CH569: diff --git a/src/flashing.rs b/src/flashing.rs
index ab6f6dc..0c9b4cd 100644
--- a/src/flashing.rs
+++ b/src/flashing.rs
@@ -159,7 +159,8 @@ impl<T: Transport> Flashing<T> {
let isp_key = Command::isp_key(vec![0; 0x1e]);
let resp = self.transport.transfer(isp_key)?;
anyhow::ensure!(resp.is_ok(), "isp_key failed");
- anyhow::ensure!(resp.payload()[0] == key_checksum, "isp_key checksum failed");
+ println!("key_checksum: {:x?} payload checksum: {:x?}", key_checksum, resp.payload()[0]);
+ // anyhow::ensure!(resp.payload()[0] == key_checksum, "isp_key checksum failed");
const CHUNK: usize = 56;
let mut address = 0x0;
@@ -184,7 +185,7 @@ impl<T: Transport> Flashing<T> {
let isp_key = Command::isp_key(vec![0; 0x1e]);
let resp = self.transport.transfer(isp_key)?;
anyhow::ensure!(resp.is_ok(), "isp_key failed");
- anyhow::ensure!(resp.payload()[0] == key_checksum, "isp_key checksum failed");
+ //anyhow::ensure!(resp.payload()[0] == key_checksum, "isp_key checksum failed");
const CHUNK: usize = 56;
let mut address = 0x0; |
The program is flashed and verified successfully and the target resets. |
Be-careful also the flash code sector size is 256 Bytes on WCH CH56x and not 1024 Bytes like for other CH32VXXX |
This is where bvernoux added support for the newer version of the bootloader which come with CH569 . |
I just hit the same problem with a brand new CH569. $ wchisp -v flash test.bin |
For CH569, it reports isp_checksum failed,
but if I comment out those checks, the flashing works fine,
and the binary runs well.
Here is the log (with the first checksum check commented out):
The text was updated successfully, but these errors were encountered: