From 093793dfe243d5168b5fc8cc3b6c437b98636117 Mon Sep 17 00:00:00 2001 From: levizhxl <31306568+levizh@users.noreply.github.com> Date: Mon, 6 Jun 2022 09:56:05 +0800 Subject: [PATCH] HC32 configuration file revise (#6015) * fixed some configuration errors. --- .github/workflows/action.yml | 2 ++ .../board/config/dma_config.h | 20 +++++++++---------- .../board/config/uart_config.h | 10 +++++----- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 26a7920058..feabdec32c 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -181,6 +181,8 @@ jobs: - {RTT_BSP: "raspberry-pico", RTT_TOOL_CHAIN: "sourcery-arm"} - {RTT_BSP: "raspberry-pi/raspi3-32", RTT_TOOL_CHAIN: "sourcery-arm"} - {RTT_BSP: "raspberry-pi/raspi4-32", RTT_TOOL_CHAIN: "sourcery-arm"} + - {RTT_BSP: "hc32/ev_hc32f4a0_lqfp176", RTT_TOOL_CHAIN: "sourcery-arm"} + - {RTT_BSP: "hc32/ev_hc32f460_lqfp100_v2", RTT_TOOL_CHAIN: "sourcery-arm"} - {RTT_BSP: "hc32l196", RTT_TOOL_CHAIN: "sourcery-arm"} - {RTT_BSP: "tae32f5300", RTT_TOOL_CHAIN: "sourcery-arm"} - {RTT_BSP: "bluetrum/ab32vg1-ab-prougen", RTT_TOOL_CHAIN: "sourcery-riscv64-unknown-elf"} diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/board/config/dma_config.h b/bsp/hc32/ev_hc32f460_lqfp100_v2/board/config/dma_config.h index 99cbf373bc..0f6962b681 100644 --- a/bsp/hc32/ev_hc32f460_lqfp100_v2/board/config/dma_config.h +++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/board/config/dma_config.h @@ -72,6 +72,16 @@ extern "C" { #define SPI2_RX_DMA_INT_SRC INT_SRC_DMA1_TC2 #endif +#if defined(BSP_SPI4_RX_USING_DMA) && !defined(SPI4_RX_DMA_INSTANCE) +#define SPI4_RX_DMA_INSTANCE CM_DMA1 +#define SPI4_RX_DMA_CHANNEL DMA_CH2 +#define SPI4_RX_DMA_CLOCK (PWC_FCG0_DMA1 | PWC_FCG0_AOS) +#define SPI4_RX_DMA_TRIG_SELECT AOS_DMA1_2 +#define SPI4_RX_DMA_IRQn BSP_DMA1_CH2_IRQ_NUM +#define SPI4_RX_DMA_INT_PRIO BSP_DMA1_CH2_IRQ_PRIO +#define SPI4_RX_DMA_INT_SRC INT_SRC_DMA1_TC2 +#endif + /* DMA1 ch3 */ #if defined(BSP_SPI2_TX_USING_DMA) && !defined(SPI2_TX_DMA_INSTANCE) #define SPI2_TX_DMA_INSTANCE CM_DMA1 @@ -83,16 +93,6 @@ extern "C" { #define SPI2_TX_DMA_INT_SRC INT_SRC_DMA1_TC3 #endif -#if defined(BSP_SPI4_RX_USING_DMA) && !defined(SPI4_RX_DMA_INSTANCE) -#define SPI4_RX_DMA_INSTANCE CM_DMA1 -#define SPI4_RX_DMA_CHANNEL DMA_CH2 -#define SPI4_RX_DMA_CLOCK (PWC_FCG0_DMA1 | PWC_FCG0_AOS) -#define SPI4_RX_DMA_TRIG_SELECT AOS_DMA1_2 -#define SPI4_RX_DMA_IRQn BSP_DMA1_CH2_IRQ_NUM -#define SPI4_RX_DMA_INT_PRIO BSP_DMA1_CH2_IRQ_PRIO -#define SPI4_RX_DMA_INT_SRC INT_SRC_DMA1_TC2 -#endif - #if defined(BSP_SPI4_TX_USING_DMA) && !defined(SPI4_TX_DMA_INSTANCE) #define SPI4_TX_DMA_INSTANCE CM_DMA1 #define SPI4_TX_DMA_CHANNEL DMA_CH3 diff --git a/bsp/hc32/ev_hc32f4a0_lqfp176/board/config/uart_config.h b/bsp/hc32/ev_hc32f4a0_lqfp176/board/config/uart_config.h index 86d3bc24cf..a6833da72f 100644 --- a/bsp/hc32/ev_hc32f4a0_lqfp176/board/config/uart_config.h +++ b/bsp/hc32/ev_hc32f4a0_lqfp176/board/config/uart_config.h @@ -452,7 +452,7 @@ extern "C" { .int_src = INT_SRC_USART7_RTO, \ }, \ } -#endif /* UART6_RXTO_CONFIG */ +#endif /* UART7_RXTO_CONFIG */ #endif /* BSP_UART7_RX_USING_DMA */ #if defined(BSP_UART7_TX_USING_DMA) @@ -463,7 +463,7 @@ extern "C" { { \ .irq_num = BSP_UART7_TX_CPLT_IRQ_NUM, \ .irq_prio = BSP_UART7_TX_CPLT_IRQ_PRIO, \ - .int_src = INT_SRC_USART6_TCI, \ + .int_src = INT_SRC_USART7_TCI, \ }, \ } #endif /* UART7_TX_CPLT_CONFIG */ @@ -556,19 +556,19 @@ extern "C" { { \ .irq_num = BSP_UART10_RXERR_IRQ_NUM, \ .irq_prio = BSP_UART10_RXERR_IRQ_PRIO, \ - .int_src = INT_SRC_USART7_EI, \ + .int_src = INT_SRC_USART10_EI, \ }, \ .rx_irq.irq_config = \ { \ .irq_num = BSP_UART10_RX_IRQ_NUM, \ .irq_prio = BSP_UART10_RX_IRQ_PRIO, \ - .int_src = INT_SRC_USART7_RI, \ + .int_src = INT_SRC_USART10_RI, \ }, \ .tx_irq.irq_config = \ { \ .irq_num = BSP_UART10_TX_IRQ_NUM, \ .irq_prio = BSP_UART10_TX_IRQ_PRIO, \ - .int_src = INT_SRC_USART7_TI, \ + .int_src = INT_SRC_USART10_TI, \ }, \ } #endif /* UART10_CONFIG */