hydrausb3 / wch-ch56x-isp

Simple WCH MCU tool to flash over usb (compatible with WCH CH569 & CH565)
12 stars 6 forks source link
ch565 ch569 hydrausb3-v1 in-system-programming isp libusb linux multi-platform open-source risc-v risc-v3a tool usb windows

wch-ch56x-isp

wch-ch56x-isp is a small utility to program WCH micro-controllers. This utility is a rewrite in C of the rust tool wchisp based on https://github.com/jmaselbas/wch-isp. This utility support only WCH CH569W & CH565.

Contributor shall check CODING_STYLE.md

MounRiver Studio or MounRiver Studio Community project settings to generate bin file for CH56x...

Driver installation for Windows

How to build wch-ch56x-isp

How to use wch-ch56x-isp

CH56x Flash RAMX/ROM size

With the new version v0.3 or more the flash is automatically set depending on flash file size to set internally flash32k, flash64k or flash96k

CH56x Debug mode

Example WCH569 config with debug enabled/on:

wch-ch56x-isp -c
...
config after isp_init() nv=0xCFFFF245
[4] RESET_EN 0: disabled
[5] DEBUG_EN 1: enabled
[6] BOOT_EN 1: enabled
[7] CODE_READ_EN 1: enabled
[29] LOCKUP_RST_EN 0: disabled
[31:30] USER_MEM 0x02: RAMX 96KB + ROM 32KB
config before isp_fini() nv=0xCFFFF245
...

Example WCH569 config with debug disabled/off:

wch-ch56x-isp -c
...
config after isp_init() nv=0x8FFFF245
[4] RESET_EN 0: disabled
[5] DEBUG_EN 0: disabled
[6] BOOT_EN 1: enabled
[7] CODE_READ_EN 0: disabled
[29] LOCKUP_RST_EN 0: disabled
[31:30] USER_MEM 0x02: RAMX 96KB + ROM 32KB
...

Warning: After any change to CH56x Debug mode old binary previously flashed will not run correctly, so it is mandatory to flash the program again with a binary like in example How to use wch-ch56x-isp