|
DSP28335在封锁脉冲时,为什么不相关的IO口置位了?
[复制链接]
我在封锁PWM波时执行下列程序,
void Stop_Pulses(void)
{
EALLOW;
GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO0 = 1;
GpioDataRegs.GPADAT.bit.GPIO0 = 1;
GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO1 = 1; //1是输出
GpioDataRegs.GPADAT.bit.GPIO1 = 1;
GpioCtrlRegs.GPAMUX1.bit.GPIO2 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO2 = 1; //1是输出
GpioDataRegs.GPADAT.bit.GPIO2 = 1;
GpioCtrlRegs.GPAMUX1.bit.GPIO3 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO3 = 1; //1是输出
GpioDataRegs.GPADAT.bit.GPIO3 = 1;
GpioCtrlRegs.GPAMUX1.bit.GPIO4 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO4 = 1; //1是输出
GpioDataRegs.GPADAT.bit.GPIO4 = 1;
GpioCtrlRegs.GPAMUX1.bit.GPIO5 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO5 = 1;
GpioDataRegs.GPADAT.bit.GPIO5 = 1;
执行的同时,为什么初化的GPIO6变为了高电平,我设制的是低啊???,是知道哇,谢谢了
GpioCtrlRegs.GPAMUX1.bit.GPIO6 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO6=1;
GpioCtrlRegs.GPAPUD.bit.GPIO6=0;
GpioDataRegs.GPADAT.bit.GPIO6=0;
|
|