刚才看到
abofly的“
[原创文章] ST F7大赛~智能小区控制系统~屏幕篇-CubeMX”,手痒,也试了一把,结果以失败告终。
那么,还是老老实实地做我的跑马灯吧。用CubeMX作一个跑马灯!
一、平台
STM32CubeMX V4.10.0
MDK-ARM Professional V5.16a
二、CubeMX作业图
操作序号 | 界面导航 | 操作 | 参考值 |
1 | New Project->Board Selector->Board Filte->Type of Board: | 拉选 | Discovery |
2 | New Project->Board Selector->Board Filte->MCU Series: | 拉选 | STM32F7 |
6 | New Project->Board Selector->Board List: | 点选 | 选中STM32F746G-DISCO |
7 | New Project->Board Selector->OK | 点击 | |
9 | Pinout->芯片引脚图->PA8 | 点选 | GPIO_Output |
10 | Configuration->右图->GPIO图标->Pin Configuration->GPIO标签页->PA8项->GPIO mode: | 拉选 | Output Push Pull |
11 | Configuration->右图->GPIO图标->Pin Configuration->GPIO标签页->PA8项->GPIO Pull-up/Pull-Down: | 拉选 | Pull-up |
12 | Configuration->右图->GPIO图标->Pin Configuration->GPIO标签页->PA8项->Maximum output speed | 拉选 | High |
13 | Configuration->右图->GPIO图标->Pin Configuration->GPIO标签页->PA8项->User Label | 填写 | ARD_10 |
14 | Configuration->右图->GPIO图标->Pin Configuration->OK | 点击 | |
15 | File->Save Project | | |
16 | Projetc->Generate Code->Project Settings->Project Name: | 填写 | 自定义 |
17 | Projetc->Generate Code->Project Settings->Project Location: | 填写 | |
18 | Projetc->Generate Code->Project Settings->Toolchain / IDE: | 拉选 | MDK-ARM V5 |
19 | Projetc->Generate Code->Project Settings->OK | | |
三、代码加入while(1)
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_SET);
HAL_Delay(1000);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET);
HAL_Delay(1000);
四、硬件
ARD10->LED正->电阻1K->GND
总结:
1.为什么需要JRE的货一般都是很牛叉滴
2.ST的CubeMX真心好赞,特别对于英语菜鸟来说真是福音