本帖最后由 重庆酱油仔 于 2014-2-24 14:28 编辑
如题,我用的是MINI54LDE芯片,使用中我利用T1EX--P3.6来捕获外部波形的下降沿,用此引脚直接去测量该芯片的PWM,和SYStick驱动的IO口都正常,用来测外部的波形,数据变化非常的不准,
void FairyTMR1ForCapInit()
{
TIMER_Open(TIMER1,TIMER_PERIODIC_MODE,1);
TIMER_EnableCapture(TIMER1,TIMER_CAPTURE_TRIGGER_COUNTING_MODE,TIMER_CAPTURE_FALLING_EDGE);
// TIMER_EnableCapture(TIMER1,TIMER_CAPTURE_TRIGGER_COUNTING_MODE,TIMER_CAPTURE_RISING_THEN_FALLING_EDGE);
TIMER_EnableCaptureDebounce(TIMER1); //ʹÄÜÏû¶¶
TMR1ForCapIOInit();
NVIC_EnableIRQ(TMR1_IRQn);
TIMER_EnableCaptureInt(TIMER1);
// TIMER_EnableInt(TIMER1);
TIMER_Start(TIMER1);
}
|