Timer1 Question
Posted: Mon Jul 21, 2014 8:55 pm
I am running a SuperPro. the code is written in 'C'. I use Timer1 to capture a generate an interrupt.
Can I set a match value so it will generate an interrupt as a watchdog, if Timer1 goes beyond a certain count?
T1_PR = 0; //Set Prescale Register so TC will increment at the full clock rate
T1_CTCR = 0; //Set Timer Mode & Select CAPn.0 for Capture pin
T1_CCR = 5; //Set Capture Control Register for rising edge and generate Interrupt
T1_TCR = 2; //Reset Timer 1
T1_TCR = 1; //Enable Timer 1
Can I set a match value so it will generate an interrupt as a watchdog, if Timer1 goes beyond a certain count?
T1_PR = 0; //Set Prescale Register so TC will increment at the full clock rate
T1_CTCR = 0; //Set Timer Mode & Select CAPn.0 for Capture pin
T1_CCR = 5; //Set Capture Control Register for rising edge and generate Interrupt
T1_TCR = 2; //Reset Timer 1
T1_TCR = 1; //Enable Timer 1