EALLOW; // This is needed to write to EALLOW protected registers
PieVectTable.TINT0 = &cpu_timer0_isr;//timer0中断服务子程序重定位
EDIS; // This is needed to disable write to EALLOW protected registers
IER |= M_INT1; // EV Interrupt
IFR &= 0x0000; //Clear all interrupt flag
// Enable TINT0 in the PIE: Group 1 interrupt 7
PieCtrlRegs.PIEIER1.bit.INTx7 = 1;
//SetDBGIER(IER); // Configure the DBGIER for realtime debug
EINT; // Enable global interrupts and realtime debug
//asm(" CLRC INTM, DBGM");
StartCpuTimer0();
/*** Main Cycle ***/
while(1)
{
;
}
}// End of main