MSP430G2553 Interrupt Handler Error

Hey guys, I am currently trying to program an msp430(http://www.componentschip.com/details/Texas-Instruments/MSP430G2553IN20.html)
and need to use Timer A0. Basically, when I use the line __bis_SR_register( GIE ); nothing works (obviously because the GIE is not enabled); however, if I do have it I get stuck in isr_trap.asm which I believe means I do NOT have an interrupt service routine for what I have. I believe I did add this, however. Anyone have suggestions? I attached my code below. There are a lot of edits to be done, but you can see the middle section where the main stuff happens.
include <msp430g2553.h>
include <msp430.h>
include <intrinsics.h>
include <stdint.h>
include <string.h>
include "heartrate_3.h"

//#include "resources.h"
define I2C_SCL BIT6 // Serial Data line
define I2C_SDA BIT7 // Serial Clock line
define SL_ADDRESS 0x58
define WHO_AM_I 0x58
define GSCALE 2
define CTRL_REG1 0x2A
define OUT_X_MSB 0x01
define XYZ_DATA_CFG 0x0E

void init_i2c(void); void Write( uint8_t CommandByte, uint8_t Data1, uint8_t Data2, uint8_t Data3); uint32_t Receive(char registerAddr ); void system_setup( void ); int printc(int c); void print(char *s); void printh(int h); void ConfigTimerA(unsigned int delayCycles);

int flag =0; int flag2=0; char hexVal[4];

//latch = BIT 4 in 1D;

int main(void) {

WDTCTL = WDTPW + WDTHOLD; //stopwatchdog
DCOCTL = 0; // Select lowest DCOx and MODx settings

//Calibrate DCO for 8MHz operation

BCSCTL1 = CALBC1_1MHZ;
DCOCTL = CALDCO_1MHZ;

//Local Declarations
uint8_t address = 0x58;
uint8_t current = 63;

// Configure P1.1 and P1.2 as uart controlled pins
/*
P1DIR &= ~(BIT1 | BIT2);
P1SEL = BIT1 | BIT2; // P1.1=RXD, P1.2=TXD
P1SEL2 = BIT1 | BIT2; // P1.1=RXD, P1.2=TXD


//Setup UCA for UART
UCA0CTL1 |= UCSSEL_2; // SMCLK
UCA0BR0 = 104; // 1MHz 9600 = 104 19200 = 52 4MHz 9600 = 416 8MHz 9600 = 833
UCA0BR1 = 0; // 1MHz 9600
UCA0MCTL = UCBRS0; // Modulation UCBRSx = 1
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine*
*/

init_i2c(); //setup i2c
system_setup(); // GPIO / HeartRate 3 / UART / I2C Setups
initStatHRM(); // Initializes values to 0

ConfigTimerA(25000); //this function is for the settings for TimerA and for setting the pins P2.0

//__enable_interrupt();


__bis_SR_register( GIE ); // establish GIE for interupts


while(1)
{


uint8_t rate = hr3_get_heartrate();
statHRMAlgo( hr3_get_led1_amb1_val());


if (rate > 103) { //this part of the code will continue to pull the information and check it against the timer
TACTL |= MC_1; //if the rate is less than the 103 range, then the timer will be turned off (MC_0 mode).


if (rate <= 85){
TACTL |= MC_0;
}
} // end of while(rate > 103) loops




}
//printc(rate);

}

//port 1 interrupt breaking it?

#pragma vector=TIMERA0_VECTOR
__interrupt void Timer_A (void)
{

P1OUT ^= BIT1; //toggle LED/vibration motor
// P1IFG = 0x00; //Clear flags
//TACTL &= ~TAIFG;
}

void init_i2c(void){

P1SEL |= BIT6 + BIT7; // Assign I2C pins to USCI_B0
P1SEL2|= BIT6 + BIT7; // Assign I2C pins to USCI_B0
//USICTL1 |= 0x40; //Setting Bit 6 (USII2C) to enable i2c
UCB0CTL1 |= UCSWRST; // Enable SW reset
UCB0CTL0 = UCMST + UCMODE_3 + UCSYNC; // I2C Master, synchronous mode
UCB0CTL1 = UCSSEL_2 + UCSWRST; // Use SMCLK, keep SW reset
UCB0BR0 = 80; // fSCL = 8MHz/80 = ~100kHz
UCB0BR1 = 0;
UCB0I2CSA = SL_ADDRESS; //assign slave

UCB0CTL1 &= ~UCSWRST; // Clear SW reset, resume operation
IE2 |= UCB0RXIE + UCB0TXIE; // Enable RX and TX interrupt

}

void Write(uint8_t CommandByte, uint8_t Data1, uint8_t Data2, uint8_t Data3) {

while (UCB0CTL1 & UCTXSTP); // Ensure stop condition got sent
UCB0CTL1 |= UCTR + UCTXSTT; // I2C TX, start condition

UCB0I2CSA = SL_ADDRESS; //assign slave

while((IFG2 & UCB0TXIFG) == 0);
UCB0TXBUF = CommandByte;

while((IFG2 & UCB0TXIFG) == 0);
UCB0TXBUF = Data1;

while((IFG2 & UCB0TXIFG) == 0);
UCB0TXBUF = Data2;

while((IFG2 & UCB0TXIFG) == 0);
UCB0TXBUF = Data3 ;

while((IFG2 & UCB0TXIFG) == 0);
UCB0CTL1 |= UCTXSTP; // I2C stop condition

}

uint32_t Receive(char registerAddr) {

uint32_t receivedByte1 = 0;
uint32_t receivedByte2 = 0;
uint32_t receivedByte3 = 0;
uint32_t receivedByte4 = 0;

while (UCB0CTL1 & UCTXSTP); // Ensure stop condition got sent
UCB0CTL1 |= UCTR + UCTXSTT; // I2C TX, start condition

UCB0I2CSA = SL_ADDRESS; //assign slave

while (UCB0CTL1 & UCTXSTP); // Ensure stop condition got sent

while ((IFG2 & UCB0TXIFG) == 0); //UCB0TXIFG is set
UCB0TXBUF = registerAddr; //Write registerAddr in TX buffer

/* while ((IFG2 & UCB0TXIFG) == 0); //UCB0TXIFG is set UCB0TXBUF = 0x00; //Write registerAddr in TX buffer

while((IFG2 & UCB0TXIFG) == 0);
UCB0TXBUF = 0x00;

while((IFG2 & UCB0TXIFG) == 0); UCB0TXBUF = 0x00;

while((IFG2 & UCB0TXIFG) == 0); //write reg_read=0 UCB0TXBUF = 0x01; */

while ((IFG2 & UCB0TXIFG) == 0); // wait until TX buffer is empty and transmitted
UCB0CTL1 &= ~UCTR; // Clear I2C TX flag for receive
UCB0CTL1 |= UCTXSTT; // I2C start condition with NACK for reading

while (UCB0CTL1 & UCTXSTT); // Start condition sent? RXBuffer full?
//UCB0CTL1 |= UCTXSTP; //stop? Do we need more of these

UCB0I2CSA = SL_ADDRESS; //assign slave

while ((IFG2 & UCB0RXIFG) == 0); // wait until TX buffer is empty and transmitted
receivedByte1 = UCB0RXBUF; // I2C stop condition


while ((IFG2 & UCB0RXIFG) == 0); // wait until TX buffer is empty and transmitted
receivedByte2 = UCB0RXBUF; // I2C stop condition


while ((IFG2 & UCB0RXIFG) == 0); // wait until TX buffer is empty and transmitted
receivedByte3 = UCB0RXBUF; // I2C stop condition

UCB0CTL1 |= UCTXSTP; // I2C stop condition
while (UCB0CTL1 & UCTXSTP); // Ensure stop condition got sent


uint32_t receivedByte1add = receivedByte1 << 16;
uint32_t receivedByte2add = receivedByte2 << 8;
uint32_t receivedByte3add = receivedByte3;
uint32_t receivedByteADD = receivedByte1add + receivedByte2add + receivedByte3add + receivedByte4 ;

return receivedByteADD;

}

/* void ExtInt() iv IVT_INT_EXTI15_10 ics ICS_AUTO { EXTI_PR.B10 = 1; // clear flag int_count++; statHRMAlgo( hr3_get_led1_amb1_val() ); // Give led1 ambient value to heartrate function. ( 100 times a second ) } */

void system_setup( void ) { //Local Declarations char text[40] = { 0 };

dynamic_modes_t dynamic_modes;
uint8_t address = 0x58;
//Set up dynamic modes for Heart Rate 3 Initialization
dynamic_modes.transmit = trans_dis; //Transmitter disabled
dynamic_modes.curr_range = led_double; //LED range 0 - 100
dynamic_modes.adc_power = adc_on; //ADC on
dynamic_modes.clk_mode = osc_mode; //Use internal Oscillator
dynamic_modes.tia_power = tia_off; //TIA off
dynamic_modes.rest_of_adc = rest_of_adc_off; //Rest of ADC off
dynamic_modes.afe_rx_mode = afe_rx_normal; //Normal Receiving on AFE
dynamic_modes.afe_mode = afe_normal; //Normal AFE functionality


//Toggle Reset pin
/*
RST = 0;
Delay_us(50);
RST = 1;
Topic archived. No new replies allowed.