From 82e38738a4d532cc3d56cbf80c1a4093f23cdd6a Mon Sep 17 00:00:00 2001 From: tao_z <tzj0429@163.com> Date: Wed, 14 Jul 2021 07:01:42 +0800 Subject: [PATCH] 调整时钟64MHz。 RTT任务增加马达开启和关闭功能 --- USR/SRC/Clock.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/USR/SRC/Clock.c b/USR/SRC/Clock.c index 3f842de..6b0df24 100644 --- a/USR/SRC/Clock.c +++ b/USR/SRC/Clock.c @@ -12,11 +12,11 @@ rcu_osci_on(RCU_IRC8M); //ʹ���ڲ�8MRCʱ�� rcu_osci_stab_wait(RCU_IRC8M); rcu_system_clock_source_config(RCU_CKSYSSRC_PLL); //sysclk is PLL - rcu_pll_config(RCU_PLLSRC_IRC8M_DIV2, RCU_PLL_MUL12); //8MHz/2 =4MHz PLL =4MHz*12 =48MHz - rcu_ahb_clock_config(RCU_AHB_CKSYS_DIV1); //AHB 48M - rcu_apb1_clock_config(RCU_APB1_CKAHB_DIV1); //APB1 48M - rcu_apb2_clock_config(RCU_APB2_CKAHB_DIV1); //APB2 48M - rcu_adc_clock_config(RCU_ADCCK_APB2_DIV4); //max 14M,current:12M + rcu_pll_config(RCU_PLLSRC_IRC8M_DIV2, RCU_PLL_MUL16); //8MHz/2 =4MHz PLL =4MHz*16 =64MHz + rcu_ahb_clock_config(RCU_AHB_CKSYS_DIV1); //AHB 64M + rcu_apb1_clock_config(RCU_APB1_CKAHB_DIV1); //APB1 64M + rcu_apb2_clock_config(RCU_APB2_CKAHB_DIV1); //APB2 64M + rcu_adc_clock_config(RCU_ADCCK_APB2_DIV8); //max 14M,current:64/8=8M rcu_usart_clock_config(RCU_USART0SRC_IRC8M); //USART0 8M rcu_rtc_clock_config(RCU_RTCSRC_NONE); @@ -38,7 +38,7 @@ ; } /* configure the systick handler priority */ - NVIC_SetPriority(SysTick_IRQn, 0x00); + NVIC_SetPriority(SysTick_IRQn, 0x01); } /*! -- Gitblit v1.8.0