--- name: CH57x Series mcu_type: 3 device_type: 0x13 support_usb: true support_serial: true support_net: false # CH571/CH573: RISC-V3A # Others: Cortext-M0 description: CH57x (Cortex-M0/RISC-V3A BLE 4.2) Series # The following applies to CH573. It seems the same as CH58x. config_registers_ch571_ch573: &config_registers_ch571_ch573 - 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 # Table 2.3 in Chip Datasheet - offset: 0x08 name: USER_CFG description: User config register # reset: 0x4FFF0F4D # CFG_DEBUG_EN=1、CFG_RESET_EN=0、CFG_ROM_READ=1 # enable 2-wire debug 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: 0xFFF0F: Default _: Error - bit_range: [31, 28] name: VALID_SIG description: "Configuration information valid flag, fixed value" explaination: 0b0100: Valid _: Error config_registers_ch579: &config_registers_ch579 - 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: 0x50FFFF48 type: u32 fields: - bit_range: [2, 0] name: RESERVED explaination: 0b000: 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: 0xFFFF: Default _: Error - bit_range: [31, 28] name: VALID_SIG description: "Configuration information valid flag, fixed value" explaination: 0b0101: Valid _: Error variants: # Boot pin for CH571F: PB22(Default) PB11 # Boot pin for CH571D: PB7(Default) PB11 # CH571K: No boot pin - name: CH571 chip_id: 0x71 flash_size: 196608 eeprom_size: 32768 eeprom_start_addr: 196608 config_registers: *config_registers_ch571_ch573 - name: CH573 chip_id: 0x73 flash_size: 458752 eeprom_size: 32768 eeprom_start_addr: 458752 config_registers: *config_registers_ch571_ch573 - name: CH577 chip_id: 0x77 flash_size: 131072 eeprom_size: 2048 eeprom_start_addr: 131072 - name: CH578 chip_id: 0x58 flash_size: 163840 eeprom_size: 2048 eeprom_start_addr: 163840 - name: CH579 chip_id: 0x79 flash_size: 256000 eeprom_size: 2048 eeprom_start_addr: 256000 config_registers: *config_registers_ch579