STM32-Arduino 1-Basic



 1. 准备工作

(1)STM32F103C8T6蓝色系统板;

(2)USB转TTL模块;

(3)软件准备:

Arduino IDE:https://www.arduino.cc/en/Main/Software

STMicroelectronics :https://www.st.com/en/development-tools/flasher-stm32.html

Arduino_STM32:https://github.com/rogerclarkmelbourne/Arduino_STM32

STM32duino-bootloader:https://github.com/rogerclarkmelbourne/STM32duino-bootloader

2. 安装开发板支持程序包

打开Arduino IDE,进入“文件-首选项”,下面有一个“附加开发板管理器网址”,添加http://dan.drown.org/stm32duino/package_STM32duino_index.json,保存设置。然后再进入“工具-开发板-开发板管理器”,搜索并安装stm32f1xx。

3. 硬件连接

TTL模块----STM32
GND --------> GND
TxD --------> A10
RxD  --------> A9
3.3V --------> 3.3V
BOOT0 -------> 3.3V

4. Bootloader烧录

将stm32f103的跳线帽boot0置1,然后通过USB转TTL连接到电脑。

第一个页面,即“Select the communication port and set settings”,将Port Name选为对应的USB口,点击next。如果卡在next那里,检查一下连线,实在不行重新拔插USB转TTL;

第二个页面,即“Target is readable.”,页面上会显示“Flash Size 64KB”,不用管,点next;

第三个页面,即“Please, select your device in the target list”,下面有一堆东西,你只需要确认“R”和“W”是UnProtected(即是绿色的),然后点next;

第四个页面,中间有一个“Download to the device”,选它,然后点“Download from file”右边的省略号,选择上面下载的第三个东西(bin文件)。点next;

第五个页面,就是开始下载的页面,等到100%后,点close。

然后不要急着拔stm32f103,先将跳线帽boot0置0,再拔,不然又得重新弄一次。至此已完成。然后就可以通过板子上USB直接烧录了。

5. 正常程序下载

开发板:Generic STM32F103C series
选择正确的端口;
“工具-Upload method”选择“STM32duino bootloadr”

6. Reference

[1]https://toddzhoufeng.github.io/stm32/2019/05/12/stm32duino/

[2]https://blog.csdn.net/github_37290846/article/details/110530324

[3]https://blog.csdn.net/oChiTu1/article/details/108166233








Next Post Previous Post
No Comment
Add Comment
comment url