当前位置:网站首页>imx6ull的GPIO操作方法
imx6ull的GPIO操作方法
2022-06-22 15:47:00 【精通嵌入式】
文章目录
前言
本文将带大家学习如何去操作imx6ull的GPIO端口,相信大家对于GPIO的操作都有了解那下面将带大家学习如何操作imx6ull的GPIO。
一、CCM Clock Controller Module (时钟控制模块)
想要使用GPIO第一步就是使能GPIO了,CCM就是一个时钟控制器在芯片手册下我们可以先找到他的位置如下。
1.先定位到目录的第18章
2.找到CCM Clock tree
3.找到GPIOn
4.找到GPIOn后查看对应GPIO组
二、IOMUXC : IOMUX Controller,IO复用控制器
第二步就是将引脚设置为GPIO模式。
在芯片手册的第32章可以找到IOMUX将对应的引脚设置为GPIO模式
三、GPIO: General-purpose input/output,通用的输入输出口
第三步就是设置GPIO为输入还是输出模式
找到芯片手册第28章
找到GPIO_GDIR这个寄存器就是GPIO的方向寄存器,通过设置此寄存器即可将GPIO设置为输入或者输出模式。
四、读取GPIO状态
找到第28章的GPIO_PSR寄存器读取这个寄存器的内容即可读取到GPIO的状态。
五、写GPIO状态
找到第28章的GPIO_DR寄存器读取这个寄存器将你想控制的电平写入该引脚即可控制GPIO的输出电平。
总结
具体的操作GPIO方法我们放到下一篇文章,这篇文章主要想让大家了解如何去阅读芯片手册去控制GPIO端口。
边栏推荐
- Mybaits: common database operations (Neusoft operations)
- jMeter使用案例
- 跨平台Brave浏览器
- The MySQL of docker restarts, prompting error response from daemon: driver failed programming external connectivity on**
- Blazor University (30)表单 —— 从 InputBase 派生
- 如何理解volatile
- 试用了多款报表工具,终于找到了基于.Net 6开发的一个了
- Blazor University (30) form - derived from inputbase
- Blazor University (31) form - Validation
- Redis实现延迟队列的正确姿势
猜你喜欢
随机推荐
快速掌握 ASP.NET 身份认证框架 Identity - 用户注册
【进阶自动化测试第一步】1分钟带你了解自动化测试
clickhouse 21. X cluster four piece one copy deployment
Seeing the big from the small: a simple example of domain modeling, understanding "domain driven".
Description of new features and changes in ABP Framework version 5.3.0
Analysis of the read data source code of spark shuffle
Quartus Prime 18.0软件安装包和安装教程
Processing source code of spark executor execution results
Examples of MySQL account addition, deletion, modification, data import and export commands
The win10 desktop icon disappears and the toolbar turns black
Qt笔记-QMap自定义键(key)
Hello playwright: (7) simulate keyboard and mouse
What are the characteristics of the interactive whiteboard? Function introduction of electronic whiteboard
synchronized实现原理
Figure operation flow of HAMA BSP Model
Scala equality
Is flush easy to open an account? Is it safe to open an account online?
MySQL string field to floating point field
jMeter使用案例
C#-Linq源码解析之DefaultIfEmpty








