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.

EZ430-RF2560

Other Parts Discussed in Thread: CC2560

I want to see if I can send a HCI command to my 2560 using the EZ430 usb kit.  My understanding is I need to setup UART 2, power the cc2560, Send a HCI reset, on any return data I want to turn on an LED just as a test to see something is working.  My LED isn't turning on... I think I am not powering the cc2560 correctly but I don't know how to verify that.

Setup the LEDs

P1DIR |= 0x01;
P1DIR |= 0x02;

Setup UART 2 to 115200 8n1.  I have done this and I can see data on J2.

P9SEL = 0x30;                             // P9.4,5 = USCI_A2 TXD/RXD
P1SEL = 0x18; // P1.3,4 = USCI_A2 RTC/CTS


UCA2CTL1 |= UCSWRST; // **Put state machine in reset**
UCA2CTL1 |= UCSSEL_2; // Clock Source: SMCLK

UCA2BR0 = 0x09; // 1MHz 115200 (see User's Guide)
UCA2BR1 = 0x00; //
UCA2MCTL = UCBRS_1+UCBRF_0; // Modulation UCBRSx=1, UCBRFx=0

UCA2CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
UCA2IE |= UCRXIE; // Enable USCI_A2 RX interrupt
// Echo back RXed character, confirm TX buffer is ready first
#pragma vector=USCI_A2_VECTOR
__interrupt void USCI_A2_ISR(void)
{
switch(__even_in_range(UCA2IV,4))
{
case 0:break; // Vector 0 - no interrupt
case 2: // Vector 2 - RXIFG
P1OUT |= 0x02; //Turn on led

break;
case 4:break; // Vector 4 - TXIFG
default: break;
}
}

Power on the cc2560.  I don't know how I can verify I am doing this correctly.  I am doing the following

//setup the clock on p2.6
P2SEL |= 0x40;

//set up port p2.7 for power
P2DIR |= 0x80; //set up as output

Send my HCI reset command

while (!(UCA2IFG&UCTXIFG));
UCA2TXBUF = 0x01;

while (!(UCA2IFG&UCTXIFG));
UCA2TXBUF = 0x0c;

while (!(UCA2IFG&UCTXIFG));
UCA2TXBUF = 0x03;

while (!(UCA2IFG&UCTXIFG));
UCA2TXBUF = 0x00;
  • I am still working on this problem... but I now know I can talk to the cc2560 via the msp430... when hooked up to the battery pack.  My problem is/was that when the device is hooked up to the USB controller/programmer I can talk to the msp via uart port 3, LEDs work, I can even send messages to the cc2560 via uart port 2.  However the cc2560 will not respond.  I can't tell if it even has power.  When I have the device hookup to the battery pack the cc2560 responds perfectly.  The limited diagrams I have only shows the cc2560 having connections to the msp430.  I was assuming that if everything on the msp430 was working when connected to the usb programmer the cc2560 would too.  That is not the case.  I am new to embedded development so this might not be news to everyone else... but maybe this will save another newbee some time.

  • The current the programmer can provide is limited to <100mA. Teh CC2560, when sending, may consume significantly more. Also maybe on power-up. It's possible that the programmer power supply is simply not powerful enough. The MSP and its brownout circuit will restart once voltage has stabilized (the current peak is over), so it responds. But the CC has crashed already.

    Just a guess.

**Attention** This is a public forum