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.

tm4c1294 的launchpad的pg1 引脚无法输出方波。换了块板子也这样。测试程序如下

int main(void)
{

SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN | SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 120000000);


SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOG);
GPIOPinTypeGPIOOutput(GPIO_PORTG_BASE, GPIO_PIN_1);



while(1)
{
GPIOPinWrite(GPIO_PORTG_BASE,GPIO_PIN_1,GPIO_PIN_1);
GPIOPinWrite(GPIO_PORTG_BASE,GPIO_PIN_1,0x00);
}

}

  • 1.第一个GPIOPinWrite(GPIO_PORTG_BASE,GPIO_PIN_1,GPIO_PIN_1);的第三个参数不对

    2.两个IO之间的切换应该加个延时试试,速度太快的话,反应不过来吧