当前位置:网站首页>STM32GPIO
STM32GPIO
2022-06-26 01:17:00 【m0_ forty-six million three hundred and twenty-one thousand one】
GPIO Basic knowledge
STM32 Most owned GPIOA、GPIOB...GPIOG Seven ports , Each port has a maximum of Pin0、Pin1...Pin15 common 16 One pin .
STM32 Each I/O Ports can be freely programmed , but I/O The register must be pressed 32 Bit words are accessed
Two GPIO Output HAL Library function
1)GPIO Electric frequency output HAL Library function
GPIOx: The port number of the target pin
GPIO_Pin: The pin number of the target pin
PinState: High level ---GPIO_PIN_SET, Low level --GPIO_PIN_RESET
for example : towards PB8 Pin output high level HAL_GPIO_WritePin(GPIOB, GPIO_PIN_8, GPIO_PIN_SET);
2)GPIO Level flip HAL Library function
Output the opposite level according to the current level
for example :PA3 Output level flip ,HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_3);
GPIO The functions and properties of the port
Normal output ( Push pull output and open floor output )
Analog input
Reuse output
I/O Interface circuit
To configure STM32cubeMX


To configure SYS as well as RCC

Configure clocks

The generated code , Name the file , And choose MDK-ARM V5

Check the box shown in the above figure , Then you can generate code , To MDK Editor in chief

stay mian Functional USER CODE Editor inside , When it's halfway through development , If you want to redefine the pins , Can return STMcubeMX edit , Instead of deleting all the original code .

Compile successfully
边栏推荐
- Etcd database source code analysis -- inter cluster network layer server interface
- Musk vs. jobs, who is the greatest entrepreneur in the 21st century
- 剑指 Offer II 096. 字符串交织
- 2022年育婴员(五级)考试试题及答案
- Freertos+stm32l+esp8266+mqtt protocol transmits temperature and humidity data to Tencent cloud IOT platform
- 如何有效地推廣產品
- Redis strings command
- Comment promouvoir efficacement les produits
- 远程增量同步神器rsync
- Handling of @charset UTF-8 warning problems during vite packaging and construction;
猜你喜欢

Essence and thoughts of 30 lectures on product thinking

Nacos registry

RT-Thread 项目工程搭建和配置--(Env Kconfig)

Endnote IEEE Transactions on industrial electronics/tie/tpel reference format template

新库上线 | CnOpenDataA股上市公司IPO申报发行文本数据

《网络是怎么样连接的》读书笔记 - 集线器、路由器和路由器(三)

数据分析——切片器、数据透视表与数据透视图(职场必备)

【花雕体验】11 上手ESP32C3

Redis strings command

Return value is object type method call equals()
随机推荐
Etcd database source code analysis cluster communication initialization
马斯克 VS 乔布斯,谁是21世纪最伟大的创业家
Installation and startup of redis
开窍之问答
下载安装Flume
2022年电气试验考试试题模拟考试平台操作
Redis之Strings命令
Redis的安装及启动
Xinku online | cnopendata text data of IPO declaration and issuance of A-share listed companies
The cache page stores the initial parameters after the route jump under the react + router framework
Daily question: the difference between threads and processes
ASP.NET cache缓存的用法
[从零开始学习FPGA编程-44]:视野篇 - 集成电路助力数字化时代高质量发展-1-集成电路芯片主要形态
Web信息收集,互联网上的裸奔者
模板引擎——FreeMarker初体验
卡通shader
C another new class is ICO? And app Use of config
QT cmake pure C code calls the system console to input scanf and Chinese output garbled code
When you run the demo using the gin framework, there is an error "listen TCP: 8080: bind: an attempt was made to access a socket in a way forbidden"
ciscn_ 2019_ en_ two