--- name: CH58x Series mcu_type: 6 device_type: 0x16 support_usb: true support_serial: true support_net: false description: CH58x (RISC-V4A BLE 5.3) 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 # TODO: parse write protect address - offset: 0x08 name: USER_CFG description: User non-volatile configuration # CFG_DEBUG_EN=1、CFG_RESET_EN=0、CFG_ROM_READ=1 # Enable 2-wire debug # reset: 0xd73f0f4d # See-also: #26 reset: 0xd50fff4f # WeActStudio default type: u32 fields: - bit_range: [2, 0] name: RESERVED explaination: 0b101: Default _: Changed - 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 - 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: 0xFFF0F: Default _: Changed - bit_range: [31, 28] name: VALID_SIG description: "Configuration information valid flag, fixed value" explaination: 0b0100: Valid _: Error variants: - name: CH581 chip_id: 0x81 flash_size: 196608 # 192KB eeprom_size: 32768 eeprom_start_addr: 196608 - name: CH582 chip_id: 0x82 flash_size: 458752 # 448KB eeprom_size: 32768 eeprom_start_addr: 458752 - name: CH583 chip_id: 0x83 flash_size: 458752 eeprom_size: 557056 # 512KB eeprom_start_addr: 458752