Commit 086a463f authored by 时昊's avatar 时昊

feat:修改rtc驱动

parent 0e4e8eb5
...@@ -11,24 +11,21 @@ uint32_t RTE_SystemCoreClock; ...@@ -11,24 +11,21 @@ uint32_t RTE_SystemCoreClock;
extern uint32_t SystemCoreClock; extern uint32_t SystemCoreClock;
void RTE_CLOCK_Select_Start(void) void RTE_CLOCK_Select_Start(void)
{ {
////uint32_t msCnt;
#ifdef USED_FX_FCLK #ifdef USED_FX_FCLK
/* config clock */ CGC_Osc_Setting(OSC_OSCILLATOR,OSC_UNDER_10M,OSC_OSCILLATOR,OSC_NORMAL_POWER);
CGC_HSEConfig(OSC_OSCILLATOR,OSC_UNDER_10M); CGC_PLL_Setting(PLL_SR_fMX,PLL_DIV_2,PLL_MUL_16);
CGC_PLL_Setting(PLL_SR_fMX,PLL_DIV_2,PLL_MUL_16); CGC_PLL_CFG_AS_FCLK();
CGC_PLL_CFG_AS_FCLK(); delay_init(64000000);
SystemCoreClockUpdate(); SystemCoreClock = 64000000UL;
RTE_SystemCoreClock = SystemCoreClock;
delay_init(64000000);
SystemCoreClock = 64000000UL;
#endif #endif
#ifdef USED_FHOCO_FCLK #ifdef USED_FHOCO_FCLK
SystemCoreClockUpdate(); SystemCoreClockUpdate();
msCnt = SystemCoreClock / 1000; msCnt = SystemCoreClock / 1000;
SysTick_Config(msCnt); SysTick_Config(msCnt);
delay_init(SystemCoreClock); delay_init(SystemCoreClock);
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment