I have a project that is using the C6672. I have a timer interrupt running at 10 uS. Everything works properly when I'm running my code through the CCS debugger. When I write my program into an SPI Flash and boot normally, the system appears to hang.
If I don't setup my timer interrupt, the rest of the code runs properly when booting from flash. If I then setup the timer again, things hang.
If the timer never worked, even under the debugger, I would keep digging and hope to find where my bug was, but with it working under the debugger, but not when I boot from flash, I'm guessing the gel setup does something extra that I'm not doing for myself that allows the interrupts to work properly.
I'm using the standard C6678 gel file when debugging. Is there something interrupt specific that the gel file does during Global Default Setup that I need to add to my timer setup? I'm configuring the PLL the same way the gel file does.
My timer setup code does the following:
CSL_intcInit (&intcContext);
CSL_intcGlobalNmiEnable ();
CSL_intcGlobalEnable (&state);
CSL_tmrInit (NULL);
memset (&TmrObj, 0, sizeof (CSL_TmrObj));
vectId = CSL_INTC_VECTID_13;
tmrIntcHandle = CSL_intcOpen(&tmrIntcObj, CSL_GEM_TINTHN, &vectId, NULL);
EventRecord.handler = (CSL_IntcEventHandler) &TimerInterruptHandler;
EventRecord.arg = (void *) CSL_GEM_TINTLN;
CSL_intcPlugEventHandler (tmrIntcHandle, &EventRecord);
CSL_intcHwControl (tmrIntcHandle, CSL_INTC_CMD_EVTENABLE, NULL);
hTmr = CSL_tmrOpen (&TmrObj, IntcInstance, NULL, &status);
CSL_tmrHwSetup (hTmr, &hwSetup);
CSL_tmrHwControl (hTmr, CSL_TMR_CMD_RESET_TIMHI, NULL);
hwSetup.tmrTimerMode = CSL_TMR_TIMMODE_DUAL_UNCHAINED;
CSL_tmrHwSetup (hTmr, &hwSetup);
status = CSL_tmrHwControl (hTmr, CSL_TMR_CMD_LOAD_PRDHI, (void *) &LoadValue);
CSL_tmrHwControl (hTmr, CSL_TMR_CMD_START_TIMHI, (void *) &TimeCountMode);