资料介绍
自己对程序的一点小总结
STM32学习总结
必加库文件:FLASH / RCC/ NVIC/ GPIO
程序流程:
Void main(void)
{
#ifdef DEBUG
debug();
#endif
RCC_Configuration();
NVIC_Configuration();
GPIO_Configuration();
............................................
while(1)
{}
}
============================================================================
RCC_Configuration()
============================================================================
Void RCC_Configuration(void)
{
//将外设 RCC寄存器重设为缺省值
RCC_DeInit();
//使能HSE
ErrorStatus HSEStartUpStatus;
RCC_HSEConfig(RCC_HSE_ON);
//等待HSE起振(该函数将等待直到 HSE 就绪,或者在超时的情况下退出)
HSEStartUpStatus = RCC_WaitForHSEStartUp();
If(HSEStartUpStatus == SUCCESS)
{
//