diff --git a/README.md b/README.md
index b0da16d..ae0a97f 100644
--- a/README.md
+++ b/README.md
@@ -9,22 +9,16 @@
## [简介](https://github.com/SoCXin/HC32F005/wiki)
-[HC32F005](http://www.ti.com.cn/product/cn/HC32F005) 为Low Pin宽电压工作范围的MCU,12位1Msps采样SARADC内置运放
+[HC32F005](https://github.com/SoCXin/HC32F005) 为Low Pin宽电压工作范围的MCU,12位1Msps采样SARADC内置运放
[](https://www.hdsc.com.cn/Category83-1433)
-#### 关键特性
+### 关键特性
* 宽电压1.8~5.5V
* 集成6位DAC和可编程基准输入的2路电压比较器VC
-#### 封装规格
-
-* TSSOP20
-* SOP20
-* QFN20
-* QFN24
### [资源收录](https://github.com/SoCXin)
@@ -36,4 +30,11 @@
[HC32F003](https://github.com/SoCXin/HC32F005),[HC32F005](https://github.com/SoCXin/HC32F005),[HC32L110](https://github.com/SoCXin/HC32L110) 规格类似,HC32L110 拥有 RTC 外设
-### [探索芯世界 www.SoC.xin](http://www.SoC.Xin)
+
+* TSSOP20
+* SOP20
+* QFN20
+* QFN24
+[](https://www.hdsc.com.cn/Category83-1433)
+[](https://www.hdsc.com.cn/Category83-1433)
+### [探索芯世界 www.SoC.xin](http://www.SoC.Xin)
diff --git a/docs/test.jpg b/docs/test.jpg
new file mode 100644
index 0000000..49911f0
Binary files /dev/null and b/docs/test.jpg differ
diff --git a/docs/test.png b/docs/test.png
new file mode 100644
index 0000000..5f50035
Binary files /dev/null and b/docs/test.png differ
diff --git a/src/gcc_template/src/main.c b/src/gcc_template/src/main.c
index f2ce2a9..dd55fa9 100644
--- a/src/gcc_template/src/main.c
+++ b/src/gcc_template/src/main.c
@@ -6,14 +6,30 @@
#include "HC32F005.h"
#include "task.h"
+static void App_LedInit(void)
+{
+ stc_gpio_cfg_t stcGpioCfg;
+ ///< 打开GPIO外设时钟门控
+ Sysctrl_SetPeripheralGate(SysctrlPeripheralGpio, TRUE);
+ stcGpioCfg.enDir = GpioDirOut;
+ stcGpioCfg.enPu = GpioPuDisable;
+ stcGpioCfg.enPd = GpioPdEnable;
+ Gpio_WriteOutputIO(GpioPort0, GpioPin3, FALSE);
+ Gpio_Init(GpioPort0, GpioPin3, &stcGpioCfg);
+}
+
void idle_task(void *param) {
while (1) {
__asm volatile("nop");
- vTaskDelay(1000);
+ vTaskDelay(500);
+ Gpio_WriteOutputIO(GpioPort0, GpioPin3, FALSE);
+ vTaskDelay(500);
+ Gpio_WriteOutputIO(GpioPort0, GpioPin3, TRUE);
}
}
int main(void) {
+ App_LedInit();
xTaskCreate(idle_task, "idle_task", configMINIMAL_STACK_SIZE, 0, 0, 0);
vTaskStartScheduler();
}
diff --git a/src/gcc_template/src/system_hc32f005.c b/src/gcc_template/src/system_hc32f005.c
index 2a1e191..15c46ed 100644
--- a/src/gcc_template/src/system_hc32f005.c
+++ b/src/gcc_template/src/system_hc32f005.c
@@ -63,8 +63,7 @@ uint32_t SystemCoreClock;
void SystemInit(void) {
sysctl_rch_config(RCH_TRIM_4M);
sysctl_rch_enable();
- while (!sysctl_rch_stable())
- ;
+ while (!sysctl_rch_stable());
sysctl_system_clock_config(SYS_CLK_SRC_RCH);
SystemCoreClock = 4000000;
sysctl_hclk_config(HCLK_SYS_CLK_DIV_1);
diff --git a/src/hc32f005_ddl/example/generaltimer/gt_cnt/MDK/gt_cnt.uvprojx b/src/hc32f005_ddl/example/generaltimer/gt_cnt/MDK/gt_cnt.uvprojx
index d32c6ec..d3f816c 100644
--- a/src/hc32f005_ddl/example/generaltimer/gt_cnt/MDK/gt_cnt.uvprojx
+++ b/src/hc32f005_ddl/example/generaltimer/gt_cnt/MDK/gt_cnt.uvprojx
@@ -10,13 +10,13 @@
gt_cnt_Release
0x4
ARM-ADS
- 6100001::V6.10.1::.\ARMCLANG
+ 6160000::V6.16::ARMCLANG
1
ARMCM0P
ARM
- ARM.CMSIS.5.4.0
+ ARM.CMSIS.5.7.0
http://www.keil.com/pack/
IROM(0x00000000,0x8000) IRAM(0x20000000,0x1000) CPUTYPE("Cortex-M0+") CLOCK(32000000) ESEL ELITTLE
@@ -185,6 +185,7 @@
0
0
0
+ 0
0
0
8
@@ -351,7 +352,7 @@
0
0
0
- 0
+ 4
@@ -423,15 +424,20 @@
..\..\..\..\driver\src\sysctrl.c
-bt.c
-1..\..\..\..\driver\src\bt.c
-
-lpm.c
-1..\..\..\..\driver\src\lpm.c
-
-gpio.c
-1..\..\..\..\driver\src\gpio.c
-
+ bt.c
+ 1
+ ..\..\..\..\driver\src\bt.c
+
+
+ lpm.c
+ 1
+ ..\..\..\..\driver\src\lpm.c
+
+
+ gpio.c
+ 1
+ ..\..\..\..\driver\src\gpio.c
+
diff --git a/src/hc32f005_ddl/example/gpio/gpio_interrupt/MDK/gpio_interrupt.uvprojx b/src/hc32f005_ddl/example/gpio/gpio_interrupt/MDK/gpio_interrupt.uvprojx
index 733ab80..2096c8d 100644
--- a/src/hc32f005_ddl/example/gpio/gpio_interrupt/MDK/gpio_interrupt.uvprojx
+++ b/src/hc32f005_ddl/example/gpio/gpio_interrupt/MDK/gpio_interrupt.uvprojx
@@ -16,7 +16,7 @@
ARMCM0P
ARM
- ARM.CMSIS.5.4.0
+ ARM.CMSIS.5.7.0
http://www.keil.com/pack/
IROM(0x00000000,0x8000) IRAM(0x20000000,0x1000) CPUTYPE("Cortex-M0+") CLOCK(32000000) ESEL ELITTLE
@@ -185,6 +185,7 @@
0
0
0
+ 0
0
0
8
@@ -351,7 +352,7 @@
0
0
0
- 0
+ 4
@@ -423,9 +424,10 @@
..\..\..\..\driver\src\sysctrl.c
-gpio.c
-1..\..\..\..\driver\src\gpio.c
-
+ gpio.c
+ 1
+ ..\..\..\..\driver\src\gpio.c
+
diff --git a/src/hc32f005_ddl/example/template/template/EWARM/startup_hc32f005.s b/src/hc32f005_ddl/example/template/template/EWARM/startup_hc32f005.s
deleted file mode 100644
index d60d45d..0000000
--- a/src/hc32f005_ddl/example/template/template/EWARM/startup_hc32f005.s
+++ /dev/null
@@ -1,310 +0,0 @@
-;*******************************************************************************
-; Copyright (C) 2019, Huada Semiconductor Co.,Ltd All rights reserved.
-;
-; This software is owned and published by:
-; Huada Semiconductor Co.,Ltd ("HDSC").
-;
-; BY DOWNLOADING, INSTALLING OR USING THIS SOFTWARE, YOU AGREE TO BE BOUND
-; BY ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT.
-;
-; This software contains source code for use with HDSC
-; components. This software is licensed by HDSC to be adapted only
-; for use in systems utilizing HDSC components. HDSC shall not be
-; responsible for misuse or illegal use of this software for devices not
-; supported herein. HDSC is providing this software "AS IS" and will
-; not be responsible for issues arising from incorrect user implementation
-; of the software.
-;
-; Disclaimer:
-; HDSC MAKES NO WARRANTY, EXPRESS OR IMPLIED, ARISING BY LAW OR OTHERWISE,
-; REGARDING THE SOFTWARE (INCLUDING ANY ACOOMPANYING WRITTEN MATERIALS),
-; ITS PERFORMANCE OR SUITABILITY FOR YOUR INTENDED USE, INCLUDING,
-; WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY, THE IMPLIED
-; WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE OR USE, AND THE IMPLIED
-; WARRANTY OF NONINFRINGEMENT.
-; HDSC SHALL HAVE NO LIABILITY (WHETHER IN CONTRACT, WARRANTY, TORT,
-; NEGLIGENCE OR OTHERWISE) FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT
-; LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION,
-; LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING FROM USE OR
-; INABILITY TO USE THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, ANY DIRECT,
-; INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS OF DATA,
-; SAVINGS OR PROFITS,
-; EVEN IF Disclaimer HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-; YOU ASSUME ALL RESPONSIBILITIES FOR SELECTION OF THE SOFTWARE TO ACHIEVE YOUR
-; INTENDED RESULTS, AND FOR THE INSTALLATION OF, USE OF, AND RESULTS OBTAINED
-; FROM, THE SOFTWARE.
-;
-; This software may be replicated in part or whole for the licensed use,
-; with the restriction that this Disclaimer and Copyright notice must be
-; included with each copy of this software, whether used in part or whole,
-; at all times.
-;/
-;/*****************************************************************************/
-;/* Startup for IAR */
-;/* Version V1.0 */
-;/* Date 2019-03-01 */
-;/* Target-mcu M0+ Device */
-;/*****************************************************************************/
-
-
- MODULE ?cstartup
-
- ;; Forward declaration of sections.
- SECTION CSTACK:DATA:NOROOT(3)
-
- EXTERN __iar_program_start
- EXTERN SystemInit
- PUBLIC __vector_table
-
- SECTION .intvec:CODE:ROOT(8)
- DATA
-__vector_table
- DCD sfe(CSTACK) ; Top of Stack
- DCD Reset_Handler ; Reset
- DCD NMI_Handler ; NMI
- DCD HardFault_Handler ; Hard Fault
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD SVC_Handler ; SVCall
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD PendSV_Handler ; PendSV
- DCD SysTick_Handler ; SysTick
-
-; Numbered IRQ handler vectors
-
-; Note: renaming to device dependent ISR function names are done in
-
- DCD PORT0_IRQHandler ;
- DCD PORT1_IRQHandler ;
- DCD PORT2_IRQHandler ;
- DCD PORT3_IRQHandler ;
- DCD Dummy_Handler ;
- DCD Dummy_Handler ;
- DCD UART0_IRQHandler ;
- DCD UART1_IRQHandler ;
- DCD Dummy_Handler ;
- DCD Dummy_Handler ;
- DCD SPI_IRQHandler ;
- DCD Dummy_Handler ;
- DCD I2C_IRQHandler ;
- DCD Dummy_Handler ;
- DCD TIM0_IRQHandler ;
- DCD TIM1_IRQHandler ;
- DCD TIM2_IRQHandler ;
- DCD Dummy_Handler ;
- DCD TIM4_IRQHandler ;
- DCD TIM5_IRQHandler ;
- DCD TIM6_IRQHandler ;
- DCD PCA_IRQHandler ;
- DCD WDT_IRQHandler ;
- DCD Dummy_Handler ;
- DCD ADC_IRQHandler ;
- DCD Dummy_Handler ;
- DCD VC0_IRQHandler ;
- DCD VC1_IRQHandler ;
- DCD LVD_IRQHandler ;
- DCD Dummy_Handler ;
- DCD FLASH_RAM_IRQHandler ;
- DCD CLKTRIM_IRQHandler ;
-
- THUMB
-
- PUBWEAK Reset_Handler
- SECTION .text:CODE:NOROOT:REORDER(2)
-Reset_Handler
- ;reset NVIC if in rom debug
- LDR R0, =0x20000000
- LDR R2, =0x0 ; vector offset
- cmp PC, R0
- bls ROMCODE
-
- ; ram code base address.
- ADD R2, R0,R2
-ROMCODE
- ; reset Vector table address.
- LDR R0, =0xE000ED08
- STR R2, [R0]
-
- LDR R0, =SystemInit
- BLX R0
- LDR R0, =__iar_program_start
- BX R0
-
- PUBWEAK NMI_Handler
- SECTION .text:CODE:NOROOT:REORDER(1)
-NMI_Handler
- B NMI_Handler
-
- PUBWEAK HardFault_Handler
- SECTION .text:CODE:NOROOT:REORDER(1)
-HardFault_Handler
- B HardFault_Handler
-
-
- PUBWEAK SVC_Handler
- SECTION .text:CODE:NOROOT:REORDER(1)
-SVC_Handler
- B SVC_Handler
-
- PUBWEAK PendSV_Handler
- SECTION .text:CODE:NOROOT:REORDER(1)
-PendSV_Handler
- B PendSV_Handler
-
- PUBWEAK SysTick_Handler
- SECTION .text:CODE:NOROOT:REORDER(1)
-SysTick_Handler
- B SysTick_Handler
-
-
- PUBWEAK PORT0_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-PORT0_IRQHandler
- B PORT0_IRQHandler
-
-
- PUBWEAK PORT1_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-PORT1_IRQHandler
- B PORT1_IRQHandler
-
-
- PUBWEAK PORT2_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-PORT2_IRQHandler
- B PORT2_IRQHandler
-
-
- PUBWEAK PORT3_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-PORT3_IRQHandler
- B PORT3_IRQHandler
-
-
- PUBWEAK Dummy_Handler
- SECTION .text:CODE:NOROOT:REORDER(1)
-Dummy_Handler
- B Dummy_Handler
-
-
- PUBWEAK UART0_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-UART0_IRQHandler
- B UART0_IRQHandler
-
-
- PUBWEAK UART1_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-UART1_IRQHandler
- B UART1_IRQHandler
-
-
-
-
- PUBWEAK SPI_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-SPI_IRQHandler
- B SPI_IRQHandler
-
-
- PUBWEAK I2C_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-I2C_IRQHandler
- B I2C_IRQHandler
-
-
- PUBWEAK TIM0_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-TIM0_IRQHandler
- B TIM0_IRQHandler
-
-
- PUBWEAK TIM1_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-TIM1_IRQHandler
- B TIM1_IRQHandler
-
-
- PUBWEAK TIM2_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-TIM2_IRQHandler
- B TIM2_IRQHandler
-
-
-
-
- PUBWEAK TIM4_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-TIM4_IRQHandler
- B TIM4_IRQHandler
-
-
- PUBWEAK TIM5_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-TIM5_IRQHandler
- B TIM5_IRQHandler
-
-
- PUBWEAK TIM6_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-TIM6_IRQHandler
- B TIM6_IRQHandler
-
-
- PUBWEAK PCA_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-PCA_IRQHandler
- B PCA_IRQHandler
-
-
- PUBWEAK WDT_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-WDT_IRQHandler
- B WDT_IRQHandler
-
-
-
-
- PUBWEAK ADC_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-ADC_IRQHandler
- B ADC_IRQHandler
-
-
- PUBWEAK VC0_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-VC0_IRQHandler
- B VC0_IRQHandler
-
-
- PUBWEAK VC1_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-VC1_IRQHandler
- B VC1_IRQHandler
-
-
- PUBWEAK LVD_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-LVD_IRQHandler
- B LVD_IRQHandler
-
-
- PUBWEAK FLASH_RAM_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-FLASH_RAM_IRQHandler
- B FLASH_RAM_IRQHandler
-
-
- PUBWEAK CLKTRIM_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-CLKTRIM_IRQHandler
- B CLKTRIM_IRQHandler
-
-
- END
diff --git a/src/hc32f005_ddl/example/template/template/EWARM/template.ewp b/src/hc32f005_ddl/example/template/template/EWARM/template.ewp
deleted file mode 100644
index e595256..0000000
--- a/src/hc32f005_ddl/example/template/template/EWARM/template.ewp
+++ /dev/null
@@ -1,2210 +0,0 @@
-
-
-
- 2
-
- Release
-
- ARM
-
- 0
-
- General
- 3
-
- 24
- 1
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ICCARM
- 2
-
- 31
- 1
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AARM
- 2
-
- 9
- 1
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- OBJCOPY
- 0
-
- 1
- 1
- 0
-
-
-
-
-
-
-
-
- CUSTOM
- 3
-
-
-
- 0
-
-
-
- BICOMP
- 0
-
-
-
- BUILDACTION
- 1
-
-
-
-
-
-
- ILINK
- 0
-
- 17
- 1
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- IARCHIVE
- 0
-
- 0
- 1
- 0
-
-
-
-
-
-
- BILINK
- 0
-
-
-
-
- debug
-
- ARM
-
- 0
-
- General
- 3
-
- 24
- 1
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ICCARM
- 2
-
- 31
- 1
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AARM
- 2
-
- 9
- 1
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- OBJCOPY
- 0
-
- 1
- 1
- 0
-
-
-
-
-
-
-
-
- CUSTOM
- 3
-
-
-
- 0
-
-
-
- BICOMP
- 0
-
-
-
- BUILDACTION
- 1
-
-
-
-
-
-
- ILINK
- 0
-
- 17
- 1
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- IARCHIVE
- 0
-
- 0
- 1
- 0
-
-
-
-
-
-
- BILINK
- 0
-
-
-
-
- common
-
- $PROJ_DIR$\..\..\..\..\mcu\common\system_hc32f005.c
-
-
- $PROJ_DIR$\..\..\..\..\mcu\common\interrupts_hc32f005.c
-
-
- $PROJ_DIR$\startup_hc32f005.s
-
-
- $PROJ_DIR$\..\..\..\..\driver\src\ddl.c
-
-
-
- driver
-
- $PROJ_DIR$\..\..\..\..\driver\src\sysctrl.c
-
-
-
-
- source
-
- $PROJ_DIR$\..\source\main.c
-
-
- Release
-
- ICCARM
-
- 31
- 0
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- README
-
- $PROJ_DIR$\..\readme.txt
-
-
-
-
-
diff --git a/src/hc32f005_ddl/example/template/template/EWARM/template.eww b/src/hc32f005_ddl/example/template/template/EWARM/template.eww
deleted file mode 100644
index c62178f..0000000
--- a/src/hc32f005_ddl/example/template/template/EWARM/template.eww
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
- $WS_DIR$\template.ewp
-
-
-
-
-
diff --git a/src/hc32f005_ddl/example/template/template/MDK/startup_hc32f005.s b/src/hc32f005_ddl/example/template/template/MDK/startup_hc32f005.s
deleted file mode 100644
index 8b56703..0000000
--- a/src/hc32f005_ddl/example/template/template/MDK/startup_hc32f005.s
+++ /dev/null
@@ -1,292 +0,0 @@
-;/******************************************************************************
-;* Copyright (C) 2019, Huada Semiconductor Co.,Ltd All rights reserved.
-;*
-;* This software is owned and published by:
-;* Huada Semiconductor Co.,Ltd ("HDSC").
-;*
-;* BY DOWNLOADING, INSTALLING OR USING THIS SOFTWARE, YOU AGREE TO BE BOUND
-;* BY ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT.
-;*
-;* This software contains source code for use with HDSC
-;* components. This software is licensed by HDSC to be adapted only
-;* for use in systems utilizing HDSC components. HDSC shall not be
-;* responsible for misuse or illegal use of this software for devices not
-;* supported herein. HDSC is providing this software "AS IS" and will
-;* not be responsible for issues arising from incorrect user implementation
-;* of the software.
-;*
-;* Disclaimer:
-;* HDSC MAKES NO WARRANTY, EXPRESS OR IMPLIED, ARISING BY LAW OR OTHERWISE,
-;* REGARDING THE SOFTWARE (INCLUDING ANY ACOOMPANYING WRITTEN MATERIALS),
-;* ITS PERFORMANCE OR SUITABILITY FOR YOUR INTENDED USE, INCLUDING,
-;* WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY, THE IMPLIED
-;* WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE OR USE, AND THE IMPLIED
-;* WARRANTY OF NONINFRINGEMENT.
-;* HDSC SHALL HAVE NO LIABILITY (WHETHER IN CONTRACT, WARRANTY, TORT,
-;* NEGLIGENCE OR OTHERWISE) FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT
-;* LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION,
-;* LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING FROM USE OR
-;* INABILITY TO USE THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, ANY DIRECT,
-;* INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS OF DATA,
-;* SAVINGS OR PROFITS,
-;* EVEN IF Disclaimer HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-;* YOU ASSUME ALL RESPONSIBILITIES FOR SELECTION OF THE SOFTWARE TO ACHIEVE YOUR
-;* INTENDED RESULTS, AND FOR THE INSTALLATION OF, USE OF, AND RESULTS OBTAINED
-;* FROM, THE SOFTWARE.
-;*
-;* This software may be replicated in part or whole for the licensed use,
-;* with the restriction that this Disclaimer and Copyright notice must be
-;* included with each copy of this software, whether used in part or whole,
-;* at all times.
-;*/
-;/*****************************************************************************/
-
-;/*****************************************************************************/
-;/* Startup for ARM */
-;/* Version V1.0 */
-;/* Date 2019-03-01 */
-;/* Target-mcu {MCU_PN_H} */
-;/*****************************************************************************/
-
-; Stack Configuration
-; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
-
-Stack_Size EQU 0x00000200
-
- AREA STACK, NOINIT, READWRITE, ALIGN=3
-Stack_Mem SPACE Stack_Size
-__initial_sp
-
-
-; Heap Configuration
-; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
-
-Heap_Size EQU 0x00000200
-
- AREA HEAP, NOINIT, READWRITE, ALIGN=3
-__heap_base
-Heap_Mem SPACE Heap_Size
-__heap_limit
-
-
- PRESERVE8
- THUMB
-
-
-; Vector Table Mapped to Address 0 at Reset
-
- AREA RESET, DATA, READONLY
- EXPORT __Vectors
- EXPORT __Vectors_End
- EXPORT __Vectors_Size
-
-__Vectors
- DCD __initial_sp ; Top of Stack
- DCD Reset_Handler ; Reset
- DCD NMI_Handler ; NMI
- DCD HardFault_Handler ; Hard Fault
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD SVC_Handler ; SVCall
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD PendSV_Handler ; PendSV
- DCD SysTick_Handler ; SysTick
-
- DCD PORT0_IRQHandler ;
- DCD PORT1_IRQHandler ;
- DCD PORT2_IRQHandler ;
- DCD PORT3_IRQHandler ;
- DCD Dummy_Handler ;
- DCD Dummy_Handler ;
- DCD UART0_IRQHandler ;
- DCD UART1_IRQHandler ;
- DCD LPUART_IRQHandler ;
- DCD Dummy_Handler ;
- DCD SPI_IRQHandler ;
- DCD Dummy_Handler ;
- DCD I2C_IRQHandler ;
- DCD Dummy_Handler ;
- DCD TIM0_IRQHandler ;
- DCD TIM1_IRQHandler ;
- DCD TIM2_IRQHandler ;
- DCD LPTIM_IRQHandler ;
- DCD TIM4_IRQHandler ;
- DCD TIM5_IRQHandler ;
- DCD TIM6_IRQHandler ;
- DCD PCA_IRQHandler ;
- DCD WDT_IRQHandler ;
- DCD RTC_IRQHandler ;
- DCD ADC_IRQHandler ;
- DCD Dummy_Handler ;
- DCD VC0_IRQHandler ;
- DCD VC1_IRQHandler ;
- DCD LVD_IRQHandler ;
- DCD Dummy_Handler ;
- DCD FLASH_RAM_IRQHandler ;
- DCD CLKTRIM_IRQHandler ;
-
-__Vectors_End
-
-__Vectors_Size EQU __Vectors_End - __Vectors
-
- AREA |.text|, CODE, READONLY
-
-
-; Reset Handler
-
-Reset_Handler PROC
- EXPORT Reset_Handler [WEAK]
- IMPORT SystemInit
- IMPORT __main
-
- ;reset NVIC if in rom debug
- LDR R0, =0x20000000
- LDR R2, =0x0
- MOVS R1, #0 ; for warning,
- ADD R1, PC,#0 ; for A1609W,
- CMP R1, R0
- BLS RAMCODE
-
- ; ram code base address.
- ADD R2, R0,R2
-RAMCODE
- ; reset Vector table address.
- LDR R0, =0xE000ED08
- STR R2, [R0]
-
- LDR R0, =SystemInit
- BLX R0
- LDR R0, =__main
- BX R0
- ENDP
-
-
-; Dummy Exception Handlers (infinite loops which can be modified)
-
-NMI_Handler PROC
- EXPORT NMI_Handler [WEAK]
- B .
- ENDP
-
-
-HardFault_Handler\
- PROC
- EXPORT HardFault_Handler [WEAK]
- B .
- ENDP
-SVC_Handler PROC
- EXPORT SVC_Handler [WEAK]
- B .
- ENDP
-PendSV_Handler PROC
- EXPORT PendSV_Handler [WEAK]
- B .
- ENDP
-SysTick_Handler PROC
- EXPORT SysTick_Handler [WEAK]
- B .
- ENDP
-
-Default_Handler PROC
-
- EXPORT PORT0_IRQHandler [WEAK]
- EXPORT PORT1_IRQHandler [WEAK]
- EXPORT PORT2_IRQHandler [WEAK]
- EXPORT PORT3_IRQHandler [WEAK]
- EXPORT Dummy_Handler [WEAK]
- EXPORT Dummy_Handler [WEAK]
- EXPORT UART0_IRQHandler [WEAK]
- EXPORT UART1_IRQHandler [WEAK]
- EXPORT LPUART_IRQHandler [WEAK]
- EXPORT Dummy_Handler [WEAK]
- EXPORT SPI_IRQHandler [WEAK]
- EXPORT Dummy_Handler [WEAK]
- EXPORT I2C_IRQHandler [WEAK]
- EXPORT Dummy_Handler [WEAK]
- EXPORT TIM0_IRQHandler [WEAK]
- EXPORT TIM1_IRQHandler [WEAK]
- EXPORT TIM2_IRQHandler [WEAK]
- EXPORT LPTIM_IRQHandler [WEAK]
- EXPORT TIM4_IRQHandler [WEAK]
- EXPORT TIM5_IRQHandler [WEAK]
- EXPORT TIM6_IRQHandler [WEAK]
- EXPORT PCA_IRQHandler [WEAK]
- EXPORT WDT_IRQHandler [WEAK]
- EXPORT RTC_IRQHandler [WEAK]
- EXPORT ADC_IRQHandler [WEAK]
- EXPORT Dummy_Handler [WEAK]
- EXPORT VC0_IRQHandler [WEAK]
- EXPORT VC1_IRQHandler [WEAK]
- EXPORT LVD_IRQHandler [WEAK]
- EXPORT Dummy_Handler [WEAK]
- EXPORT FLASH_RAM_IRQHandler [WEAK]
- EXPORT CLKTRIM_IRQHandler [WEAK]
-
-
-PORT0_IRQHandler
-PORT1_IRQHandler
-PORT2_IRQHandler
-PORT3_IRQHandler
-UART0_IRQHandler
-UART1_IRQHandler
-LPUART_IRQHandler
-SPI_IRQHandler
-I2C_IRQHandler
-TIM0_IRQHandler
-TIM1_IRQHandler
-TIM2_IRQHandler
-LPTIM_IRQHandler
-TIM4_IRQHandler
-TIM5_IRQHandler
-TIM6_IRQHandler
-PCA_IRQHandler
-WDT_IRQHandler
-RTC_IRQHandler
-ADC_IRQHandler
-VC0_IRQHandler
-VC1_IRQHandler
-LVD_IRQHandler
-FLASH_RAM_IRQHandler
-CLKTRIM_IRQHandler
-Dummy_Handler
-
- B .
-
- ENDP
-
-
- ALIGN
-
-
-; User Initial Stack & Heap
-
- IF :DEF:__MICROLIB
-
- EXPORT __initial_sp
- EXPORT __heap_base
- EXPORT __heap_limit
-
- ELSE
-
- IMPORT __use_two_region_memory
- EXPORT __user_initial_stackheap
-__user_initial_stackheap
-
- LDR R0, = Heap_Mem
- LDR R1, =(Stack_Mem + Stack_Size)
- LDR R2, = (Heap_Mem + Heap_Size)
- LDR R3, = Stack_Mem
- BX LR
-
- ALIGN
-
- ENDIF
-
-
- END
diff --git a/src/hc32f005_ddl/example/template/template/MDK/template.uvprojx b/src/hc32f005_ddl/example/template/template/MDK/template.uvprojx
deleted file mode 100644
index 133cc28..0000000
--- a/src/hc32f005_ddl/example/template/template/MDK/template.uvprojx
+++ /dev/null
@@ -1,458 +0,0 @@
-
-
-
- 2.1
-
- ### uVision Project, (C) Keil Software
-
-
-
- template_Release
- 0x4
- ARM-ADS
- 6100001::V6.10.1::.\ARMCLANG
- 1
-
-
- ARMCM0P
- ARM
- ARM.CMSIS.5.4.0
- http://www.keil.com/pack/
- IROM(0x00000000,0x8000) IRAM(0x20000000,0x1000) CPUTYPE("Cortex-M0+") CLOCK(32000000) ESEL ELITTLE
-
-
- UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0NEW_DEVICE -FS00 -FL040000 -FP0($$Device:ARMCM0P$Device\ARM\Flash\NEW_DEVICE.FLM))
- 0
- $$Device:ARMCM0P$Device\ARM\ARMCM0plus\Include\ARMCM0plus.h
-
-
-
-
-
-
-
-
-
- ./../../../..\mcu\MDK\HC32F005.sfr
- 1
- 0
-
-
-
-
-
-
- 0
- 0
- 0
- 0
- 1
-
- .\output\release\
- template
- 1
- 0
- 1
- 1
- 1
- .\output\release\
- 1
- 0
- 0
-
- 0
- 0
-
-
- 0
- 0
- 0
- 0
-
-
- 0
- 0
-
-
- 0
- 0
- 0
- 0
-
-
- 0
- 0
-
-
- 0
- 0
- 0
- 0
-
- 0
-
-
-
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 0
- 0
- 0
- 3
-
-
- 1
-
-
- SARMCM3.DLL
-
- DARMCM1.DLL
- -pCM0+
- SARMCM3.DLL
-
- TARMCM1.DLL
- -pCM0+
-
-
-
- 1
- 0
- 0
- 0
- 16
-
-
-
-
- 1
- 0
- 0
- 1
- 1
- 4096
-
- 1
- BIN\UL2CM3.DLL
- "" ()
-
-
-
-
- 0
-
-
-
- 0
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 0
- 1
- 1
- 0
- 0
- 0
- 0
- 0
- 1
- 1
- 0
- 1
- 1
- 1
- 0
- 0
- 0
- 0
- 0
- "Cortex-M0+"
-
- 0
- 0
- 0
- 1
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 8
- 1
- 1
- 0
- 0
- 3
- 3
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 0
- 0
- 0
- 1
- 0
-
-
- 0
- 0x0
- 0x0
-
-
- 0
- 0x0
- 0x0
-
-
- 0
- 0x0
- 0x0
-
-
- 0
- 0x0
- 0x0
-
-
- 0
- 0x0
- 0x0
-
-
- 0
- 0x0
- 0x0
-
-
- 0
- 0x20000000
- 0x1000
-
-
- 1
- 0x0
- 0x8000
-
-
- 0
- 0x0
- 0x0
-
-
- 1
- 0x0
- 0x0
-
-
- 1
- 0x0
- 0x0
-
-
- 1
- 0x0
- 0x0
-
-
- 1
- 0x0
- 0x8000
-
-
- 1
- 0x0
- 0x0
-
-
- 0
- 0x0
- 0x0
-
-
- 0
- 0x0
- 0x0
-
-
- 0
- 0x0
- 0x0
-
-
- 0
- 0x20000000
- 0x1000
-
-
- 0
- 0x0
- 0x0
-
-
-
-
-
- 1
- 7
- 0
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 4
- 0
- 0
- 1
- 0
- 0
- 5
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
- ..\..\..\..\mcu\common;..\source;..\..\..\..\driver\inc
-
-
-
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
-
-
-
-
-
- 1
- 0
- 0
- 0
- 1
- 0
- 0x00000000
- 0x20000000
-
- template.sct
-
-
- --keep=*Handler
-
-
-
-
-
-
-
- common
-
-
- startup_hc32f005.s
- 2
- .\startup_hc32f005.s
-
-
- system_hc32f005.c
- 1
- ..\..\..\..\mcu\common\system_hc32f005.c
-
-
- interrupts_hc32f005.c
- 1
- ..\..\..\..\mcu\common\interrupts_hc32f005.c
-
-
-
-
- source
-
-
- main.c
- 1
- ..\source\main.c
-
-
-
-
- driver
-
-
- ddl.c
- 1
- ..\..\..\..\driver\src\ddl.c
-
-
- sysctrl.c
- 1
- ..\..\..\..\driver\src\sysctrl.c
-
-
-
-
-
- ::CMSIS
-
-
- README
-
-
- readme.txt
- 5
- ..\readme.txt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/hc32f005_ddl/example/template/template/source/ddl_device.h b/src/hc32f005_ddl/example/template/template/source/ddl_device.h
deleted file mode 100644
index 6c47316..0000000
--- a/src/hc32f005_ddl/example/template/template/source/ddl_device.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
-* Copyright (C) 2018, Huada Semiconductor Co.,Ltd All rights reserved.
-*
-* This software is owned and published by:
-* Huada Semiconductor Co.,Ltd ("HDSC").
-*
-* BY DOWNLOADING, INSTALLING OR USING THIS SOFTWARE, YOU AGREE TO BE BOUND
-* BY ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT.
-*
-* This software contains source code for use with HDSC
-* components. This software is licensed by HDSC to be adapted only
-* for use in systems utilizing HDSC components. HDSC shall not be
-* responsible for misuse or illegal use of this software for devices not
-* supported herein. HDSC is providing this software "AS IS" and will
-* not be responsible for issues arising from incorrect user implementation
-* of the software.
-*
-* Disclaimer:
-* HDSC MAKES NO WARRANTY, EXPRESS OR IMPLIED, ARISING BY LAW OR OTHERWISE,
-* REGARDING THE SOFTWARE (INCLUDING ANY ACOOMPANYING WRITTEN MATERIALS),
-* ITS PERFORMANCE OR SUITABILITY FOR YOUR INTENDED USE, INCLUDING,
-* WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY, THE IMPLIED
-* WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE OR USE, AND THE IMPLIED
-* WARRANTY OF NONINFRINGEMENT.
-* HDSC SHALL HAVE NO LIABILITY (WHETHER IN CONTRACT, WARRANTY, TORT,
-* NEGLIGENCE OR OTHERWISE) FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT
-* LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION,
-* LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING FROM USE OR
-* INABILITY TO USE THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, ANY DIRECT,
-* INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS OF DATA,
-* SAVINGS OR PROFITS,
-* EVEN IF Disclaimer HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-* YOU ASSUME ALL RESPONSIBILITIES FOR SELECTION OF THE SOFTWARE TO ACHIEVE YOUR
-* INTENDED RESULTS, AND FOR THE INSTALLATION OF, USE OF, AND RESULTS OBTAINED
-* FROM, THE SOFTWARE.
-*
-* This software may be replicated in part or whole for the licensed use,
-* with the restriction that this Disclaimer and Copyright notice must be
-* included with each copy of this software, whether used in part or whole,
-* at all times.
-*/
-/******************************************************************************/
-/** \file ddl_device.h
- **
- ** Device define
- ** @link SampleGroup Some description @endlink
- **
- ** - 2018-04-15
- **
- *****************************************************************************/
-
-#ifndef __DDL_DEVICE_H__
-#define __DDL_DEVICE_H__
-
-/**
- *******************************************************************************
- ** \brief Global device series definition
- **
- ** \note
- ******************************************************************************/
-#define DDL_MCU_SERIES DDL_DEVICE_SERIES_HC32F005
-
-
-/**
- *******************************************************************************
- ** \brief Global package definition
- **
- ** \note This definition is used for device package settings
- ******************************************************************************/
-#define DDL_MCU_PACKAGE DDL_DEVICE_PACKAGE_HC_K
-
-#endif /* __DDL_DEVICE_H__ */
-
-/*******************************************************************************
- * EOF (not truncated)
- ******************************************************************************/
diff --git a/src/hc32f005_ddl/example/template/template/source/main.c b/src/hc32f005_ddl/example/template/template/source/main.c
deleted file mode 100644
index 6908cc8..0000000
--- a/src/hc32f005_ddl/example/template/template/source/main.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/******************************************************************************
-* Copyright (C) 2016, Huada Semiconductor Co.,Ltd All rights reserved.
-*
-* This software is owned and published by:
-* Huada Semiconductor Co.,Ltd ("HDSC").
-*
-* BY DOWNLOADING, INSTALLING OR USING THIS SOFTWARE, YOU AGREE TO BE BOUND
-* BY ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT.
-*
-* This software contains source code for use with HDSC
-* components. This software is licensed by HDSC to be adapted only
-* for use in systems utilizing HDSC components. HDSC shall not be
-* responsible for misuse or illegal use of this software for devices not
-* supported herein. HDSC is providing this software "AS IS" and will
-* not be responsible for issues arising from incorrect user implementation
-* of the software.
-*
-* Disclaimer:
-* HDSC MAKES NO WARRANTY, EXPRESS OR IMPLIED, ARISING BY LAW OR OTHERWISE,
-* REGARDING THE SOFTWARE (INCLUDING ANY ACOOMPANYING WRITTEN MATERIALS),
-* ITS PERFORMANCE OR SUITABILITY FOR YOUR INTENDED USE, INCLUDING,
-* WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY, THE IMPLIED
-* WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE OR USE, AND THE IMPLIED
-* WARRANTY OF NONINFRINGEMENT.
-* HDSC SHALL HAVE NO LIABILITY (WHETHER IN CONTRACT, WARRANTY, TORT,
-* NEGLIGENCE OR OTHERWISE) FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT
-* LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION,
-* LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING FROM USE OR
-* INABILITY TO USE THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, ANY DIRECT,
-* INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS OF DATA,
-* SAVINGS OR PROFITS,
-* EVEN IF Disclaimer HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-* YOU ASSUME ALL RESPONSIBILITIES FOR SELECTION OF THE SOFTWARE TO ACHIEVE YOUR
-* INTENDED RESULTS, AND FOR THE INSTALLATION OF, USE OF, AND RESULTS OBTAINED
-* FROM, THE SOFTWARE.
-*
-* This software may be replicated in part or whole for the licensed use,
-* with the restriction that this Disclaimer and Copyright notice must be
-* included with each copy of this software, whether used in part or whole,
-* at all times.
-*/
-/******************************************************************************/
-/** \file main.c
- **
- ** A detailed description is available at
- ** @link Sample Group Some description @endlink
- **
- ** - 2016-02-16 1.0 XYZ First version for Device Driver Library of Module.
- **
- ******************************************************************************/
-
-/******************************************************************************
- * Include files
- ******************************************************************************/
-#include "ddl.h"
-
-/******************************************************************************
- * Local pre-processor symbols/macros ('#define')
- ******************************************************************************/
-
-/******************************************************************************
- * Global variable definitions (declared in header file with 'extern')
- ******************************************************************************/
-
-/******************************************************************************
- * Local type definitions ('typedef')
- ******************************************************************************/
-
-/******************************************************************************
- * Local function prototypes ('static')
- ******************************************************************************/
-
-/******************************************************************************
- * Local variable definitions ('static') *
- ******************************************************************************/
-
-/******************************************************************************
- * Local pre-processor symbols/macros ('#define')
- ******************************************************************************/
-
-/*****************************************************************************
- * Function implementation - global ('extern') and local ('static')
- ******************************************************************************/
-/**
- ******************************************************************************
- ** \brief Main function of project
- **
- ** \return uint32_t return value, if needed
- **
- ** This sample
- **
- ******************************************************************************/
-
-int32_t main(void)
-{
-
- /*
- Add your codes……
- */
-
- while (1)
- {
- ;
- }
-}
-
-/******************************************************************************
- * EOF (not truncated)
- ******************************************************************************/
-
-
diff --git a/src/hc32f005_ddl/example/uart/uart_int/MDK/uart_int.uvprojx b/src/hc32f005_ddl/example/uart/uart_int/MDK/uart_int.uvprojx
index c255a83..f75b906 100644
--- a/src/hc32f005_ddl/example/uart/uart_int/MDK/uart_int.uvprojx
+++ b/src/hc32f005_ddl/example/uart/uart_int/MDK/uart_int.uvprojx
@@ -10,13 +10,13 @@
uart_int_Release
0x4
ARM-ADS
- 6100001::V6.10.1::.\ARMCLANG
+ 6160000::V6.16::ARMCLANG
1
ARMCM0P
ARM
- ARM.CMSIS.5.4.0
+ ARM.CMSIS.5.7.0
http://www.keil.com/pack/
IROM(0x00000000,0x8000) IRAM(0x20000000,0x1000) CPUTYPE("Cortex-M0+") CLOCK(32000000) ESEL ELITTLE
@@ -185,6 +185,7 @@
0
0
0
+ 0
0
0
8
@@ -351,7 +352,7 @@
0
0
0
- 0
+ 4
@@ -423,18 +424,25 @@
..\..\..\..\driver\src\sysctrl.c
-uart.c
-1..\..\..\..\driver\src\uart.c
-
-bt.c
-1..\..\..\..\driver\src\bt.c
-
-lpm.c
-1..\..\..\..\driver\src\lpm.c
-
-gpio.c
-1..\..\..\..\driver\src\gpio.c
-
+ uart.c
+ 1
+ ..\..\..\..\driver\src\uart.c
+
+
+ bt.c
+ 1
+ ..\..\..\..\driver\src\bt.c
+
+
+ lpm.c
+ 1
+ ..\..\..\..\driver\src\lpm.c
+
+
+ gpio.c
+ 1
+ ..\..\..\..\driver\src\gpio.c
+
diff --git a/src/hc32f005_ddl/example/uart/uart_int/source/main.c b/src/hc32f005_ddl/example/uart/uart_int/source/main.c
index 25b303c..6a274db 100644
--- a/src/hc32f005_ddl/example/uart/uart_int/source/main.c
+++ b/src/hc32f005_ddl/example/uart/uart_int/source/main.c
@@ -127,6 +127,12 @@ int32_t main(void)
Uart_SendDataPoll(M0P_UART1,u8RxData[1]);
}
}
+ ///< LED点亮
+ Gpio_WriteOutputIO(STK_LED_PORT, STK_LED_PIN, FALSE);
+ delay1ms(300);
+ ///< LED关闭
+ Gpio_WriteOutputIO(STK_LED_PORT, STK_LED_PIN, TRUE);
+ delay1ms(300);
}
}
@@ -162,6 +168,15 @@ static void App_PortInit(void)
stcGpioCfg.enDir = GpioDirIn;
Gpio_Init(GpioPort3, GpioPin6, &stcGpioCfg);
Gpio_SetAfMode(GpioPort3, GpioPin6, GpioAf1); //配置P36 端口为URART1_RX
+
+ ///< 端口方向配置->输出(其它参数与以上(输入)配置参数一致)
+ stcGpioCfg.enDir = GpioDirOut;
+ stcGpioCfg.enPu = GpioPuDisable;
+ stcGpioCfg.enPd = GpioPdEnable;
+ ///< LED关闭
+ Gpio_WriteOutputIO(STK_LED_PORT, STK_LED_PIN, FALSE);
+ ///< GPIO IO LED端口初始化
+ Gpio_Init(STK_LED_PORT, STK_LED_PIN, &stcGpioCfg);
}
static void _UartBaudCfg(void)