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

feat:修改rtc驱动

parent 0e4e8eb5
......@@ -11,24 +11,21 @@ uint32_t RTE_SystemCoreClock;
extern uint32_t SystemCoreClock;
void RTE_CLOCK_Select_Start(void)
{
////uint32_t msCnt;
#ifdef USED_FX_FCLK
/* config clock */
CGC_HSEConfig(OSC_OSCILLATOR,OSC_UNDER_10M);
CGC_PLL_Setting(PLL_SR_fMX,PLL_DIV_2,PLL_MUL_16);
CGC_PLL_CFG_AS_FCLK();
SystemCoreClockUpdate();
RTE_SystemCoreClock = SystemCoreClock;
delay_init(64000000);
SystemCoreClock = 64000000UL;
CGC_Osc_Setting(OSC_OSCILLATOR,OSC_UNDER_10M,OSC_OSCILLATOR,OSC_NORMAL_POWER);
CGC_PLL_Setting(PLL_SR_fMX,PLL_DIV_2,PLL_MUL_16);
CGC_PLL_CFG_AS_FCLK();
delay_init(64000000);
SystemCoreClock = 64000000UL;
#endif
#ifdef USED_FHOCO_FCLK
SystemCoreClockUpdate();
msCnt = SystemCoreClock / 1000;
SysTick_Config(msCnt);
delay_init(SystemCoreClock);
#ifdef USED_FHOCO_FCLK
SystemCoreClockUpdate();
msCnt = SystemCoreClock / 1000;
SysTick_Config(msCnt);
delay_init(SystemCoreClock);
#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