Micom_Electric/ARM_STM32
2014. 10. 12. 15:38
STM32F4/29
Discovery
with CMSIS library
in Keil uVision
클럭 설정시 해야 할것
PLL_M = 보드에 장착된 크리스털 주파수
PLL_N = 시스템클럭 * 2 ; 168인경우 168*2 = 336
stm32f4xx.h 화일내에서 아래 항목
/*!< Value of the External oscillator in Hz */
#define HSE_VALUE ((uint32_t)8000000)
====================================================
Posted on April 28, 2014 at 11:30 AM
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | /************************* PLL Parameters *************************************/ /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */ #define PLL_M 8 /* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ #define PLL_Q 7 #if defined (STM32F40_41xxx) #define PLL_N 336 /* SYSCLK = PLL_VCO / PLL_P */ #define PLL_P 2 #endif /* STM32F40_41xxx */ #if defined (STM32F427_437xx) || defined (STM32F429_439xx) #define PLL_N 336 /* Set this to 336 if you use USB on device, default 360 */ /* SYSCLK = PLL_VCO / PLL_P */ #define PLL_P 2 #endif /* STM32F427_437x || STM32F429_439xx */ #if defined (STM32F401xx) #define PLL_N 336 /* SYSCLK = PLL_VCO / PLL_P */ #define PLL_P 4 #endif /* STM32F401xx */ |