資源簡介
HC32F003寄存器版本demo工程樣板,目前資源包括TICK、CLOCK、UART、GPIO、BT,后續繼續完善!

代碼片段和文件信息
/**?\file?system_hc32f003c4pa.c
?**
?**?System?clock?initialization.
?**?@link?SampleGroup?Some?description?@endlink
?**
?**???-?2017-10-31??1.0??Lux?First?version.
?**???-?2019-01-23??1.1??Stark?Version
?**?????????????????說明:SystemInit函數不能隨意修改,切換時鐘有固定的操作
?******************************************************************************/
/******************************************************************************/
/*?Include?files??????????????????????????????????????????????????????????????*/
/******************************************************************************/
#include?“base_types.h“
#include?“hc32f003c4pa.h“
#include?“system_hc32f003c4pa.h“
#include?“clock.h“
/**
?******************************************************************************
?**?System?Clock?Frequency?(Core?Clock)?Variable?according?CMSIS
?******************************************************************************/
uint32_t?SystemCoreClock?=?4000000;
/**
?******************************************************************************
?**?\brief??Setup?the?microcontroller?system.?Initialize?the?System?and?update
?**?the?SystemCoreClock?variable.
?**?note:dont?modify?this?function.
?**?clock?flow:?clock(xth/rch/rcl)?->?systemclk?->?hclk?->?M0+
????????????????????????????????????????????????????????->?pclk?(en_pclk_prs_t)->?PeripheralClock???????????????????????????????????????????????????????->?pclk?->?peripheralclock
?**?\param??none
?**?\return?none
?******************************************************************************/
void?SystemInit(void)
{
????M0P_CLOCK->RCH_CR_f.TRIM?=?(*((volatile?uint16_t*)(MCU_RCH_4M)));?//Loader?4MHz?Trimming?value
????ClkUnlock();????????????????????????????????????????????????????????????????????????????????????//unlock?clock
????M0P_CLOCK->SYSCTRL0_f.PCLK_PRS?=?PCLK_HCLK_Div1;????????????//Default?PCLK
????M0P_CLOCK->SYSCTRL0_f.HCLK_PRS?=?HCLK_SYS_Div1;?????????????//Default?HCLK
????M0P_CLOCK->SYSCTRL0_f.CLK_SW4_SEL?=?CLK_SW4_SEL_RCH;????//Default?RCH
????M0P_CLOCK->SYSCTRL0_f.RCH_EN?=?1;???????????????????????????????????????????//RCH?Clock?Enable
????clock_freq_update();
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????4515??2019-02-04?16:49??HC32F003_REG\common\ba
?????文件??????89147??2019-02-09?11:29??HC32F003_REG\common\hc32f003c4pa.h
?????文件???????2262??2019-02-10?13:09??HC32F003_REG\common\system_hc32f003c4pa.c
?????文件???????6384??2019-02-10?13:48??HC32F003_REG\common\system_hc32f003c4pa.h
?????文件???????2233??2019-02-10?13:30??HC32F003_REG\drivers\bt.c
?????文件???????8607??2019-02-10?13:26??HC32F003_REG\drivers\bt.h
?????文件???????8694??2019-02-10?13:52??HC32F003_REG\drivers\clock.c
?????文件??????12229??2019-02-04?17:29??HC32F003_REG\drivers\clock.h
?????文件???????3292??2019-01-31?09:47??HC32F003_REG\drivers\ddl.h
?????文件???????2176??2019-02-01?10:20??HC32F003_REG\drivers\gpio.c
?????文件??????47843??2019-02-09?11:29??HC32F003_REG\drivers\gpio.h
?????文件????????601??2019-02-10?13:57??HC32F003_REG\drivers\readme.txt
?????文件???????7891??2019-02-10?13:55??HC32F003_REG\drivers\uart.c
?????文件???????9049??2019-02-09?11:30??HC32F003_REG\drivers\uart.h
?????文件????????399??2018-06-08?22:21??HC32F003_REG\keilkilll.bat
?????文件????????320??2018-02-05?10:54??HC32F003_REG\project\EWARM\config\flashloader\FlashHC32F003.flash
?????文件????????443??2017-10-30?17:52??HC32F003_REG\project\EWARM\config\flashloader\FlashHC32F003.mac
?????文件??????21164??2018-02-07?15:55??HC32F003_REG\project\EWARM\config\flashloader\FlashHC32F003.out
?????文件????????218??2018-02-05?10:54??HC32F003_REG\project\EWARM\config\flashloader\HC32F003C4PA.board
?????文件????????218??2018-02-05?10:54??HC32F003_REG\project\EWARM\config\flashloader\HC32F003C4UA.board
?????文件???????1306??2018-09-14?09:29??HC32F003_REG\project\EWARM\config\hc32f003c4pa.icf
?????文件???????1313??2018-09-14?09:29??HC32F003_REG\project\EWARM\config\hc32f003c4pa_ram.icf
?????文件?????104870??2019-02-10?13:46??HC32F003_REG\project\EWARM\HC32F003C4PA.ewd
?????文件??????74457??2019-02-10?13:46??HC32F003_REG\project\EWARM\HC32F003C4PA.ewp
?????文件?????175645??2019-02-10?13:46??HC32F003_REG\project\EWARM\HC32F003C4PA.ewt
?????文件????????166??2018-09-14?09:29??HC32F003_REG\project\EWARM\HC32F003C4PA.eww
?????文件?????408648??2018-09-14?09:29??HC32F003_REG\project\EWARM\hc32f003c4pa.svd
?????文件??????68696??2019-02-10?14:01??HC32F003_REG\project\EWARM\output\release\Exe\hc32f003c4pa.out
?????文件???????3935??2019-02-10?14:00??HC32F003_REG\project\EWARM\output\release\Exe\hc32f003c4pa.sim
?????文件?????420715??2019-02-10?13:48??HC32F003_REG\project\EWARM\output\release\Obj\bt.pbi
............此處省略59個文件信息
- 上一篇:boast3 黑油模型 油藏數值模擬
- 下一篇:一個購物網站的畢業論文設計
評論
共有 條評論