#include "mcom_runtime/gic.h" #include "mcom_runtime/utimers.h" #include "mcom_runtime/mcom02.h" int Flag_Corr = 0; void timer2_interrupt_handler(int id) { disableUTimer(2); Flag_Corr = 1; } int main(void) { Flag_Corr = 0; risc_initialize_gic(); risc_enable_interrupt(TIMER_INTR2, GIC_PL390_TARGET_CPU0, 0xF1); risc_register_interrupt(&timer2_interrupt_handler, TIMER_INTR2, 0); initUTimer(2, 0xFFFFFFF, 1); while(Flag_Corr != 1); return 0; }