STM32串口乱码

库函数默认8MHz晶振,应根据实际硬件选择

 

# CMSIS/stm32f10x.h

#define HSE_VALUE   ((uint32_t)12000000)
#if !defined  HSE_VALUE
 #ifdef STM32F10X_CL   
  #define HSE_VALUE    ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */
 #else 
  #define HSE_VALUE    ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */
 #endif /* STM32F10X_CL */
#endif /* HSE_VALUE */

 

posted @ 2016-12-19 17:37  赤色  阅读(604)  评论(0编辑  收藏  举报
知识共享许可协议本博客作品采用知识共享署名-相同方式共享 3.0 未本地化版本许可协议进行许可。