停留在“ESTOP0

[复制链接]
1568|11
 楼主| dengdc 发表于 2018-4-12 11:17 | 显示全部楼层 |阅读模式
ST, top, gp, IO, pi
我在使用F28035 GPIO22 (已经设置为GPIO),使用的是10K的上拉电阻(到3.3V)。当它执行“GpioDataRegs.GPASET.bit.GPIO22 = 1”
的时候并没有任何问题,但是当它执行到“GpioDataRegs.GPACLEAR.bit.GPIO22 = 1”的时候,我测试了GPIO22引脚,3.3V的高级别并
没有转换到低级别,只是紧紧停留在2.9V,问题是程序(代码)停留在“ESTOP0”。
heweibig 发表于 2018-4-12 11:26 | 显示全部楼层

你有什么多余的动作吗?
 楼主| dengdc 发表于 2018-4-12 11:35 | 显示全部楼层
我只是对上拉电阻做了测试,除此之外没有其它的连接,有谁能帮我一下吧?
wuhany 发表于 2018-4-12 11:43 | 显示全部楼层

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.
zhaoxqi 发表于 2018-4-12 11:46 | 显示全部楼层
TI建议的改变IO状态时,用TOGGLE寄存器
yszong 发表于 2018-4-12 11:56 | 显示全部楼层
GpioDataRegs.GPASET.bit.GPIO22 = 1  不设置这个试试
jlyuan 发表于 2018-4-12 14:52 | 显示全部楼层

仿真调试的?
wyjie 发表于 2018-4-12 14:54 | 显示全部楼层
IO没有配置好
zhenykun 发表于 2018-4-12 14:59 | 显示全部楼层
需要设置成输出模式。GPADIR要设置
zhanghqi 发表于 2018-4-12 15:01 | 显示全部楼层

再者,GPIO时钟要打开,
 楼主| dengdc 发表于 2018-4-12 15:04 | 显示全部楼层
嗯,了解了
android2 发表于 2018-4-22 17:49 | 显示全部楼层
GPADIR要设置成什么
您需要登录后才可以回帖 登录 | 注册

本版积分规则

892

主题

13885

帖子

7

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