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.

Can not create timer-interrupt with the C6416 Cycle Accurate Simulator?

Hi friends, I'm a newbie with TI DSP, maybe it is very simple with you, but I also tried many solutions, but I haven't been successful. I want to create timer-interrupt. The timer2 works normally, but the interrupt doesn't occur (even through IRQ_test return 1). It seems that, I don't register the interrupt successful. Please help me to check what the problem is? Thank you very much This is my source code: //---------------------------------------------- int check = 0; void timerIsr(Uint32 funcArg, Uint32 eventId) { printf("No"); check = 1; } void main() { TIMER_Handle hTimer; int count = 0; TIMER_Config MyConfig = { 0x000002C0, /* ctl */ 0x00010000, /* prd */ 0x00000000 /* cnt */ }; IRQ_Config MyIrqConfig = { timerIsr, 0x00000000, IRQ_CCMASK_DEFAULT, IRQ_IEMASK_DEFAULT }; IRQ_map(IRQ_EVT_TINT2, 6); IRQ_globalEnable(); IRQ_config(IRQ_EVT_TINT2, &MyIrqConfig); hTimer = TIMER_open(TIMER_DEV2, 0); TIMER_config(hTimer,&MyConfig); TIMER_start(hTimer); IRQ_enable(IRQ_EVT_TINT2); count = IRQ_test(IRQ_EVT_TINT2); while (check != 1) { } printf("Pass"); }
  • Your source code is not easy to read without the line formatting. Can you improve the line formatting for this view of the source?

    Not all simulators support the timer. Which exact simulator and which version of CCS are you using? In the comments with each simulator, it will list all of the components that are modeled; check if the timer is included.