My CPU timer 1 stops after 6 seconds . The configuration is below:
* @brief The system clock is initialized to run at 100MHz
* @brief Generates an interrupt of 1s
* @extract
*/
void timer::InitTimer1 (void)
{
Interrupt_register(INT_TIMER1, &timer::ISRTimer1);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TIMER1);
CPUTimer_setPeriod (CPUTIMER1_BASE, TIMER1_PERIOD);
CPUTimer_setPreScaler (CPUTIMER1_BASE, TIME1_CPUTIMER_PRESCALER);
CPUTimer_stopTimer(CPUTIMER1_BASE);
CPUTimer_reloadTimerCounter(CPUTIMER1_BASE);
CPUTimer_setEmulationMode(CPUTIMER1_BASE, CPUTIMER_EMULATIONMODE_STOPAFTERNEXTDECREMENT);
CPUTimer_clearOverflowFlag(CPUTIMER1_BASE);
/**< enable interrupt of the timer */
CPUTimer_enableInterrupt(CPUTIMER1_BASE);
/**< enable cpu interrupt number 13 for the timer 1 interrupt */
Interrupt_enable(INT_TIMER1);
/**< start timer */
CPUTimer_startTimer(CPUTIMER1_BASE);
}
#define TIME1_CPUTIMER_PRESCALER (uint16_t)9999
#define TIMER1_PERIOD (uint32_t)9999
After running for 6 seconds i get a
Break at address "0x3fb02a" with no debug information available, or outside of program code.
However when use lower values like below, it works just fine
#define TIME1_CPUTIMER_PRESCALER (uint16_t)624
#define TIMER1_PERIOD (uint32_t)500
Please, what can be the problem and what can be the solution?