Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove GPIOE remappings for USART4 & TIM1 on some ch32v20x chips #2

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/chips/CH32V203C6T6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cores:
- "../family/CH32V2.yaml"
- "../peripherals/FV2x_V3x_USART1.yaml"
- "../peripherals/FV2x_V3x_USART2.yaml"
- "../peripherals/FV2x_V3x_ADV_TIM1.yaml"
- "../peripherals/V1x_V2x_ADV_TIM1.yaml"
- "../peripherals/FV2x_V3x_GP16_TIM234.yaml"
- "../peripherals/FV2x_V3x_ADC1.yaml"
- "../peripherals/FV2x_V3x_ADC2.yaml"
Expand Down
4 changes: 2 additions & 2 deletions data/chips/CH32V203C8T6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ cores:
- "../peripherals/FV2x_V3x_USART1.yaml"
- "../peripherals/FV2x_V3x_USART2.yaml"
- "../peripherals/FV2x_V3x_USART3.yaml"
- "../peripherals/FV2x_V3x_USART4.yaml"
- "../peripherals/FV2x_V3x_ADV_TIM1.yaml"
- "../peripherals/V2x_USART4.yaml"
- "../peripherals/V1x_V2x_ADV_TIM1.yaml"
- "../peripherals/FV2x_V3x_GP16_TIM234.yaml"
- "../peripherals/FV2x_V3x_ADC1.yaml"
- "../peripherals/FV2x_V3x_ADC2.yaml"
Expand Down
4 changes: 2 additions & 2 deletions data/chips/CH32V203C8U6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ cores:
- "../peripherals/FV2x_V3x_USART1.yaml"
- "../peripherals/FV2x_V3x_USART2.yaml"
- "../peripherals/FV2x_V3x_USART3.yaml"
- "../peripherals/FV2x_V3x_USART4.yaml"
- "../peripherals/FV2x_V3x_ADV_TIM1.yaml"
- "../peripherals/V2x_USART4.yaml"
- "../peripherals/V1x_V2x_ADV_TIM1.yaml"
- "../peripherals/FV2x_V3x_GP16_TIM234.yaml"
- "../peripherals/FV2x_V3x_ADC1.yaml"
- "../peripherals/FV2x_V3x_ADC2.yaml"
Expand Down
2 changes: 1 addition & 1 deletion data/chips/CH32V203RBT6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ cores:
- "../peripherals/FV2x_V3x_USART1.yaml"
- "../peripherals/FV2x_V3x_USART2.yaml"
- "../peripherals/FV2x_V3x_USART3.yaml"
- "../peripherals/FV2x_V3x_USART4.yaml"
- "../peripherals/V2x_USART4.yaml"
- "../peripherals/V1x_V2x_ADV_TIM1.yaml"
- "../peripherals/FV2x_V3x_GP16_TIM234.yaml"
- "../peripherals/FV2x_V3x_GP32_TIM5.yaml"
Expand Down
2 changes: 1 addition & 1 deletion data/chips/CH32V208CBU6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cores:
- "../peripherals/FV2x_V3x_USART1.yaml"
- "../peripherals/FV2x_V3x_USART2.yaml"
- "../peripherals/FV2x_V3x_USART3.yaml"
- "../peripherals/FV2x_V3x_USART4.yaml"
- "../peripherals/V2x_USART4.yaml"
- "../peripherals/V1x_V2x_ADV_TIM1.yaml"
- "../peripherals/FV2x_V3x_GP16_TIM234.yaml"
- "../peripherals/FV2x_V3x_GP32_TIM5.yaml"
Expand Down
2 changes: 1 addition & 1 deletion data/chips/CH32V208RBT6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cores:
- "../peripherals/FV2x_V3x_USART1.yaml"
- "../peripherals/FV2x_V3x_USART2.yaml"
- "../peripherals/FV2x_V3x_USART3.yaml"
- "../peripherals/FV2x_V3x_USART4.yaml"
- "../peripherals/V2x_USART4.yaml"
- "../peripherals/V1x_V2x_ADV_TIM1.yaml"
- "../peripherals/FV2x_V3x_GP16_TIM234.yaml"
- "../peripherals/FV2x_V3x_GP32_TIM5.yaml"
Expand Down
2 changes: 1 addition & 1 deletion data/chips/CH32V208WBU6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cores:
- "../peripherals/FV2x_V3x_USART1.yaml"
- "../peripherals/FV2x_V3x_USART2.yaml"
- "../peripherals/FV2x_V3x_USART3.yaml"
- "../peripherals/FV2x_V3x_USART4.yaml"
- "../peripherals/V2x_USART4.yaml"
- "../peripherals/V1x_V2x_ADV_TIM1.yaml"
- "../peripherals/FV2x_V3x_GP16_TIM234.yaml"
- "../peripherals/FV2x_V3x_GP32_TIM5.yaml"
Expand Down
38 changes: 38 additions & 0 deletions data/peripherals/V2x_USART4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# No GPIOE

- name: USART4
address: 0x40004C00
registers:
kind: usart
version: common
block: USART
rcc:
bus_clock: PCLK1
kernel_clock: PCLK1
enable:
register: APB1PCENR
field: USART4EN
reset:
register: APB1PRSTR
field: USART4RST
interrupts:
- signal: GLOBAL
interrupt: UART4
remap:
register: PCFR2
field: USART4_RM
pins:
# 00:默认映射(TX/PC10,RX/PC11);
- pin: PC10
signal: TX
remap: 0b00
- pin: PC11
signal: RX
remap: 0b00
# 01:重映射(TX/PB0,RX/PB1);
- pin: PB0
signal: TX
remap: 0b01
- pin: PB1
signal: RX
remap: 0b01
Loading