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.

请教一个GPIO设初始设置的问题



 系统要求I/O在上电时为高电平,当没有插仿真器时上电为高电平,可是插上仿真器时(没有进行下载)上电却是低电平!不知如何设置。我用的是xds100-v2 的仿真器

设置如下:

EALLOW;

//  GPIO-40 - PIN FUNCTION = EPWM7A
 GpioCtrlRegs.GPBMUX1.bit.GPIO40 = 0; // 0=GPIO,  1=EPWM7A,  2=Resv,  3=Resv
 GpioCtrlRegs.GPBDIR.bit.GPIO40 = 1;  // 1=OUTput,  0=INput
 GpioCtrlRegs.GPBPUD.bit.GPIO40 = 0;    // Enable pull-up for GPIO29 (SCITXDA)
// GpioDataRegs.GPBCLEAR.bit.GPIO40 = 1; // uncomment if --> Set Low initially
 GpioDataRegs.GPBSET.bit.GPIO40 = 1;  // uncomment if --> Set High initially

EDIS;