--- name: CH59x Series mcu_type: 0x12 device_type: 0x22 support_usb: true support_serial: true support_net: false description: CH59x (RISC-V4C BLE 5.4) Series config_registers: - offset: 0x00 name: RESERVED description: Reserved 32-bit word reset: 0xFFFFFFFF type: u32 - offset: 0x04 name: WPROTECT reset: 0xFFFFFFFF type: u32 fields: - bit_range: [0, 0] name: NO_KEY_SERIAL_DOWNLOAD description: Turn on No-key serial port download explaination: 1: Enable 0: Disable - bit_range: [1, 1] name: DOWNLOAD_CFG explaination: 1: PB22(Default set) 0: PB11 - offset: 0x08 name: USER_CFG description: User config register reset: 0x4FFF0FD5 type: u32 fields: - bit_range: [2, 0] name: RESERVED explaination: 0b101: Default _: Error - bit_range: [3, 3] name: CFG_RESET_EN description: "RST# external manual reset input pin enable" explaination: 0: Disable 1: Enable - bit_range: [4, 4] name: CFG_DEBUG_EN description: "Two-wire simulation debug interface SWD enable" explaination: 0: Disable 1: Enable - bit_range: [5, 5] name: RESERVED explaination: 0: Default _: Error - bit_range: [6, 6] name: CFG_BOOT_EN description: "Bootloader enable" explaination: 0: Disable 1: Enable - bit_range: [7, 7] name: CFG_ROM_READ description: "Code and data protection mode in FlashROM" explaination: 0: Disable the programmer to read out, and keep the program secret 1: Read enable - bit_range: [27, 8] name: RESERVED explaination: 0xFF0F: Default _: Error - bit_range: [31, 28] name: VALID_SIG description: "Configuration information valid flag, fixed value" explaination: 0b0100: Valid _: Error variants: - name: CH591 chip_id: 0x91 # 145 flash_size: 196608 eeprom_size: 32768 - name: CH592 chip_id: 0x92 # 146 flash_size: 458752 eeprom_size: 32768