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.

CC2500 Read Register

Other Parts Discussed in Thread: MSP430F2471, CC2500, CC1101

Hey Guys,

I'm trying to read a single register (Part Number wich is adressed as 0x30) from the CC2500 using a msp430f2471 but i keep getting the value 0x0F in the BUFFER.

int main(void)
{

WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P1DIR |= 0x01; // P1.0 output
P3SEL |= 0x0E; // P3.3,2,1 USCI_B0 option select
P3DIR |= 0x11; // P3.1,0 as output direction
UCB0CTL0 |= UCMSB + UCMST + UCSYNC +UCCKPH; // 3-pin, 8-bit SPI mstr, MSB 1st
UCB0CTL1 |= UCSSEL_2; // SMCLK
UCB0BR0 = 0x02;
UCB0BR1 = 0;
UCB0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**

char x;
P3OUT &= ~0x01; // Enable CS
while (!(IFG2 & UCB0TXIFG)); // USCI_B0 TX buffer ready?
UCB0TXBUF = (0x30 | 0xC0); // Send reg address
while (!(IFG2 & UCB0TXIFG)); // Wait for TXBUF ready
UCB0TXBUF = 0;
while (UCB0STAT & UCBUSY); // Wait for SPI done
x = UCB0RXBUF;
P3OUT |= 0x01; // Disable CS
return x;
}

Can you help me?

Thanks

Daniel Zurita