|
求助大神啊 困扰几天了 程序可以编译成功 代码如下
#include
#include
#include
#include
#include
int main(void)
{
SysCtlClockSet( SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN |
SYSCTL_XTAL_6MHZ );
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER1);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);
GPIOPinTypeTimer(GPIO_PORTC_BASE,GPIO_PIN_6);
TimerConfigure(TIMER1_BASE,TIMER_CFG_16_BIT_PAIR|TIMER_CFG_A_PWM|TIMER_CFG_B_PWM);
TimerControlLevel(TIMER1_BASE,TIMER_B,true);
TimerLoadSet(TIMER1_BASE,TIMER_B,6000);
TimerMatchSet(TIMER1_BASE,TIMER_B,3000);
TimerEnable(TIMER1_BASE,TIMER_B);
}
用mdk 引脚波形查看 一直是高电平
|
|