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.

cc1120 source code wont compile

Other Parts Discussed in Thread: MSP430G2553

i have the cc1120EM's and i placed them in the connectors for the msp-exp430F5438.  i downloaded the sorce code with .h and .c files (swrc253d and swrc219) and created a project without a main and coppied all files into that project.  it wont compile and gives me about 150 errors first of which are .h files that are not there.  is there anyway to get this example project to work?

  • Do you use IAR? If so, download one of the software examples from the web and start from this. Then you have all required includes and a correct project setup. Then start to remove/ modify one thing at the time. It is normally much faster to start from a know good state than starting from scratch.

  • I dont normally use IAR i only have experience using code composer and making a project and going from there.  when i copied the example software swrc 219 and 253 i moved all the .h and .c files over and it wouldnt build it was missing (amongst other errors) some .h files.  not sure what im doing wrong.

  • that seems to be more for the msp430g2553 which i have at home but i was wanting to get something working on the experiment board.  lately iv started writing my own code trying to get it to work.   

    does anyone know or understand better then me how to 

    also i have been using imported register settings from the ti's smart rf program coppied and pasted into a function i wrote just to configure the radio's

    1. wright to the tx fifo ? iv been putting it into tx mode then trying a small transmit function i wrote

    void transmit(void)
    {
    int i = 0;


    TXByteCtr = 6;
    RF_PORT_OUT &= ~RF_SPI_CS;
    while (UCB0STAT & UCBUSY);

    UCB0TXBUF = 0x7E; // direct fifo access wright
    while (UCB0STAT & UCBUSY);
    x = UCB0RXBUF; // get check status byte
    while (UCB2STAT & UCBUSY);

    UCB0TXBUF = 0x01; // first fifo address
    while (UCB2STAT & UCBUSY);

    while(TXByteCtr != 0)
    {

    UCB0TXBUF = TxData[i]; // Load TX buffer
    TXByteCtr--;
    i++;
    }


    RF_PORT_OUT |= RF_SPI_CS;
    }

    over the logic analyser it seems to go send just fine returning a byte with every bite i send.

    first byte is 0x2F (thats retured) indicating its still in tx mode next one is 0x00 which im sending a 0x01. then the rest are the 0x2F again......   so correct me if im doing something wrong and should i be doing more to get it to transmit? my understanding is that when written to the tx fifo while in tx mode it then transmits the pack.

    also in my receive program i so far have been just consistently checking the rx fifo with

    void recieve(void)
    {
    int i;
    RXByteCtr = 9;


    RF_PORT_OUT &= ~RF_SPI_CS;
    while (UCB2STAT & UCBUSY);

    UCB2TXBUF = 0xFF;
    while (UCB2STAT & UCBUSY);
    x = UCB2RXBUF;

    while (UCB2STAT & UCBUSY);

    UCB2TXBUF = 0x01;
    while (UCB2STAT & UCBUSY);
    for(i = 0; i <= RXByteCtr; i++ )
    {
    UCB2TXBUF = i+1;
    // UCB2TXBUF = i; // try this not in burst FF aka BF
    while (UCB2STAT & UCBUSY);
    RxData[i] = UCB2RXBUF;

    while (UCB2STAT & UCBUSY);

    }
    RF_PORT_OUT |= RF_SPI_CS;

    }

    address is 0xFF which returns a 0x10 so it is in receive mode then it always returns zeros which is expected if nothing has been received yet however when i check the status afterwords its always 0x6F which means i have a rx fifo under/over flow what am i doing wrong over all that you guys can point out?

  • I have given you a link to a CCS project which should get you started on which files to include and compile switches.

    Next, look at the easylink example here: http://www.ti.com/lit/zip/swrc253 which show you exactly how to send a packet etc.

  • ok so can you tell me what i need to do to get it started aka with what i have what files do i need to add to the project and my main to have a transmitter and same for a reciever

  • Basically i need to know what files i need to add to a project to have a transmitter and a receiver.   when i tryed to copy some files over to the project there was even a .c file that needed a header file that was no where in the download what so ever.  if i could get some guidance on which files to add for each i can take it from there and tweak it to my application.   any help would be greatly appreciated.