Skip to content

Commit

Permalink
wip: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed Apr 27, 2024
1 parent 7f87a24 commit b86e447
Show file tree
Hide file tree
Showing 13 changed files with 93 additions and 1,240 deletions.
15 changes: 6 additions & 9 deletions data/chips/CH32L103C8T6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,12 @@ docs:
url: https://www.wch.cn/products/CH32L103.html
cores:
- name: qingke-v4c
peripherals:

interrupts:
- name: WWDG
number: 1
dma_channels:
- name: DMA1_CH1
dma: DMA1
channel: 0
peripherals: []
include_peripherals:
- "../family/CH32L1.yaml"
include_dma_channels:
DMA1: "../dma/CH32V_V4C_L1.yaml"
include_interrupts: "../interrupts/ch32l1.yaml"
_raw:
IIC: "2"
TRNG: ""
Expand Down
14 changes: 6 additions & 8 deletions data/chips/CH32L103F7P6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ docs:
url: https://www.wch.cn/products/CH32L103.html
cores:
- name: qingke-v4c
peripherals:
peripherals: []
include_peripherals:
- "../family/CH32L1.yaml"
include_dma_channels:
DMA1: "../dma/CH32V_V4C_L1.yaml"
include_interrupts: "../interrupts/ch32l1.yaml"

interrupts:
- name: WWDG
number: 1
dma_channels:
- name: DMA1_CH1
dma: DMA1
channel: 0
_raw:
GPIO: "16"
ADC: 1/9
Expand Down
14 changes: 6 additions & 8 deletions data/chips/CH32L103F8P6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ docs:
url: https://www.wch.cn/products/CH32L103.html
cores:
- name: qingke-v4c
peripherals:
peripherals: []
include_peripherals:
- "../family/CH32L1.yaml"
include_dma_channels:
DMA1: "../dma/CH32V_V4C_L1.yaml"
include_interrupts: "../interrupts/ch32l1.yaml"

interrupts:
- name: WWDG
number: 1
dma_channels:
- name: DMA1_CH1
dma: DMA1
channel: 0
_raw:
UART: "4"
USB_20: H/D
Expand Down
14 changes: 6 additions & 8 deletions data/chips/CH32L103F8U6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ docs:
url: https://www.wch.cn/products/CH32L103.html
cores:
- name: qingke-v4c
peripherals:
peripherals: []
include_peripherals:
- "../family/CH32L1.yaml"
include_dma_channels:
DMA1: "../dma/CH32V_V4C_L1.yaml"
include_interrupts: "../interrupts/ch32l1.yaml"

interrupts:
- name: WWDG
number: 1
dma_channels:
- name: DMA1_CH1
dma: DMA1
channel: 0
_raw:
Package: QFN20
SPI: 2/-
Expand Down
14 changes: 6 additions & 8 deletions data/chips/CH32L103G8R6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ docs:
url: https://www.wch.cn/products/CH32L103.html
cores:
- name: qingke-v4c
peripherals:
peripherals: []
include_peripherals:
- "../family/CH32L1.yaml"
include_dma_channels:
DMA1: "../dma/CH32V_V4C_L1.yaml"
include_interrupts: "../interrupts/ch32l1.yaml"

interrupts:
- name: WWDG
number: 1
dma_channels:
- name: DMA1_CH1
dma: DMA1
channel: 0
_raw:
Flash: 64K
SRAM: 20K
Expand Down
14 changes: 6 additions & 8 deletions data/chips/CH32L103K8U6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ docs:
url: https://www.wch.cn/products/CH32L103.html
cores:
- name: qingke-v4c
peripherals:
peripherals: []
include_peripherals:
- "../family/CH32L1.yaml"
include_dma_channels:
DMA1: "../dma/CH32V_V4C_L1.yaml"
include_interrupts: "../interrupts/ch32l1.yaml"

interrupts:
- name: WWDG
number: 1
dma_channels:
- name: DMA1_CH1
dma: DMA1
channel: 0
_raw:
USB_20: H/D
OPA: "1"
Expand Down
56 changes: 56 additions & 0 deletions data/dma/CH32V_V4C_L1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
ADC1: 1
SPI1_RX: 2
SPI1_TX: 3

SPI2_RX: 4
SPI2_TX: 5

USART1_TX: 4
USART1_RX: 5

USART2_RX: 6
USART2_TX: 7

USART3_TX: 2
USART3_RX: 3

USART4_TX: 1
USART4_RX: 8

I2C1_TX: 6
I2C1_RX: 7

I2C2_TX: 4
I2C2_RX: 5

TIM1_CH1: 2
TIM1_CH2: 3
TIM1_CH4: 4
TIM1_TRIG: 4
TIM1_COM: 4
TIM1_UP: 5
TIM1_CH3: 6

TIM2_CH3: 1
TIM2_UP: 2
TIM2_CH1: 5
TIM2_CH2: 7
TIM2_CH4: 8 # FIXME: This is not the same as other V4C?

TIM3_CH3: 2
TIM3_CH4: 3
TIM3_UP: 3
TIM3_CH1: 6
TIM3_TRIG: 6

