当前位置:网站首页>GPIO operation method of imx6ull

GPIO operation method of imx6ull

2022-06-22 17:45:00 Proficient in embedded


Preface

This article will take you to learn how to operate imx6ull Of GPIO port , I'm sure you're interested in GPIO Now I will take you to learn how to operate imx6ull Of GPIO.

One 、CCM Clock Controller Module ( Clock control module )

Want to use GPIO The first step is to enable GPIO 了 ,CCM It is a clock controller. Under the chip manual, we can find its location as follows .
1. First navigate to the... Of the directory 18 Chapter
2. find CCM Clock tree
3. find GPIOn
4. find GPIOn Post view corresponding GPIO Group
 Insert picture description here

Two 、IOMUXC ​: IOMUX Controller,IO Multiplex controller

The second step is to set the pin to GPIO Pattern .
In chapter of the chip manual 32 Chapter can be found IOMUX Set the corresponding pin to GPIO Pattern
 Insert picture description here

3、 ... and 、GPIO: General-purpose input/output, Universal input and output port

The third step is to set GPIO Input or output mode
Find chapter of the chip manual 28 Chapter
find GPIO_GDIR This register is GPIO Direction register for , By setting this register GPIO Set to input or output mode .
 Insert picture description here

Four 、 Read GPIO state

Find No 28 Chapter GPIO_PSR Register read the contents of this register to read GPIO The state of .
 Insert picture description here

5、 ... and 、 Write GPIO state

Find No 28 Chapter GPIO_DR Register read this register and write the level you want to control into this pin to control GPIO Output level of .
 Insert picture description here

summary

Specific operation GPIO Methods let's move on to the next article , This article mainly wants to let you know how to read the chip manual to control GPIO port .

原网站

版权声明
本文为[Proficient in embedded]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206221546565367.html