STM32CubeMx的配置

这一系列的文章,默认使用STM32CubeMx+Keil V5做演示,软件下载资源和安装流程可以到百度搜,这里我就不具体展开说明了。好的,现在搞起来!

Step1 <打开CubeMx,新建工程>

STM32CubeMx学习-LED

Step2 <选择MCU型号>

直接搜索你在使用的芯片型号即可,我这里使用STM32F103C8T6的板子做演示
STM32CubeMx学习-LED

Step3 <界面配置>

STM32CubeMx学习-LED

(1)引脚配置

STM32CubeMx学习-LED
STM32CubeMx学习-LED
接着配置板子上LED对应的引脚
STM32CubeMx学习-LED
STM32CubeMx学习-LED
STM32CubeMx学习-LED

(2)时钟树配置

STM32CubeMx学习-LED
若想深入理解STM32板子时钟树原理,可以跳到下面这位兄弟那边学习:
(转)【STM32】系统时钟RCC详解(超详细,超全面)

(3)工程管理配置

STM32CubeMx学习-LED
STM32CubeMx学习-LED

step4 <生成工程>

STM32CubeMx学习-LED
STM32CubeMx学习-LED

Step5 <写控制代码>

因为刚才已经通过CubeMx软件配置好外设,因此我们就可以打开工程编写main()函数的主控制程序了。
STM32CubeMx学习-LED
STM32CubeMx学习-LED

Step6 <编译,烧录程序>

STM32CubeMx学习-LED
STM32CubeMx学习-LED
STM32CubeMx学习-LED

Step7 <观察结果>

STM32CubeMx学习-LED

相关文章:

  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
  • 2021-10-12
  • 2021-11-17
  • 2021-11-27
  • 2021-04-13
  • 2021-12-25
猜你喜欢
  • 2021-10-30
  • 2021-05-30
  • 2021-11-15
  • 2021-09-01
  • 2021-05-17
  • 2021-08-28
  • 2021-11-03
相关资源
相似解决方案