TIM4_CH1: 1
TIM4_CH2: 4
TIM4_CH3: 5
TIM4_UP: 7
# NO TIM5
# TIM5_CH2: 1
# TIM5_CH3: 3
# TIM5_CH4: 6
# TIM5_CH1: 7
# TIM5_TRIG: 7
# TIM5_UP: 8
1 change: 1 addition & 0 deletions data/family/CH32L1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TODO
44 changes: 0 additions & 44 deletions data/family/CH32V0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,6 @@
interrupt: TIM1_TRG_COM
- signal: BRK
interrupt: TIM1_BRK
dma_channels:
- signal: CH1
channel: DMA1_CH2
- signal: CH2
channel: DMA1_CH3
- signal: CH3
channel: DMA1_CH6
- signal: CH4
channel: DMA1_CH4
- signal: TRIG
channel: DMA1_CH4
- signal: COM
channel: DMA1_CH4
- signal: UP
channel: DMA1_CH5
pins:
# 00:默认映射(ETR/PC5,CH1/PD2,CH2/PA1, CH3/PC3 , CH4/PC4 , BKIN/PC2 , CH1N/PD0 , CH2N/PA2,CH3N/PD1);
- pin: PC5
Expand Down Expand Up @@ -280,17 +265,6 @@
interrupts:
- signal: GLOBAL
interrupt: TIM2
dma_channels:
- signal: CH1
channel: DMA1_CH5
- signal: CH2
channel: DMA1_CH7
- signal: CH3
channel: DMA1_CH1
- signal: CH4
channel: DMA1_CH7
- signal: UP
channel: DMA1_CH2
pins:
# 00 : 默 认 映 射 (CH1/ETR/PD4 , CH2/PD3 , CH3/PC0,CH4/PD7);
- pin: PD4
Expand Down Expand Up @@ -378,11 +352,6 @@
interrupts:
- signal: GLOBAL
interrupt: USART1
dma_channels:
- signal: TX
channel: DMA1_CH4
- signal: RX
channel: DMA1_CH5
pins:
# 00 : 默 认 映 射 (CK/PD4 , TX/PD5 , RX/PD6 , CTS/PD3,RTS/PC2)
- pin: PD4
Expand Down Expand Up @@ -494,11 +463,6 @@
interrupt: I2C1_EV
- signal: ER
interrupt: I2C1_ER
dma_channels:
- signal: TX
channel: DMA1_CH6
- signal: RX
channel: DMA1_CH7

- name: SPI1
address: 0x40013000
Expand Down Expand Up @@ -548,11 +512,6 @@
interrupts:
- signal: GLOBAL
interrupt: SPI1
dma_channels:
- signal: TX
channel: DMA1_CH3
- signal: RX
channel: DMA1_CH2

- name: ADC1
address: 0x40012400
Expand Down Expand Up @@ -589,9 +548,6 @@
interrupts:
- signal: GLOBAL
interrupt: ADC
dma_channels:
- signal: GLOBAL
channel: DMA1_CH1

# Fake peripheral
- name: OPA
Expand Down
43 changes: 0 additions & 43 deletions data/family/CH32X0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,6 @@
interrupts:
- signal: GLOBAL
interrupt: USART1
dma_channels:
- signal: TX
dmamux: "DMAMUX1"
request: 4
- signal: RX
dmamux: "DMAMUX1"
request: 5

- name: USART2
address: 0x40004400
Expand Down Expand Up @@ -235,13 +228,6 @@
interrupts:
- signal: GLOBAL
interrupt: USART2
dma_channels:
- signal: TX
dmamux: "DMAMUX1"
request: 7
- signal: RX
dmamux: "DMAMUX1"
request: 6

- name: USART3
address: 0x40004800
Expand Down Expand Up @@ -283,13 +269,6 @@
interrupts:
- signal: GLOBAL
interrupt: USART3
dma_channels:
- signal: TX
dmamux: "DMAMUX1"
request: 2
- signal: RX
dmamux: "DMAMUX1"
request: 3

- name: USART4
address: 0x40004C00
Expand Down Expand Up @@ -349,13 +328,6 @@
interrupts:
- signal: GLOBAL
interrupt: USART4
dma_channels:
- signal: TX
dmamux: "DMAMUX1"
request: 1
- signal: RX
dmamux: "DMAMUX1"
request: 8

- name: SPI1
address: 0x40013000
Expand Down Expand Up @@ -428,13 +400,6 @@
interrupts:
- signal: GLOBAL
interrupt: SPI1
dma_channels:
- signal: RX
dmamux: "DMAMUX1"
request: 2
- signal: TX
dmamux: "DMAMUX1"
request: 3

# ADC1, renamed from ADC
# - has ADC_DIV
Expand Down Expand Up @@ -490,10 +455,6 @@
interrupts:
- signal: GLOBAL
interrupt: ADC1
dma_channels:
- signal: ADC
dmamux: "DMAMUX1"
request: 1

# Timers, 16-bit
# - ADTM: TIM1, TIM2
Expand Down Expand Up @@ -568,8 +529,6 @@
interrupt: TIM1_TRG_COM
- signal: CC
interrupt: TIM1_CC
dma_channels:
# TODO

- name: TIM2
address: 0x40000000
Expand Down Expand Up @@ -671,8 +630,6 @@
interrupt: TIM2_TRG_COM
- signal: CC
interrupt: TIM2_CC
dma_channels:
# TODO

- name: TIM3
address: 0x40000400
Expand Down
13 changes: 0 additions & 13 deletions data/peripherals/FV2x_V3x_GP32_TIM5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,3 @@
interrupts:
- signal: GLOBAL
interrupt: TIM5
dma_channels:
- signal: CH1
channel: DMA1_CH7
- signal: CH2
channel: DMA1_CH1
- signal: CH3
channel: DMA1_CH3
- signal: CH4
channel: DMA1_CH6
- signal: UP
channel: DMA1_CH8
- signal: TRIG
channel: DMA1_CH7
Loading

0 comments on commit b86e447

Please sign in to comment.