各位专家,您好!
我有一个问题,我在代码中配置了三个计时器。 TIMER0和TIMER2 => INTERRUPT和Timer1 (仅限经典模式)进行计数。
为此,我使用TIMER0,Timer1和TIMER2,TIMER0连接到ePIE模块,工作正常(我使用它来传输TX CAN帧),我想使用TIMER2进行调节中断。
它不适用于TIMER2。
我从不摆脱这个中断:那么如何确认这个中断? 我不能使用“Interrupt_clearACKGroup(x)”,因为TIMER2不是PIE映射的一部分,否?
您可以看到我的代码:
/**Initialization timer for ISR TX_CAN*/ timer_cpu_init(CPUTIMER0_BASE); /**Timer for CAN communication Interrupt all of (us) 10ms*/ timer_cpu_config(CPUTIMER0_BASE, DEVICE_SYSCLK_FREQ, 10000); Interrupt_register(INT_TIMER0, &isr_timer); CPUTimer_enableInterrupt(CPUTIMER0_BASE); Interrupt_enable(INT_TIMER0); /**Initialization timer for STEP_START_TIMER precharge and monitoring utilization*/ timer_cpu_init(CPUTIMER1_BASE); /**Timer for STEP_START_TIMER precharge all of (us) PARAM_T_PL_US and monitoring utilization*/ config_cpu_timer(CPUTIMER1_BASE); /**Initialization timer for regulation interrupt*/ timer_cpu_init(CPUTIMER2_BASE); /**Timer for regulation interrupt all of (us) 25us*/ timer_cpu_config(CPUTIMER2_BASE, DEVICE_SYSCLK_FREQ, 25); Interrupt_register(INT_TIMER2, &isr_regulation); CPUTimer_enableInterrupt(CPUTIMER2_BASE); Interrupt_enable(INT_TIMER2); /**Start timer for interrupt CAN (to send frames)*/ CPUTimer_startTimer(CPUTIMER0_BASE); /**Start timer for precharge step (to measure precharge voltage when timer is reached)*/ CPUTimer_startTimer(CPUTIMER1_BASE); /**Start timer for regulation interrupt*/ CPUTimer_startTimer(CPUTIMER2_BASE);
谢谢!
Damien