MarsTechHAN / ch552tool

An open sourced python tool for flashing WCH CH55x series USB microcontroller with bootloader v2.30, v2.31 & v2.40.
GNU General Public License v3.0
158 stars 24 forks source link

CH32V203C8T6 working #30

Open arsonoff opened 1 year ago

arsonoff commented 1 year ago

Chip CH32V203C8T6 (board nanoCH32V203 or CH32V203EVT):

$  python3 -m ch55xtool -v -p
Chip ID: 31 is not known = not supported
Welcome to report this issue with a screen shot from the official CH5xx tool.

31 - hexadecimal value, is not clear at once.

Added to the typeall.wcfg:

[CH32V203C8T6]
McuType=9
MaxFlashSize=65536
MaxEepromSize=0
IsNetworkDown=0
IsUsbDown=1
IsSerialDown=1
chipid=49
eepromStartAddr=0
Introduction = ""

flash/verify_flash/print configuration - working !

McuType has to correspond to bMCULine from WCHISPTool?

Why CH32V307 in typeall.wcfg has only one point? According to WCHISPTool CH32V307 has three different chipid:

    CH32V307WCU6 - 115
    CH32V307VCT6 - 112
    CH32V307RCT6 - 113
arsonoff commented 1 year ago

There are a couple of nuances: 1) flash-image has to be multiple 32 bytes, otherwise add with bytes of x0. 2) MCU should not be in the Protect mode. Such mode is activated by official tools (WCHISPTool (Win), WCHISPTool_CMD (linux))