Skip to content

Commit

Permalink
feat: support CH32L00x series
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed Sep 30, 2023
1 parent 63837e4 commit 4b47872
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
15 changes: 15 additions & 0 deletions devices/0x21-CH32V00x.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: CH32V00x Series
mcu_type: 0x11
device_type: 0x21
support_net: false
support_usb: false
support_serial: true
description: CH32V00x (RISC-V2A) Series
config_registers:
variants:
- name: CH32V003*4*6
chip_id: 51
alt_chip_ids: [50, 49, 48]
flash_size: 16K

31 changes: 31 additions & 0 deletions devices/0x25-CH32L103.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: CH32L103 Series
mcu_type: 0x15
device_type: 0x25
support_net: false
support_usb: true
support_serial: true
description: CH32L103 (RISC-V4C) Series
config_registers:
variants:
- name: CH32L103C8U6
chip_id: 48
flash_size: 64K
- name: CH32L103C8T6
chip_id: 49
flash_size: 64K
- name: CH32L103F8P6
chip_id: 58
flash_size: 64K
- name: CH32L103G8R6
chip_id: 59
flash_size: 64K
- name: CH32L103K8U6
chip_id: 50
flash_size: 64K
- name: CH32L103F8U6
chip_id: 61
flash_size: 64K
- name: CH32L103F7P6
chip_id: 55
flash_size: 48K
4 changes: 3 additions & 1 deletion src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,12 @@ impl ChipDB {
serde_yaml::from_str(include_str!("../devices/0x17-CH32V30x.yaml"))?,
serde_yaml::from_str(include_str!("../devices/0x18-CH32F20x.yaml"))?,
serde_yaml::from_str(include_str!("../devices/0x19-CH32V20x.yaml"))?,
serde_yaml::from_str(include_str!("../devices/0x19-CH32V20x.yaml"))?,
serde_yaml::from_str(include_str!("../devices/0x20-CH32F20x-Compact.yaml"))?,
serde_yaml::from_str(include_str!("../devices/0x21-CH32V00x.yaml"))?,
serde_yaml::from_str(include_str!("../devices/0x22-CH59x.yaml"))?,
serde_yaml::from_str(include_str!("../devices/0x23-CH32X03x.yaml"))?,
serde_yaml::from_str(include_str!("../devices/0x24-CH643.yaml"))?,
serde_yaml::from_str(include_str!("../devices/0x25-CH32L103.yaml"))?,
];
for family in &families {
family.validate()?;
Expand Down

0 comments on commit 4b47872

Please sign in to comment.