This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/MSP430G2553: Can't read data i2c with AD5933

Part Number: MSP430G2553
Other Parts Discussed in Thread: TMP100

Tool/software: TI C/C++ Compiler

Hello,

I am making a C program to interface an AD5933 with the MSP430G2553 microcontroller. And I put an example I found reading that it sends AD5933 and stores it in a variable. When I run the code and go to see the variable what value it gets it gets nothing and gives me an error see image. If anyone can help me please.
And sorry for my English.

Code :

#include <msp430.h>

volatile unsigned char RXData;

int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P1SEL |= BIT6 + BIT7; // Assign I2C pins to USCI_B0
//P1SEL2|= BIT6 + BIT7; // Assign I2C pins to USCI_B0
UCB0CTL1 |= UCSWRST; // Enable SW reset
UCB0CTL0 = UCMODE_3 + UCSYNC; // I2C Slave, synchronous mode
UCB0I2COA = 0x0D; // Own Address is 0x0D
UCB0CTL1 &= ~UCSWRST; // Clear SW reset, resume operation
IE2 |= UCB0RXIE; // Enable RX interrupt

while (1)
{
__bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts
__no_operation(); // Set breakpoint >>here<< and read
} // RXData

}

// USCI_B0 Data ISR
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector = USCIAB0TX_VECTOR
__interrupt void USCIAB0TX_ISR(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(USCIAB0TX_VECTOR))) USCIAB0TX_ISR (void)
#else
#error Compiler not supported!
#endif
{
RXData = UCB0RXBUF; // Get RX data
__bic_SR_register_on_exit(CPUOFF); // Exit LPM0

}