停留在2.9V

[复制链接]
1789|12
 楼主| dengdc 发表于 2013-4-26 21:31 | 显示全部楼层 |阅读模式
我在使用F28035 GPIO22 (已经设置为GPIO),使用的是10K的上拉电阻(到3.3V)。当它执行“GpioDataRegs.GPASET.bit.GPIO22 = 1”
的时候并没有任何问题,但是当它执行到“GpioDataRegs.GPACLEAR.bit.GPIO22 = 1”的时候,我测试了GPIO22引脚,3.3V的高级别并
没有转换到低级别,只是紧紧停留在2.9V,问题是程序(代码)停留在“ESTOP0”。
heweibig 发表于 2013-4-26 21:35 | 显示全部楼层
你有什么多余的动作吗?
 楼主| dengdc 发表于 2013-4-26 21:36 | 显示全部楼层
我只是对上拉电阻做了测试,除此之外没有其它的连接,有谁能帮我一下吧?
wuhany 发表于 2013-4-26 21:37 | 显示全部楼层
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.
 楼主| dengdc 发表于 2013-4-26 21:41 | 显示全部楼层
这个。。。啥意思
zhaoxqi 发表于 2013-4-26 21:41 | 显示全部楼层
TI建议的改变IO状态时,用TOGGLE寄存器
 楼主| dengdc 发表于 2013-4-26 21:44 | 显示全部楼层
哦,好像略懂了。。。
 楼主| dengdc 发表于 2013-4-26 21:44 | 显示全部楼层
那就先结贴了,我再琢磨琢磨
DIYfashaoyou 发表于 2013-6-6 17:17 | 显示全部楼层
GpioDataRegs.GPASET.bit.GPIO22 = 1  不设置这个试试
1988020566 发表于 2013-6-6 20:03 | 显示全部楼层
仿真调试的?
tianm 发表于 2013-6-7 10:34 | 显示全部楼层
IO没有配置好
dontium 发表于 2013-6-10 00:06 | 显示全部楼层
需要设置成输出模式。GPADIR要设置
dontium 发表于 2013-6-10 00:07 | 显示全部楼层
再者,GPIO时钟要打开,
您需要登录后才可以回帖 登录 | 注册

本版积分规则

892

主题

13885

帖子

7

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