使用STM32的库和示例工程时需要搞清楚的几个宏定义

1.关于是否使用外设驱动库
USE_STDPERIPH_DRIVER:定义该宏表示使用STM32库的驱动API,在使用时可以在编译器的Preprocessor中定义。

2. 器件类型选择宏
/* #define STM32F10X_LD */ /*!< STM32F10X_LD: STM32 Low density devices */
/* #define STM32F10X_LD_VL */ /*!< STM32F10X_LD_VL: STM32 Low density Value Line devices */
/* #define STM32F10X_MD */ /*!< STM32F10X_MD: STM32 Medium density devices */
/* #define STM32F10X_MD_VL */ /*!< STM32F10X_MD_VL: STM32 Medium density Value Line devices */
/* #define STM32F10X_HD */ /*!< STM32F10X_HD: STM32 High density devices */
/* #define STM32F10X_HD_VL */ /*!< STM32F10X_HD_VL: STM32 High density value line devices */
/* #define STM32F10X_XL */ /*!< STM32F10X_XL: STM32 XL-density devices */
/* #define STM32F10X_CL */ /*!< STM32F10X_CL: STM32 Connectivity line devices */
/* Tip: To avoid modifying this file each time you need to switch between these

devices, you can define the device in your toolchain compiler preprocessor.

– Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx microcontrollers
where the Flash memory density ranges between 16 and 32 Kbytes.
– Low-density value line devices are STM32F100xx microcontrollers where the Flash
memory density ranges between 16 and 32 Kbytes.
– Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx microcontrollers
where the Flash memory density ranges between 64 and 128 Kbytes.
– Medium-density value line devices are STM32F100xx microcontrollers where the
Flash memory density ranges between 64 and 128 Kbytes.
– High-density devices are STM32F101xx and STM32F103xx microcontrollers where
the Flash memory density ranges between 256 and 512 Kbytes.
– High-density value line devices are STM32F100xx microcontrollers where the
Flash memory density ranges between 256 and 512 Kbytes.
– XL-density devices are STM32F101xx and STM32F103xx microcontrollers where
the Flash memory density ranges between 512 and 1024 Kbytes.
– Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers.
*/

3.评估板选择宏
STM32100E-EVAL (High-density Value line) evaluation boards ,
STM32100B-EVAL (Medium-density Value line) evaluation boards ,
STM3210C-EVAL (Connectivity line) evaluation boards ,
STM3210E-EVAL (High-density and XL-density) evaluation boards
STM3210B-EVAL (Medium-density) evaluation boards
对应的宏为:USE_STM3210B_EVAL等

分享到: 更多
版权申明:

本站保留所有原创文章的版权,本站地址:奔跑的博客[http://www.elecbench.com]

原创文章转载时请注明出处,并添加文章所在页面的链接:http://www.elecbench.com/%e4%bd%bf%e7%94%a8stm32%e7%9a%84%e5%ba%93%e5%92%8c%e7%a4%ba%e4%be%8b%e5%b7%a5%e7%a8%8b%e6%97%b6%e9%9c%80%e8%a6%81%e6%90%9e%e6%b8%85%e6%a5%9a%e7%9a%84%e5%87%a0%e4%b8%aa%e5%ae%8f%e5%ae%9a%e4%b9%89/

本站所有 2010年3月4日 以后发表、未标明为“转载”的文章均是本站原创。

发表评论


(设置自己的个性头像)

*

申请属于你的免费顶级域名