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.

官方例子的问题



在 f28035的官方例子cpu_timer中有一点没看明白,请教TI高手:

1、在cpu_timer中使用了TIMER0 /TIMER1 /TIMER2三个CPU定时器,分别使用了定时器中断。

2、在使能PIE中断时,仅只有一句使能了TINT0中断的指令:

                         PieCtrlRegs.PIEIER1.bit.INTx7 = 1;

      并没有对TINT1  /   TINT2  在PIE控制寄存器中使能响应中断,那么TINT1/TINT2是怎么进入中断的呢?

  • Lzh,

    PIE中断扩展模块只是用INT1-12,INT13和14并没有经过PIE模块,直接由CPU timer1 和timer2直接连到CPU级别中断使能:

    // Enable CPU int1 which is connected to CPU-Timer 0, CPU int13 // which is connected to CPU-Timer 1, and CPU int 14, which is connected // to CPU-Timer 2:  

    IER |= M_INT1;   

    IER |= M_INT13;   

     IER |= M_INT14;

     这里CPU级别中断使能后,就已经使能了这两个中断了。

    -Eric