打印

停留在“ESTOP0

[复制链接]
1146|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.

使用特权

评论回复
5
zhaoxqi| | 2018-4-12 11:46 | 只看该作者
TI建议的改变IO状态时,用TOGGLE寄存器

使用特权

评论回复
6
yszong| | 2018-4-12 11:56 | 只看该作者
GpioDataRegs.GPASET.bit.GPIO22 = 1  不设置这个试试

使用特权

评论回复
7
jlyuan| | 2018-4-12 14:52 | 只看该作者

仿真调试的?

使用特权

评论回复
8
wyjie| | 2018-4-12 14:54 | 只看该作者
IO没有配置好

使用特权

评论回复
9
zhenykun| | 2018-4-12 14:59 | 只看该作者
需要设置成输出模式。GPADIR要设置

使用特权

评论回复
10
zhanghqi| | 2018-4-12 15:01 | 只看该作者

再者,GPIO时钟要打开,

使用特权

评论回复
11
dengdc|  楼主 | 2018-4-12 15:04 | 只看该作者
嗯,了解了

使用特权

评论回复
12
android2| | 2018-4-22 17:49 | 只看该作者
GPADIR要设置成什么

使用特权

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

本版积分规则

892

主题

13885

帖子

7

粉丝