Hello all, what I am trying to do is that to observe the exact time intervals for the watchdog timer in MSP430, but no matter which clock I choose I can't get the same results I calculated by hand.
Code C - [expand]
1
2
3
4
5
6
7
8
9
#pragma vector = PORT1_VECTOR
__interrupt void PORT1_ISR(void){
P1OUT = LED;
BCSCTL3 |= LFXT1S_2;//Auxiliry Clock is chosen which is 12kHz
WDTCTL = WDT_ARST_1000;//According to Msp430 instructions for ACLK(32 KHZ) WDT_ARST_1000(1000ms) so for 12kHz it must be 2.6 seconds
P1IFG =0x00;}
for example by this interrupt I expect LED to turn off 2.6 seconds just after the button is pushed but takes more than that, I tried some other examples using the submain clock it is same again I can't get theoretical results. What may cause this, or is there something else I should take into consideration, thank you?