diff --git a/data/chips/CH32V203C6T6.yaml b/data/chips/CH32V203C6T6.yaml index c895b43..44e6762 100644 --- a/data/chips/CH32V203C6T6.yaml +++ b/data/chips/CH32V203C6T6.yaml @@ -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" diff --git a/data/chips/CH32V203C8T6.yaml b/data/chips/CH32V203C8T6.yaml index 42d73f0..01cdfc5 100644 --- a/data/chips/CH32V203C8T6.yaml +++ b/data/chips/CH32V203C8T6.yaml @@ -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" diff --git a/data/chips/CH32V203C8U6.yaml b/data/chips/CH32V203C8U6.yaml index 00b1702..faf3428 100644 --- a/data/chips/CH32V203C8U6.yaml +++ b/data/chips/CH32V203C8U6.yaml @@ -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" diff --git a/data/chips/CH32V203RBT6.yaml b/data/chips/CH32V203RBT6.yaml index c6ea941..4082450 100644 --- a/data/chips/CH32V203RBT6.yaml +++ b/data/chips/CH32V203RBT6.yaml @@ -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" diff --git a/data/chips/CH32V208CBU6.yaml b/data/chips/CH32V208CBU6.yaml index 5a2d66b..47a9dc1 100644 --- a/data/chips/CH32V208CBU6.yaml +++ b/data/chips/CH32V208CBU6.yaml @@ -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" diff --git a/data/chips/CH32V208RBT6.yaml b/data/chips/CH32V208RBT6.yaml index 456afa6..de16c4d 100644 --- a/data/chips/CH32V208RBT6.yaml +++ b/data/chips/CH32V208RBT6.yaml @@ -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" diff --git a/data/chips/CH32V208WBU6.yaml b/data/chips/CH32V208WBU6.yaml index e3051c6..8dccf37 100644 --- a/data/chips/CH32V208WBU6.yaml +++ b/data/chips/CH32V208WBU6.yaml @@ -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" diff --git a/data/peripherals/V2x_USART4.yaml b/data/peripherals/V2x_USART4.yaml new file mode 100644 index 0000000..ab89cfe --- /dev/null +++ b/data/peripherals/V2x_USART4.yaml @@ -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 \ No newline at end of file