当前位置:网站首页>洋桃电子STM32物联网入门30步笔记三、CubeMX图形化编程、设置开发板上的IO口
洋桃电子STM32物联网入门30步笔记三、CubeMX图形化编程、设置开发板上的IO口
2022-04-23 08:10:00 【隔壁家的王小琪】
此文档作为对杨桃电子视频的整理,B站链接:第四集
一、开启RCC的外部时钟、包括外部高速时钟HSE和外部低速时钟LSE

时钟配置三个选项的含义:
选择禁用的话就只能使用内部时钟
旁路时钟源一般是有源晶振
晶体与陶瓷振荡器一般是无源晶振

二、开启RTC功能

三、配置时钟树
一般而言时钟频率越高,性能越高,耗电量越高;反之频率越低,耗电量越低。


四、设置IO端口
从原理图可以看到,两个LED1和LED2分别接到PB0和PB1,要让LED点亮,则需要将IO口设置为输出高电平。



杨桃开发板总览

核心板原理图总览机器IO配置情况

晶振配置情况

LED配置情况:高电平、推挽输出、无上下拉、高速输出

按键配置情况:上拉输入

蜂鸣器配置:高电平、推挽输出、无上下拉、高速输出

串口配置:


———————————————————————————————
杨桃IOT开发板地板原理图总览以及IO配置

唤醒键与PA0复用,因为在核心板上PA0已经设置过了,所以这里不用再设置
JTAG的特殊性,需要在SYS里面进行设置


两个ADC接口配置:模拟输入

继电器电路:高电平、开漏输出、无上下拉、高速输出

温湿度传感器:高电平、推挽输出、无上下拉、高速输出

RS458总线电路:
PA8:低电平、推挽输出、上拉、高速输出、用于切换是接收数据还是发送数据
PA2、PA3设置串口模式



CAN总线电路:



USB、SPI闪存、预留排针:




蓝牙模块:

wifi模块:


开发板所有IO口的初始化如下图:



PS:时钟的简单介绍:

STM32F103单片机CAN和USB共工同一组RAM空间,两个功能不能同时使用。
PC13对应用场合有要求,使用的时候要注意,至于什么要求, 我还没研究,反正视频里面是这样说的。
仿真接口视频用的JTAG的5脚模式;我比较喜欢用SW两脚模式,这样更节省IO口。

版权声明
本文为[隔壁家的王小琪]所创,转载请带上原文链接,感谢
https://blog.csdn.net/wsq_666/article/details/124333903
边栏推荐
- JS common array methods
- Navicat远程连接mysql
- Asan minimalism
- Campus transfer second-hand market source code download
- excle加水印
- [learning] audio and video development from scratch (9) -- nuplayer
- ansible自動化運維詳解(一)ansible的安裝部署、參數使用、清單管理、配置文件參數及用戶級ansible操作環境構建
- LINQ学习系列-----1.4 匿名对象
- ansible自动化运维详解(一)ansible的安装部署、参数使用、清单管理、配置文件参数及用户级ansible操作环境构建
- How browser works
猜你喜欢

正点原子携手OneOS直播 OneOS系统教程全面上线

测试你的机器学习流水线

RPC过程

面了一圈,整理了这套面试题。。

flask项目跨域拦截处理以及dbm数据库学习【包头文创网站开发】

How to read books and papers

396. Rotate Function

vslam PPT

Detailed explanation of ansible automatic operation and maintenance (I) installation and deployment, parameter use, list management, configuration file parameters and user level ansible operating envi

The annotation is self-defined by implementing the parameter parser handlermethodargumentresolver interface
随机推荐
Community group purchase applet source code + interface DIY + nearby leader + supplier + group collage + recipe + second kill + pre-sale + distribution + live broadcast
5.6 综合案例-RTU-
线程的调度(优先级)
npm安装yarn
Failed to convert a NumPy array to a Tensor(Unsupported Object type int)
通过实现参数解析器HandlerMethodArgumentResolver接口来自定义注解
Knowledge points and problem solutions related to information collection
00后最关注的职业:公务员排第二,第一是?
Multi vision slam
Transformer XL: attention language modelsbbeyond a fixed length context paper summary
An idea plug-in that doesn't work, but can install X
Add listening event to input element
What is RPC
什么是RPC
匿名類型(C# 指南 基礎知識)
LeetCode-199-二叉树的右视图
Comparison of indoor positioning technology
The annotation is self-defined by implementing the parameter parser handlermethodargumentresolver interface
Excle plus watermark
Idea: export Yapi interface using easyyapi plug-in