我将GP8[8]与GP8[15]做为输出管脚,为什么每次将管脚拉低后,低电平不能保持,瞬间又拉高了?
同样的做法在GP6[4]上就能正确拉低,低电平能保持!
请大家帮我分析下原因吧!谢谢
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我将GP8[8]与GP8[15]做为输出管脚,为什么每次将管脚拉低后,低电平不能保持,瞬间又拉高了?
同样的做法在GP6[4]上就能正确拉低,低电平能保持!
请大家帮我分析下原因吧!谢谢
刚好开发板上这个管脚有电阻留出来,我特意测了一下,高电平输出3.341V。
是不是你测试的地搞错了?
PINMUX18= 0x00000800; //GP8[15]
*(unsigned int *)0x01E260B0 =0xffff0000; //output dir8
*(unsigned int *)0x01E260Bc =0x8000; // clear gp8[15]
*(unsigned int *)0x01E260B8 =0x8000; // set gp8[15]
// *(unsigned int *)0x01E260Bc =0x8000; //clear gp8[15]
while(1);
可以,把位低的语句放开,就一直是低了,单步也是按照代码期望改变的。
PINMUX18= 0x00000800;
*(unsigned int *)0x01E260B0 =0xffff0000; //output dir8
*(unsigned int *)0x01E260Bc =0x8000; // clear gp8[15]
*(unsigned int *)0x01E260B8 =0x8000; // set gp8[15]
*(unsigned int *)0x01E260Bc =0x8000; //clear gp8[15]
while(1);