STM32F4时钟树简图
//STM32F4
//1.外设时钟使能和失能
HAL库使能某个外设时钟的方法,如:
_HAL_RCC_GPIOA_CLK_ENABLE();_/使能GPIOA时钟
HAL_RCC_GPIOA_CLK_DISABLE();/禁止GPIOA时钟
//2.HAL_RCC-OscConfig()函数
HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef*RCC_OscInitStruct)
typedef struct
{
uint32_t OscilatorType;//choose type of oscillator
uint32_t HSEState;//State of HSE
uint32_t LSEState;
uint32_t HSIState;
uint32_t HSICablibrationValue;//Calibrated fine-tuned values of HSI
uint32_t LSIState;
RCC_PLLInitTypeDef PLL;
}RCC_OscInitTypeDef;
typedef struct
{
uint32_t PLLState;
uint32_t PLLSource;
uint32_t PLLM;
uint32_t PLLN;
uint32_t PLLP;
uint32_t PLLQ;
}RCC_PLLInitTypeDef;
#非技术实习信息共享#嵌入式入门 文章被收录于专栏
嵌入式入门合集
查看7道真题和解析