Other Parts Discussed in Thread: MSP-FET, MSP430WARE
Tool/software: Code Composer Studio
I'm using MSP430G2553 to learn embedded system. When I write a code to blink led in "while(1)" loop it keeps running even if I terminate the debugging. But when I use the timer peripheral to do the same thing it doesn't keep running when I terminate the debugging. What is it causing? I want to learn. My code is below which doesn't keep running when it is terminated.
#include <msp430g2553.h>
#define GREEN_LED BIT0 // Port 1.0
void main (void) {
WDTCTL = WDTPW + WDTHOLD;
TA0CCR0 = 65000;
TACTL = TASSEL_1 + MC_1;
P1DIR |= GREEN_LED;
while(1){
if (TACTL & TAIFG) {
P1OUT |= GREEN_LED;
_delay_cycles(20000);
TACTL = TACTL & (~TAIFG);
}
P1OUT &= ~GREEN_LED;
}
}