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

[复制链接]
5339|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 | 显示全部楼层
封剑藏刀 发表于 2012-1-8 13:07 | 显示全部楼层
wsz310 发表于 2012-2-9 21:27 | 显示全部楼层
很好的知识啊,学习了!
lifenganhui 发表于 2012-2-9 22:26 | 显示全部楼层
楼主问题解决了没,啊,看看解决方法
LANGshanhao 发表于 2012-2-10 10:12 | 显示全部楼层
您需要登录后才可以回帖 登录 | 注册

本版积分规则

25

主题

107

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部