在keil的配置界面中的C/C++中需要预定义几个字符串USE_STDPERIPH_DRIVER和STM32F10X_MD 多个的定义用逗号分开。
在老版本中,STM32F10X_MD是必须定义的,但是在keil5中,不定义也能编译通过,这个证明软件已经给你自动定义好了,他是在选择配置产品型号的时候定义的,所以就不用自己定义了。
Select the corresponding startup file depending of the used device: - startup_stm32f10x_ld_vl.s: for STM32 Low density Value line devices - startup_stm32f10x_ld.s: for STM32 Low density devices - startup_stm32f10x_md_vl.s: for STM32 Medium density Value line devices - startup_stm32f10x_md.s: for STM32 Medium density devices - startup_stm32f10x_hd_vl.s: for STM32 High density Value line devices - startup_stm32f10x_hd.s: for STM32 High density devices - startup_stm32f10x_xl.s: for STM32 XL density devices - startup_stm32f10x_cl.s: for STM32 Connectivity line devices |
|
看产品线选择启动文件,根据RCC时钟看,VL产品总线频率都是很慢的。
HSE external high speed osc 外部高速振荡器
LSE external low speed osc 外部低速振荡器
HSI LSI 内部高速/低速振动器
HCLK AHB总线 clk时钟 PCLK1 PCLK2 APB1/APB2总线时钟CLK
keil软件调试退出时总是卡死的解决方法:把所有调试时候打的断点取消,程序停止后在退出。