Part Number: MSP432P401R
Hello guys,
I am new to arm microcontrollers. and TI. I have an MSP432 launchpad and I wrote a piece of code myself, to blink an led after specific intervals. when debugging, the TAIFG remains set. The LED turn on all the time. Where I wrong ?
#include "msp432.h" int main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT TA0CCTL0 = CCIE; // CCR0 interrupt enabled TA0CTL = TASSEL_2 + MC_1 + ID_3 + TAIE; // SMCLK/8, upmode TA0CCR0 = 10000; // 12.5 Hz P1OUT &= 0x00; // Shut down everything P1DIR &= 0x00; P1DIR |= BIT0 + BIT6; // P1.0 and P1.6 pins output the rest are input while(1) //Loop forever, we work with interrupts! { while(TAIFG != 1); TA0CCR0 = 10000; TA0CTL += (~TAIFG); P1OUT ^= 0x01; } return 0; }