打印

GPIO中上拉电阻以及输出的低级别问题

[复制链接]
4190|7
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
giftyouth|  楼主 | 2011-12-20 10:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我在使用F28035 GPIO22 (已经设置为GPIO),使用的是10K的上拉电阻(到3.3V)。当它执行“GpioDataRegs.GPASET.bit.GPIO22 = 1
的时候并没有任何问题,但是当它执行到“GpioDataRegs.GPACLEAR.bit.GPIO22 = 1”的时候,我测试了GPIO22引脚,3.3V的高级别并
没有转换到低级别,只是紧紧停留在2.9V,问题是程序(代码)停留在“ESTOP0”。我只是对上拉电阻做了测试,除此之外没有其它的连接,有谁能帮我一下吧?

相关帖子

沙发
dontium| | 2012-1-8 01:09 | 只看该作者
If Read-Modify-Write operations are used on the GPxDAT registers, because of the delay between the
output and the input of the first instruction (I1), the second instruction (I2) will read the old value and
write it back.
GpioDataRegs.GPADAT.bit.GPIO1 = 1 ; I1 performs read-modify-write of GPADAT
GpioDataRegs.GPADAT.bit.GPIO2 = 1 ; I2 also a read-modify-write of GPADAT. ; It gets the old
value of GPIO1 due to the delay
The second instruction will wait for the first to finish its write due to the write-followed-by-read
protection on this peripheral frame. There will be some lag, however, between the write of (I1) and the
GPxDAT bit reflecting the new value (1) on the pin. During this lag, the second instruction will read the
old value of GPIO1 (0) and write it back along with the new value of GPIO2 (1). Therefore, GPIO1 pin
stays low.

使用特权

评论回复
板凳
dontium| | 2012-1-8 01:12 | 只看该作者
TI建议的改变IO状态时,用TOGGLE寄存器

使用特权

评论回复
地板
yedaochang| | 2012-1-8 08:27 | 只看该作者
:)

使用特权

评论回复
5
封剑藏刀| | 2012-1-8 13:07 | 只看该作者
:(

使用特权

评论回复
6
wsz310| | 2012-2-9 21:27 | 只看该作者
很好的知识啊,学习了!

使用特权

评论回复
7
lifenganhui| | 2012-2-9 22:26 | 只看该作者
楼主问题解决了没,啊,看看解决方法

使用特权

评论回复
8
LANGshanhao| | 2012-2-10 10:12 | 只看该作者
学习

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

25

主题

107

帖子

0

粉丝