Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Hi, I'm using the MSP430G2553. My code below is supposed to toggle pin1.5 based on Timer1. It works fine when I am in debug mode, but if I exit debug and hit the reset button on the launchpad, it doesn't toggle pin1.5 (as per my coding requests). I was wondering why my Timer1 interrupts does not fire if I am not in debug mode? /* * main.c */ #include "msp430g2553.h" static int TESTSWITCH = BIT3; void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT BCSCTL1 = CALBC1_8MHZ; DCOCTL = CALDCO_8MHZ; P1DIR &= ~TESTSWITCH; P1OUT |= TESTSWITCH; P1REN |= TESTSWITCH; //Enable internal pull up register P1IES |= TESTSWITCH; P1IFG &= ~TESTSWITCH; P1IE |= TESTSWITCH; //Enable switches for interrupts P1DIR |= BIT5; P1OUT &= ~BIT5; TA1CCR0 = 6000; // Count limit (16 bit) TA1CCTL0 = CCIE; // Enable counter interrupts, bit 4=1 TA1CTL = TASSEL_1 + MC_1; __bis_SR_register(LPM0_bits + GIE); // Enter LPM0, interrupts enabled } #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) { P1IE &= ~TESTSWITCH; P1OUT ^= BIT5; P1IFG &= ~TESTSWITCH; P1IE |= TESTSWITCH; } #pragma vector=TIMER1_A0_VECTOR // Timer1 A0 interrupt service routine __interrupt void Timer1_A0(void) { P1OUT ^= BIT5; }
  2. Hello, I just recently discovered energia. I really love how energia has simple functions for stuff like analog write, etc. But I was wondering how to to use these functions on code composer studio? Thanks, Mike
  • Create New...