你好
有关于psoc4200中的定时器模块中文资料?一共有3种模块都可以实现定时计数,比如timer counter(tcpwm mode ),timer counter pwm(tcpwm),timer(v2.70)我用前2个模块已经实现了计数中断闪烁灯的实验,为什么用TIMER(V2.70)模块就实现不了中断位的读取呢?我用的是TC * ========================================*/
#include <project.h>
uint8 led;
CY_ISR(InterruptHandler)
{
if (Timer_STATUS_TC_INT_MASK == Timer_ReadStatusRegister())
Timer_ClearFIFO();
LED_RED_Write(~LED_RED_Read());
}
int main()
{
CyGlobalIntEnable;
TC_ISR_StartEx(InterruptHandler);
// Timer_CTRL_ENABLE;
// Timer_CTRL_INTCNT_MASK;
Timer_Start();
// Timer_SetInterruptMode(0);
// Timer_WriteControlRegister(0);
for(;;)
{
;
}
}
中断源,望各位大侠给予指点 |