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.

MSP430FR5728 interfacing with CC110L made easy? Not using Booster pack

Other Parts Discussed in Thread: CC110L, CC1101, MSP430FR5728, MSP430FR5969

I am attempting to create a wireless receiver for my project, so that my MCU will be able to act according to what the user wishes for it to do.  After significant research, I came up with that the CC110L would be an ideal choice for my project to work.  However, what I did not know was that most, if not all, of the examples and details of using the CC110L relate solely to the booster pack attachment for launchpads.


I have purchased a set of the launchpads for use, and have been looking through the examples and files that came with the CD.  However, I still feel like I am at a loss when it comes to making the project actually work properly.

I searched further on the internet, and found a rather interesting tutorial that I hoped would help me to create a program for my project.  The tutorial in question can be found here and is quite interesting when you read through it.  I am running the devices in SPI mode, however the tutorial also discusses using UART mode and I am not sure why it does this as it appears to only be using SPI.  However, my code would get stuck when trying to transmit from one device to the other (shown below)

// Transmitter
void TXPacket(char *Buffer, char size){         
  P2IE &= ~(BIT4);                              // disable interrupt
  SPIBurstW(CC110L_TXFIFO, Buffer, size);       // Write TX data
  StrobeSPI(CC110L_STX);                        // change state to TX, data transfer

// SOURCE OF ERROR
while(!(P2IN & BIT4)); // wait for GDO0 to go high, sync'd TX

// CANT GO PAST ABOVE LINE
while (P2IN & BIT4); // wait for GDO0 to clear, end of packet P2IFG &= ~(BIT4); // after TX, flag is set P2IFG &= ~(BIT4); P2IE |= (BIT4); // enable interrupt }

I am also aware that others have posted help requests, and many of them seem to lead back to this file.  But I still do not fully understand how it is working.

As such, I'm posting this here in the hopes that someone may be able to suggest a simple command sequence that I could use for transmitting and receiving packets of data similar to the first tutorial I linked.  If anyone has any suggestions on what I could do, or why the code segment I linked above would freeze, I would greatly appreciate anything that people could suggest for me to use/look at.

Thank you

  • Hi Chris,

    Would you mind posting the rest of your code? 

    It appears that the source of the problem is the CC110L...

  • Chris,
    I've moved your thread to the LPRF Tools Forum. I think you'll be able to get faster help there, due to the nature of the problem being the CC110L.

    Do still post your code if able. You may also want to detail your system, you say that you're not using a booster pack, but the tutorial seems to be intended for one.

    Best regards,
    Cameron
  • Below is the code related to the transmitter that my device would use.  I based it mostly on the tutorial that I found and linked in my initial post.

    #include "string.h"
    #include "msp430.h"
    #include <stdio.h>
    
    /***************************************************
                Definitions + Characters
    ***************************************************/
    
    // Configuration Registers for CC110L
    #define CC110L_IOCFG2       0x00        // GDO2 output pin configuration
    #define CC110L_IOCFG1       0x01        // GDO1 output pin configuration
    #define CC110L_IOCFG0       0x02        // GDO0 output pin configuration
    #define CC110L_FIFOTHR      0x03        // RX FIFO and TX FIFO thresholds
    #define CC110L_SYNC1        0x04        // Sync word, high byte
    #define CC110L_SYNC0        0x05        // Sync word, low byte
    #define CC110L_PKTLEN       0x06        // Packet length
    #define CC110L_PKTCTRL1     0x07        // Packet automation control
    #define CC110L_PKTCTRL0     0x08        // Packet automation control
    #define CC110L_ADDR         0x09        // Device address
    #define CC110L_CHANNR       0x0A       
    #define CC110L_FSCTRL1      0x0B        // Frequency synthesizer control
    #define CC110L_FSCTRL0      0x0C        // Frequency synthesizer control
    #define CC110L_FREQ2        0x0D        // Frequency control word, high byte
    #define CC110L_FREQ1        0x0E        // Frequency control word, middle byte
    #define CC110L_FREQ0        0x0F        // Frequency control word, low byte
    #define CC110L_MDMCFG4      0x10        // Modem configuration
    #define CC110L_MDMCFG3      0x11        // Modem configuration
    #define CC110L_MDMCFG2      0x12        // Modem configuration
    #define CC110L_MDMCFG1      0x13        // Modem configuration
    #define CC110L_MDMCFG0      0x14        // Modem configuration
    #define CC110L_DEVIATN      0x15        // Modem deviation setting
    #define CC110L_MCSM2        0x16        // Main Radio Cntrl State Machine config
    #define CC110L_MCSM1        0x17        // Main Radio Cntrl State Machine config
    #define CC110L_MCSM0        0x18        // Main Radio Cntrl State Machine config
    #define CC110L_FOCCFG       0x19        // Frequency Offset Compensation config
    #define CC110L_BSCFG        0x1A        // Bit Synchronization configuration
    #define CC110L_AGCCTRL2     0x1B        // AGC control
    #define CC110L_AGCCTRL1     0x1C        // AGC control
    #define CC110L_AGCCTRL0     0x1D        // AGC control
    #define CC110L_WOREVT1      0x1E        // 
    #define CC110L_WOREVT0      0x1F        // 
    #define CC110L_WORCTRL      0x20        // 
    #define CC110L_FREND1       0x21        // Front end RX configuration
    #define CC110L_FREND0       0x22        // Front end TX configuration
    #define CC110L_FSCAL3       0x23        // Frequency synthesizer calibration
    #define CC110L_FSCAL2       0x24        // Frequency synthesizer calibration
    #define CC110L_FSCAL1       0x25        // Frequency synthesizer calibration
    #define CC110L_FSCAL0       0x26        // Frequency synthesizer calibration
    #define CC110L_RCCTRL1      0x27        // 
    #define CC110L_RCCTRL0      0x28        // 
    #define CC110L_FSTEST       0x29        // 
    #define CC110L_PSTEST       0x2A        // 
    #define CC110L_AGCTEST      0x2B        // 
    #define CC110L_TEST2        0x2C        // Various test settings
    #define CC110L_TEST1        0x2D        // Various test settings
    #define CC110L_TEST0        0x2E        // Various test settings
    
    // Strobe commands
    #define CC110L_SRES         0x30        // Reset chip.
    #define CC110L_SFSTXON      0x31        // Enable/calibrate freq synthesizer
    #define CC110L_SXOFF        0x32        // Turn off crystal oscillator.
    #define CC110L_SCAL         0x33        // Calibrate freq synthesizer & disable
    #define CC110L_SRX          0x34        // Enable RX.
    #define CC110L_STX          0x35        // Enable TX.
    #define CC110L_SIDLE        0x37        // 
    #define CC110L_RESERVED     0x36        // Exit RX / TX
    #define CC110L_RESERVED1     0x38        // 
    #define CC110L_SPWD         0x39        // Enter pwr down mode when CSn goes hi
    #define CC110L_SFRX         0x3A        // Flush the RX FIFO buffer.
    #define CC110L_SFTX         0x3B        // Flush the TX FIFO buffer.
    #define CC110L_RESERVED2    0x3C        // 
    #define CC110L_SNOP         0x3D        // No operation.
    
    // Status registers
    #define CC110L_PARTNUM      0x30      // Part number
    #define CC110L_VERSION      0x31      // Current version number
    #define CC110L_FREQEST      0x32      // Frequency offset estimate
    #define CC110L_CRC_REG      0x33      // CRC OK
    #define CC110L_RSSI         0x34      // Received signal strength indication
    #define CC110L_MARCSTATE    0x35      // Control state machine state
    #define CC110L_RESERVED3     0x36      // 
    #define CC110L_RESERVED4     0x37      // 
    #define CC110L_PKTSTATUS    0x38      // Current GDOx status and packet status
    #define CC110L_RESERVED5     0x39      // 
    #define CC110L_TXBYTES      0x3A      // Underflow and # of bytes in TXFIFO
    #define CC110L_RXBYTES      0x3B      // Overflow and # of bytes in RXFIFO
    #define CC110L_NUM_RXBYTES  0x7F      // Mask "# of bytes" field in _RXBYTES
    
    // Other memory locations
    #define CC110L_PATABLE      0x3E
    #define CC110L_TXFIFO       0x3F
    #define CC110L_RXFIFO       0x3F
    
    //Masks for appended status bytes
    #define CC110L_LQI_RX       0x01        // Position of LQI byte
    #define CC110L_CRC_OK       0x80        // Mask "CRC_OK" bit within LQI byte
    
    // Definitions to support burst/single access:
    #define CC110L_WRITE_BURST  0x40
    #define CC110L_READ_SINGLE  0x80
    #define CC110L_READ_BURST   0xC0 
    
    
    
    #define PATABLE_VAL             (0xC0)
    #define LED_OUT                 (P2OUT)
    #define LED_GBIT                 7
    
    int n = 0x1111;         // Temperary storage of data
    
    int f = 0;              // number of failed transmissions
    char rec_ch;            // confirm packet sent
    
    char j;
    char l;
    
    char xx[2];
    
    
    // Characters related to Transmission use
    char yy[3];
    char starter[1];
    char zz[1];
    char y = 0;
    
    char results[4][35];     // Allow 4 sets of 32 bytes
                             // 128 Bytes total
    
    char Readout[10];
    char Notice[3];
    
    
    /***************************************************
                         SPI Code
    ***************************************************/
    
    void StrobeSPI(char strobe)
    {
      PJOUT &= ~(BIT0);                             // CS enable
      while((P2IN & BIT1));                         // Wait for chip ready, GDO2
      while (!(UCB0IFG & UCTXIFG));                 // Wait for TXBUF ready
      UCB0TXBUF = strobe;                           // Send strobe
                                                    // Strobe addr is now being TX'ed
      while (!(UCB0IFG & UCRXIFG));                 // Wait for TX to complete
      PJOUT |= BIT0;                                // CS disable
    }
    
    void SPIBurstW(char addr, char *buffer, char count){
      unsigned int i;
      PJOUT &= ~(BIT0);                             // CS enable
      while((P2IN & BIT1));                         // Wait for Chip Ready
      while (!(UCB0IFG & UCTXIFG));                 // Wait for TX Ready
      UCB0TXBUF = addr | CC110L_WRITE_BURST;        // Send Address
      for (i = 0; i < count; i++){
        while (!(UCB0IFG & UCTXIFG));               // Wait for TX Ready
        UCB0TXBUF = buffer[i];                      // Send data
      }
      while (UCB0STAT & UCBUSY);                    // Wait for TX complete
      PJOUT |= BIT0;                                // CS disable
    }
    
    char SPIStatusR(char addr){
      char status;
      PJOUT &= ~(BIT0);                             // CS enable
      while((P2IN & BIT1));                         // Wait for chip ready 
      while (!(UCB0IFG & UCTXIFG));                 // Wait for TX Ready
      UCB0TXBUF = (addr | CC110L_READ_BURST);       // Send address
      while (!(UCB0IFG & UCTXIFG));                 // Wait for TX Ready
      UCB0TXBUF = 0x01;                             // Dummy write so we can read data
      while (!(UCB0IFG & UCTXIFG));
      //while (UCB0STAT & UCBUSY);                    // Wait for TX to complete
      status = UCB0RXBUF;                           // Read data
      while(!(UCB0IFG & UCRXIFG));
      PJOUT |= BIT0;                                // CS disable
      return status;
    }
    
    char SPIReadReg(char addr){
      char t;
      PJOUT &= ~(BIT0);                             // CS enable
      while((P2IN & BIT1));                         // Wait for chip ready 
      while (!(UCB0IFG & UCTXIFG));                 // Wait for TX Ready
      UCB0TXBUF = (addr | CC110L_READ_SINGLE);      // Send address
      while (!(UCB0IFG & UCTXIFG));                 // Wait for TX Ready
      UCB0TXBUF = 1;                                // Dummy write so we can read data
      while (!(UCB0IFG & UCTXIFG));
      //while (UCB0STAT & UCBUSY);                    // Wait for TX to complete
      t = UCB0RXBUF;                                // Read data
      while(!(UCB0IFG & UCRXIFG));
      PJOUT |= BIT0;                                // CS disable
      return t;                                     // return read 
    }
    
    void SPIReadBurstReg(char addr, char *buffer, char count){
      char i;
      PJOUT &= ~(BIT0);                              // CS enable
      while((P2IN & BIT1));                         // Wait for chip ready 
      while (!(UCB0IFG & UCTXIFG));                 // Wait for TX Ready
      UCB0TXBUF = (addr | CC110L_READ_BURST);       // Send address
      while (!(UCB0IFG & UCTXIFG));                 // Wait for TX Ready
      for (i = 0; i < count; i++){
        UCB0TXBUF = 1;                              //Initiate next data RX, meanwhile..
        while (!(UCB0IFG & UCTXIFG));               // Wait for TX Ready
        buffer[i] = UCB0RXBUF;                      // Store data from last data RX
        while(!(UCB0IFG & UCRXIFG));
      }
      while (UCB0STAT & UCBUSY);                    // Wait for TX to complete
      PJOUT |= BIT0;                                // CS disable
    }
    
    
    void SPIWriteReg(char addr, char value)
    {
      PJOUT &= ~BIT0;        // /CS enable
      while((P2IN & BIT1));       // Wait for chip ready 
      while (!(UCB0IFG & UCTXIFG));                 // Wait for TXBUF ready
      UCB0TXBUF = addr;                         // Send address
      while (!(UCB0IFG & UCTXIFG));                 // Wait for TXBUF ready
      UCB0TXBUF = value;                        // Send data
      while (UCB0STAT & UCBUSY);                // Wait for TX to complete
      PJOUT |= BIT0;         // /CS disable
    }
    
    void writeRFSettings(void)
    {
        // Write register settings
        SPIWriteReg(CC110L_IOCFG2,   0x29); // GDO2 output pin config.`CHIP_RDYn
        SPIWriteReg(CC110L_IOCFG1,   0x2E); // GDO1 output pin config.`HIGH IMP
        SPIWriteReg(CC110L_IOCFG0,   0x06); // GDO0 output pin config.`high on rx and tx
        SPIWriteReg(CC110L_FIFOTHR,  0x07); // THR.`32 bytes RX ; 33 bytes TX fifo
        SPIWriteReg(CC110L_SYNC1,    0xD3); // Packet automation control.`
        SPIWriteReg(CC110L_SYNC0,    0x91); // Packet automation control.`
        SPIWriteReg(CC110L_PKTLEN,   0xFF); // Packet length.`
        SPIWriteReg(CC110L_PKTCTRL1, 0x04); // Packet automation control.`flush when CRC not ok
        SPIWriteReg(CC110L_PKTCTRL0, 0x05); // Packet automation control.`normal mode ,CRC enabled , variable packet length
        SPIWriteReg(CC110L_ADDR,     0x00); // Device address.`
        SPIWriteReg(CC110L_CHANNR,   0x00); // Channel number.
        SPIWriteReg(CC110L_FSCTRL1,  0x06); // Freq synthesizer control.`
        SPIWriteReg(CC110L_FSCTRL0,  0x00); // Freq synthesizer control.`
        SPIWriteReg(CC110L_FREQ2,    0x20); // Freq control word, high byte`
        SPIWriteReg(CC110L_FREQ1,    0x25); // Freq control word, mid byte.`
        SPIWriteReg(CC110L_FREQ0,    0xED); // Freq control word, low byte.`
        SPIWriteReg(CC110L_MDMCFG4,  0xEA); // Modem configuration.`
        SPIWriteReg(CC110L_MDMCFG3,  0x71); // Modem configuration.`
        SPIWriteReg(CC110L_MDMCFG2,  0x13); // Modem configuration.`
        SPIWriteReg(CC110L_MDMCFG1,  0x20); // Modem configuration.`
        SPIWriteReg(CC110L_MDMCFG0,  0xF8); // Modem configuration.`
        SPIWriteReg(CC110L_DEVIATN,  0x33); // Modem dev (when FSK mod en)`??
        SPIWriteReg(CC110L_MCSM2,    0x07); //MainRadio Cntrl State Machine`
        SPIWriteReg(CC110L_MCSM1 ,   0x3F); //MainRadio Cntrl State Machine`stay in tx
        SPIWriteReg(CC110L_MCSM0 ,   0x18); //MainRadio Cntrl State Machine`
        SPIWriteReg(CC110L_FOCCFG,   0x16); // Freq Offset Compens. Config`??
        SPIWriteReg(CC110L_BSCFG,    0x6C); //  Bit synchronization config.`??
        SPIWriteReg(CC110L_AGCCTRL2, 0x43); // AGC control.`
        SPIWriteReg(CC110L_AGCCTRL1, 0x4F); // AGC control.`
        SPIWriteReg(CC110L_AGCCTRL0, 0x91); // AGC control.`
        SPIWriteReg(CC110L_WOREVT1,  0x00); // WOR ??
        SPIWriteReg(CC110L_WOREVT0,  0x00); // WOR ??
        SPIWriteReg(CC110L_WORCTRL,  0xF8); // WOR ??
        SPIWriteReg(CC110L_FREND1,   0x56); // Front end RX configuration.`
        SPIWriteReg(CC110L_FREND0,   0x10); // Front end RX configuration.`
        SPIWriteReg(CC110L_FSCAL3,   0xE9); // Frequency synthesizer cal.`
        SPIWriteReg(CC110L_FSCAL2,   0x2A); // Frequency synthesizer cal.`
        SPIWriteReg(CC110L_FSCAL1,   0x00); // Frequency synthesizer cal.`
        SPIWriteReg(CC110L_FSCAL0,   0x1F); // Frequency synthesizer cal.`
        SPIWriteReg(CC110L_RCCTRL1,  0x00); // Packet automation control.`
        SPIWriteReg(CC110L_RCCTRL0,  0x00); // Packet automation control.`
        SPIWriteReg(CC110L_FSTEST,   0x59); // Frequency synthesizer cal.
        SPIWriteReg(CC110L_PSTEST,   0x7F); // Frequency synthesizer cal.
        SPIWriteReg(CC110L_AGCTEST,  0x3F); // Frequency synthesizer cal.
        SPIWriteReg(CC110L_TEST2,    0x81); // Various test settings.`
        SPIWriteReg(CC110L_TEST1,    0x35); // Various test settings.`
        SPIWriteReg(CC110L_TEST0,    0x09); // Various test settings.`
    }
    
    
    
    /***************************************************
                      Transmit Code
    ***************************************************/
    
    // Transmitter
    void TXPacket(char *Buffer, char size){         
      P2IE &= ~(BIT0);                              // disable interrupt
      SPIBurstW(CC110L_TXFIFO, Buffer, size);       // Write TX data
      StrobeSPI(CC110L_STX);                        // change state to TX, data transfer
      while(!(P2IN & BIT0));                        // wait for GDO0 to go high, sync'd TX.  CODE CANT PASS THIS POINT
      while (P2IN & BIT0);                          // wait for GDO0 to clear, end of packet
      P2IFG &= ~(BIT0);                             // after TX, flag is set
      P2IFG &= ~(BIT0);                             
      P2IE |= (BIT0);                               // enable interrupt
    }
    
    /***************************************************
                      Recieve Code
    ***************************************************/
    
    char RFPacket(char *rxBuffer, char *length){
      char status[33];
      char pktLen;
    
      StrobeSPI(CC110L_SRX);                                // test to change to RX state
      __delay_cycles(100);
      
      if ((SPIStatusR(CC110L_RXBYTES) & CC110L_NUM_RXBYTES)){
        pktLen = SPIReadReg(CC110L_RXFIFO);                 // Read length byte
        if (pktLen <= *length){                             // If pktLen size <= rxBuffer
          SPIReadBurstReg(CC110L_RXFIFO, rxBuffer, pktLen); // Pull data
          *length = pktLen;                                 // Return the actual size
          SPIReadBurstReg(CC110L_RXFIFO, status, 2);        // Read appended status bytes
          return (char)(status[CC110L_LQI_RX]&CC110L_CRC_OK);
        }                                                   // Return CRC_OK bit
        else{
          *length = pktLen;                                 // Return the large size
          StrobeSPI(CC110L_SFRX);                           // Flush RXFIFO
          __delay_cycles(100);
          return 0;                                         // Error
        }
      }
      else{
        return 0;                                 // Error
      }
    }
    
    /***************************************************
                         Main Code
    ***************************************************/
    
    int main(void){
      WDTCTL = WDTPW | WDTHOLD;                     // Stop watchdog timer
    
      PJDIR |= 0x3F;
      PJOUT |= 0x3F;
      
      // Clock Setup For SPI
      CSCTL0_H = 0xA5;
      CSCTL1 |= DCOFSEL0 + DCOFSEL1;                // Set DCO = 8MHz
      CSCTL2 = SELA_3 + SELS_3 + SELM_3;            // set ACLK = SMCLK = MCLK = DCO
      CSCTL3 = DIVA_3 + DIVS_3 + DIVM_3;            // ACLK = SMCLK = MCLK = 1MHz
      
      // Configure SPI
      P1SEL1 |= BIT6 + BIT7;                        // Set pins for primary purpose
      P2SEL1 |= BIT2;                               // Set pin for primary purpose
      P1DIR |= BIT6;
      P2DIR |= BIT2;
      UCB0CTLW0 |= UCSWRST;
      UCB0CTLW0 |= UCCKPH + UCMST + UCSYNC + UCMSB;
      UCB0CTLW0 |= UCSSEL_3;
      UCB0BR0 = 0x02;                           // SPI Clock = ACLK
      UCB0BR1 = 0;                              //
      UCB0CTLW0 &= ~UCSWRST;
    
      // Setup CC110L
      PJOUT |= BIT0;
      __delay_cycles(60);
      PJOUT &= ~(BIT0);
      __delay_cycles(60);
      PJOUT |= BIT0;
      __delay_cycles(60);
      PJOUT &= ~(BIT0);                             // CS enable
      while (!(UCB0IFG & UCTXIFG));                 // Wait for TXBUF ready
      UCB0TXBUF = CC110L_SRES;                      // Send Reset Chip Command/Strobe
      // Strobe addr is now being TX'ed
      while (!(UCB0IFG & UCTXIFG));                 // Wait for TX to complete
      PJOUT |= BIT0;                                // CS disable
      writeRFSettings();                            // Setup RF
      StrobeSPI(CC110L_SRX);                        // Strobe command to enable RX
      __delay_cycles(600);
      
      // Array Preperations
      for( j=0; j<4; j++){
        results[j][0] = 33;                         // Packet Length
        results[j][1] = 0x01;                       // Packet Address
        for (l=2;l<34;l++){
          results[j][l] = 48*j + l + 1;             // Load Array With Random Data
        }
        results[j][34] = 0xAA;
      }
      
      // Notice Packet
      Notice[0] = 2;        // Length
      Notice[1] = 0x01;     // Address
      Notice[2] = 0xAA;     // Data
      
      for(j=0;j<3;j++){
        yy[j] = 0x00;
      }
      
      for(;;){ 
        while(yy[0] != 1 || yy[0] != 2){
          RFPacket(yy,starter);                     // FIRST
          TXPacket(Notice,3);                       // SECOND
        }
        printf ("Computer: %c %c %c \n", yy[0], yy[1], yy[2]);
      }
    }

    This is of course only for the device, there is a separate code for what the user would work with.  This code, however, does not differ too greatly from the other, only that instead first it transmits and then receives.  I am pretty sure that this is just the stuff related to the transmission, and positive that I included every command and detail.

  • Hi Chris, 

    Have you tried the PER test code or the simple link software example code on the web. The projects do simple TX and RX as well as packet error testing.

    Regards,

  • Chris: The easylink examples that FI refers and that you also linked to in your post is the most simplified example that we got.

    - What type of hardware is the CC1101 mounted in?
    - Have you checked that you are able to write a register and read back the correct value to ensure that the SPI works as expected?
    - Do you manage to set up the chip to be in cont Tx sending a CW?
  • TER:  I am currently going through the sample software provided with the CC110L booster pack, and attempting to re-work my code based on those provided.  I am not sure what example FI is refering to, unless it is the example code I have collected already and am currently using.

    In regards to my hardware, I am using a PCB board that I designed.  I followed the design suggested provided by the CC110L datasheet for a 433 MHz antenna ( page 80 of 93, of the CC110L datasheet ).  The significant difference is that I instead used a Balun within the design, as can be shown within this document that the balun is a viable replacement in the design.


    I have checked before that I can successfully write a register to the SPI, send either one byte or multiple bytes of data out of the MCU, and receive a byte or multiple bytes of data back into the MCU via SPI communication.

  • I am looking through a sample suggested in another post by a TI employee, found here but I am at an absolute loss as to how this is working.  I have spent the last three days going through this code and trying to re-create it as my own c code, but I simply cannot figure it out or make it work.  for example:

    /* Interrupt port and pin */
    #define TRXEM_INT_PORT_IN P1IN
    
    digio gpio3 = {1,0};
    digio gpio2 = {1,0};
    digio gpio0 = {2,6};

    What is digio?  what is the c code equivalent (uint8 is the same as char, uint16 is the same as int, etc etc).  What is the point of this?  How come gpio3 and gpio2 are the same?  I do not see any explanation of how or why it is used, and its driving me crazy trying to find out any information about it at all.  All of my searching online just leads me around in circles to the same 2 or 3 samples, none of which have proven useful.

    I even went back and re-created my code from the previous example here just to make sure I didn't miss out on anything.  My new code from that example can be found below, but it still does not work:

    #include "msp430.h"
    
    /**********************************************************
                           Constants
    **********************************************************/
    
    // Configuration Registers
    #define CC110L_IOCFG2       0x00        // GDO2 output pin configuration
    #define CC110L_IOCFG1       0x01        // GDO1 output pin configuration
    #define CC110L_IOCFG0       0x02        // GDO0 output pin configuration
    #define CC110L_FIFOTHR      0x03        // RX FIFO and TX FIFO thresholds
    #define CC110L_SYNC1        0x04        // Sync word, high byte
    #define CC110L_SYNC0        0x05        // Sync word, low byte
    #define CC110L_PKTLEN       0x06        // Packet length
    #define CC110L_PKTCTRL1     0x07        // Packet automation control
    #define CC110L_PKTCTRL0     0x08        // Packet automation control
    #define CC110L_ADDR         0x09        // Device address
    #define CC110L_CHANNR       0x0A       
    #define CC110L_FSCTRL1      0x0B        // Frequency synthesizer control
    #define CC110L_FSCTRL0      0x0C        // Frequency synthesizer control
    #define CC110L_FREQ2        0x0D        // Frequency control word, high byte
    #define CC110L_FREQ1        0x0E        // Frequency control word, middle byte
    #define CC110L_FREQ0        0x0F        // Frequency control word, low byte
    #define CC110L_MDMCFG4      0x10        // Modem configuration
    #define CC110L_MDMCFG3      0x11        // Modem configuration
    #define CC110L_MDMCFG2      0x12        // Modem configuration
    #define CC110L_MDMCFG1      0x13        // Modem configuration
    #define CC110L_MDMCFG0      0x14        // Modem configuration
    #define CC110L_DEVIATN      0x15        // Modem deviation setting
    #define CC110L_MCSM2        0x16        // Main Radio Cntrl State Machine config
    #define CC110L_MCSM1        0x17        // Main Radio Cntrl State Machine config
    #define CC110L_MCSM0        0x18        // Main Radio Cntrl State Machine config
    #define CC110L_FOCCFG       0x19        // Frequency Offset Compensation config
    #define CC110L_BSCFG        0x1A        // Bit Synchronization configuration
    #define CC110L_AGCCTRL2     0x1B        // AGC control
    #define CC110L_AGCCTRL1     0x1C        // AGC control
    #define CC110L_AGCCTRL0     0x1D        // AGC control
    #define CC110L_WOREVT1      0x1E        // 
    #define CC110L_WOREVT0      0x1F        // 
    #define CC110L_WORCTRL      0x20        // 
    #define CC110L_FREND1       0x21        // Front end RX configuration
    #define CC110L_FREND0       0x22        // Front end TX configuration
    #define CC110L_FSCAL3       0x23        // Frequency synthesizer calibration
    #define CC110L_FSCAL2       0x24        // Frequency synthesizer calibration
    #define CC110L_FSCAL1       0x25        // Frequency synthesizer calibration
    #define CC110L_FSCAL0       0x26        // Frequency synthesizer calibration
    #define CC110L_RCCTRL1      0x27        // 
    #define CC110L_RCCTRL0      0x28        // 
    #define CC110L_FSTEST       0x29        // 
    #define CC110L_PSTEST       0x2A        // 
    #define CC110L_AGCTEST      0x2B        // 
    #define CC110L_TEST2        0x2C        // Various test settings
    #define CC110L_TEST1        0x2D        // Various test settings
    #define CC110L_TEST0        0x2E        // Various test settings
    
    // Strobe commands
    #define CC110L_SRES         0x30        // Reset chip.
    #define CC110L_SFSTXON      0x31        // Enable/calibrate freq synthesizer
    #define CC110L_SXOFF        0x32        // Turn off crystal oscillator.
    #define CC110L_SCAL         0x33        // Calibrate freq synthesizer & disable
    #define CC110L_SRX          0x34        // Enable RX.
    #define CC110L_STX          0x35        // Enable TX.
    #define CC110L_SIDLE        0x37        // 
    #define CC110L_RESERVED     0x36        // Exit RX / TX
    #define CC110L_RESERVED1    0x38        // 
    #define CC110L_SPWD         0x39        // Enter pwr down mode when CSn goes hi
    #define CC110L_SFRX         0x3A        // Flush the RX FIFO buffer.
    #define CC110L_SFTX         0x3B        // Flush the TX FIFO buffer.
    #define CC110L_RESERVED2    0x3C        // 
    #define CC110L_SNOP         0x3D        // No operation.
    
    // Status registers
    #define CC110L_PARTNUM      0x30      // Part number
    #define CC110L_VERSION      0x31      // Current version number
    #define CC110L_FREQEST      0x32      // Frequency offset estimate
    #define CC110L_CRC_REG      0x33      // CRC OK
    #define CC110L_RSSI         0x34      // Received signal strength indication
    #define CC110L_MARCSTATE    0x35      // Control state machine state
    #define CC110L_RESERVED3    0x36      // 
    #define CC110L_RESERVED4    0x37      // 
    #define CC110L_PKTSTATUS    0x38      // Current GDOx status and packet status
    #define CC110L_RESERVED5    0x39      // 
    #define CC110L_TXBYTES      0x3A      // Underflow and # of bytes in TXFIFO
    #define CC110L_RXBYTES      0x3B      // Overflow and # of bytes in RXFIFO
    #define CC110L_NUM_RXBYTES  0x7F      // Mask "# of bytes" field in _RXBYTES
    
    // Other memory locations
    #define CC110L_PATABLE      0x3E
    #define CC110L_TXFIFO       0x3F
    #define CC110L_RXFIFO       0x3F
    
    //Masks for appended status bytes
    #define CC110L_LQI_RX       0x01        // Position of LQI byte
    #define CC110L_CRC_OK       0x80        // Mask "CRC_OK" bit within LQI byte
    
    // Definitions to support burst/single access:
    #define CC110L_WRITE_BURST  0x40
    #define CC110L_READ_SINGLE  0x80
    #define CC110L_READ_BURST   0xC0 
    
    #define GDO0_IN         P2IN
    #define GDO0_OUT        P2OUT
    #define GDO0_DIR        P2DIR
    #define GDO0_IE         P2IE
    #define GDO0_IES        P2IES
    #define GDO0_IFG        P2IFG
    #define GDO0_PIN        BIT0
    
    #define GDO1_IN         P1IN
    #define GDO1_OUT        P1OUT
    #define GDO1_DIR        P1DIR
    #define GDO1_PIN        BIT7
    
    #define GDO2_IN         P2IN
    #define GDO2_OUT        P2OUT
    #define GDO2_DIR        P2DIR
    #define GDO2_PIN        BIT1
    
    #define CSn_OUT         PJOUT
    #define CSn_DIR         PJDIR
    #define CSn_PIN         BIT0
    
    #define SPI_UB0_SEL0    P1SEL0
    #define SPI_UB0_SEL1    P1SEL1
    #define SPI_UB0_DIR     P1DIR
    #define SPI_UB0_IN      P1IN
    #define SPI_UB0_SIMO    BIT6
    #define SPI_UB0_SOMI    BIT7
    
    #define SPI_UB0_DIRC    P2DIR
    #define SPI_UB0_CLK0    P2SEL0
    #define SPI_UB0_CLK1    P2SEL1
    #define SPI_UB0_UCLK    BIT2
    
    char results[4][18];
    char collected[4][18];
    char status[18];
    
    char j;
    char k;
    char l;
    
    /**********************************************************
                             SPI
    **********************************************************/
    
    void SPIStrobe(char strobe){
      CSn_OUT &= ~CSn_PIN;                          // /CS enable
      while((GDO2_IN & GDO2_PIN));                  // Wait for chip ready 
      while (!(UCB0IFG&UCTXIFG));                   // Wait for TXBUF ready
      UCB0TXBUF = strobe;                           // Send strobe
      // Strobe addr is now being TX'ed
      //while (!(UCB0IFG & UCTXIFG));                 // Wait for TX to complete
      while (UCB0STAT & UCBUSY);                    // Wait for TX to complete
      CSn_OUT |= CSn_PIN;                           // /CS disable
    }
    
    void PowerupResetCC110L(void){
      CSn_OUT |= CSn_PIN;
      __delay_cycles(60);
      CSn_OUT &= ~CSn_PIN;
      __delay_cycles(60);
      CSn_OUT |= CSn_PIN;
      __delay_cycles(60);
      CSn_OUT &= ~CSn_PIN;                          // /CS enable
      while (!(UCB0IFG&UCTXIFG));                   // Wait for TXBUF ready
      UCB0TXBUF = CC110L_SRES;                      // Send strobe
      // Strobe addr is now being TX'ed               
      //while (!(UCB0IFG & UCTXIFG));                 // Wait for TX to complete
      while (UCB0STAT & UCBUSY);                    // Wait for TX to complete
      CSn_OUT |= CSn_PIN;                           // /CS disable
    }
    
    void SPISetup(void){
      SPI_UB0_SEL0 |= SPI_UB0_SIMO| SPI_UB0_SOMI;
      SPI_UB0_SEL1 |= SPI_UB0_SIMO| SPI_UB0_SOMI;
      SPI_UB0_CLK0 |= SPI_UB0_UCLK;
      SPI_UB0_CLK1 |= SPI_UB0_UCLK;
                                                    // SPI option select
      SPI_UB0_DIR |= SPI_UB0_SIMO;
      SPI_UB0_DIRC |= SPI_UB0_UCLK;
      CSn_OUT |= CSn_PIN;
      CSn_DIR |= CSn_PIN;                           // /CS disable
    
      UCB0CTL1 |= UCSWRST;                          // **Disable USCI state machine**
      UCB0CTL0 |= UCMODE_0+UCMST+UCCKPH+UCMSB+UCSYNC;    // 3-pin, 8-bit SPI master
      UCB0CTL1 |= UCSSEL_2;                         // SMCLK
      UCB0BR0 = 1 && 0xff;			        //0x02;              
      UCB0BR1 = 1 >> 8;                             // UCLK/2
                                                    // SPI TXD out direction
      UCB0CTL1 &= ~UCSWRST;                         // **Initialize USCI state machine**
    }
    
    void SPIWriteReg(char addr, char value){
      CSn_OUT &= ~CSn_PIN;                          // /CS enable
      while((GDO2_IN & GDO2_PIN));                  // Wait for chip ready 
      while (!(UCB0IFG&UCTXIFG));                   // Wait for TXBUF ready
      UCB0TXBUF = addr;                             // Send address
      while (!(UCB0IFG&UCTXIFG));                   // Wait for TXBUF ready
      UCB0TXBUF = value;                            // Send data
      //while (!(UCB0IFG & UCTXIFG));                 // Wait for TX to complete
      while (UCB0STAT & UCBUSY);                    // Wait for TX to complete
      CSn_OUT |= CSn_PIN;                           // /CS disable
    }
    
    void SPIWriteBurstReg(char addr, char *buffer, char count){
      unsigned int i;
      CSn_OUT &= ~CSn_PIN;                          // /CS enable
      while((GDO2_IN & GDO2_PIN));                  // Wait for chip ready 
      while (!(UCB0IFG&UCTXIFG));                   // Wait for TXBUF ready
      UCB0TXBUF = addr | CC110L_WRITE_BURST;        // Send address
      for (i = 0; i < count; i++){
        while (!(UCB0IFG&UCTXIFG));                 // Wait for TXBUF ready
        UCB0TXBUF = buffer[i];                      // Send data
      }
      while (UCB0STAT & UCBUSY);                    // Wait for TX to complete
      CSn_OUT |= CSn_PIN;                           // /CS disable
    }
    
    char SPIReadStatus(char addr){
      char status;
      CSn_OUT &= ~CSn_PIN;        // /CS enable
      while((GDO2_IN & GDO2_PIN));       // Wait for chip ready 
      while (!(UCB0IFG&UCTXIFG));                   // Wait for TXBUF ready
      UCB0TXBUF = (addr | CC110L_READ_BURST);// Send address
      while (!(UCB0IFG&UCTXIFG));                   // Wait for TXBUF ready
      UCB0TXBUF = 0X01;                            // Dummy write so we can read data
      while (UCB0STAT & UCBUSY);                // Wait for TX to complete
      status = UCB0RXBUF;                       // Read data
      CSn_OUT |= CSn_PIN;         // /CS disable
      return status;
    }
    
    void SPIReadBurstReg(char addr, char *buffer, char count){
      char i;
      CSn_OUT &= ~CSn_PIN;        // /CS enable
      while((GDO2_IN & GDO2_PIN));       // Wait for chip ready 
      while (!(UCB0IFG&UCTXIFG));                   // Wait for TXBUF ready
      UCB0TXBUF = (addr | CC110L_READ_BURST);// Send address
      while (!(UCB0IFG&UCTXIFG));                   // Wait for TXBUF ready
      for (i = 0; i < count; i++)
      {
        UCB0TXBUF = 1;                          //Initiate next data RX, meanwhile..
    	while (!(UCB0IFG&UCTXIFG));                   // Wait for TXBUF ready
        buffer[i] = UCB0RXBUF;                  // Store data from last data RX
      }
      while (UCB0STAT & UCBUSY);                // Wait for TX to complete
      CSn_OUT |= CSn_PIN;         // /CS disable
    }
    
    char SPIReadReg(char addr){
      char x;
      CSn_OUT &= ~CSn_PIN;               // /CS enable
      while((GDO2_IN & GDO2_PIN));       // Wait for chip ready 
      while (!(UCB0IFG&UCTXIFG));                   // Wait for TXBUF ready
      UCB0TXBUF = (addr | CC110L_READ_SINGLE);// Send address
      while (!(UCB0IFG&UCTXIFG));                   // Wait for TXBUF ready
      UCB0TXBUF = 1;                            // Dummy write so we can read data
      while (UCB0STAT & UCBUSY);                // Wait for TX to complete
      x = UCB0RXBUF;                            // Read data
      CSn_OUT |= CSn_PIN;         // /CS disable
      return x;
     
    }
    
    /**********************************************************
                          Transmission
    **********************************************************/
    
    void RFSendPacket(char *txBuffer, char size){
      GDO0_IE &= ~GDO0_PIN;                 // Disable interrupt
      SPIWriteBurstReg(CC110L_TXFIFO, txBuffer, size); // Write TX data
      SPIStrobe(CC110L_STX);                // Change state to TX, initiating data transfer
      while (!(GDO0_IN & GDO0_PIN));        // Wait GDO0 to go hi -> sync TX'ed
      while (GDO0_IN&GDO0_PIN);             // Wait GDO0 to clear -> end of pkt
      GDO0_IFG &= ~GDO0_PIN;                // After pkt TX, this flag is set.
                                            // Has to be cleared before existing
      GDO0_IFG &= ~GDO0_PIN;
      GDO0_IE |= GDO0_PIN;                  // Enable interrupt 
    }
    
    void sendbyte(char a){
    char Buffer[3];
    
    Buffer[0] = 2;                           // Packet length
    Buffer[1] = 0x01;                        // Packet address
    Buffer[2] = a;    			 // Load four switch inputs
    RFSendPacket(Buffer, 3);                 // Send value over RF
    }
    
    char RFReceivePacket(char *rxBuffer, char *length){
      char status[2];
      char pktLen;
    
      if ((SPIReadStatus(CC110L_RXBYTES) & CC110L_NUM_RXBYTES)){
        pktLen = SPIReadReg(CC110L_RXFIFO); // Read length byte
        if (pktLen <= *length){                  // If pktLen size <= rxBuffer
          SPIReadBurstReg(CC110L_RXFIFO, rxBuffer, pktLen); // Pull data
          *length = pktLen;                     // Return the actual size
          SPIReadBurstReg(CC110L_RXFIFO, status, 2); // Read appended status bytes
          return (char)(status[CC110L_LQI_RX]&CC110L_CRC_OK);
        }                                       // Return CRC_OK bit
        else{
          *length = pktLen;                     // Return the large size
          SPIStrobe(CC110L_SFRX);      // Flush RXFIFO
          return 0;                             // Error
        }
      }
      else{
        return 0;                             // Error
      }
    }
    
    void writeRFSettings(void){
      // Write register settings
      SPIWriteReg(CC110L_IOCFG2,   0x29); // GDO2 output pin config.`CHIP_RDYn
      SPIWriteReg(CC110L_IOCFG1,   0x2E); // GDO1 output pin config.`HIGH IMP
      SPIWriteReg(CC110L_IOCFG0,   0x06); // GDO0 output pin config.`high on rx and tx
      SPIWriteReg(CC110L_FIFOTHR,  0x07); // THR.`32 bytes RX ; 33 bytes TX fifo
      SPIWriteReg(CC110L_SYNC1,    0xD3); // Packet automation control.`
      SPIWriteReg(CC110L_SYNC0,    0x91); // Packet automation control.`
      SPIWriteReg(CC110L_PKTLEN,   0xFF); // Packet length.`
      SPIWriteReg(CC110L_PKTCTRL1, 0x04); // Packet automation control.`flush when CRC not ok
      SPIWriteReg(CC110L_PKTCTRL0, 0x05); // Packet automation control.`normal mode ,CRC enabled , variable packet length
      SPIWriteReg(CC110L_ADDR,     0x00); // Device address.`
      SPIWriteReg(CC110L_CHANNR,   0x00); // Channel number.
      SPIWriteReg(CC110L_FSCTRL1,  0x06); // Freq synthesizer control.`
      SPIWriteReg(CC110L_FSCTRL0,  0x00); // Freq synthesizer control.`
      SPIWriteReg(CC110L_FREQ2,    0x20); // Freq control word, high byte`
      SPIWriteReg(CC110L_FREQ1,    0x25); // Freq control word, mid byte.`
      SPIWriteReg(CC110L_FREQ0,    0xED); // Freq control word, low byte.`
      SPIWriteReg(CC110L_MDMCFG4,  0xEA); // Modem configuration.`
      SPIWriteReg(CC110L_MDMCFG3,  0x71); // Modem configuration.`
      SPIWriteReg(CC110L_MDMCFG2,  0x13); // Modem configuration.`
      SPIWriteReg(CC110L_MDMCFG1,  0x20); // Modem configuration.`
      SPIWriteReg(CC110L_MDMCFG0,  0xF8); // Modem configuration.`
      SPIWriteReg(CC110L_DEVIATN,  0x33); // Modem dev (when FSK mod en)`??
      SPIWriteReg(CC110L_MCSM2,    0x07); //MainRadio Cntrl State Machine`
      SPIWriteReg(CC110L_MCSM1 ,   0x3F); //MainRadio Cntrl State Machine`stay in tx
      SPIWriteReg(CC110L_MCSM0 ,   0x18); //MainRadio Cntrl State Machine`
      SPIWriteReg(CC110L_FOCCFG,   0x16); // Freq Offset Compens. Config`??
      SPIWriteReg(CC110L_BSCFG,    0x6C); //  Bit synchronization config.`??
      SPIWriteReg(CC110L_AGCCTRL2, 0x43); // AGC control.`
      SPIWriteReg(CC110L_AGCCTRL1, 0x4F); // AGC control.`
      SPIWriteReg(CC110L_AGCCTRL0, 0x91); // AGC control.`
      SPIWriteReg(CC110L_WOREVT1,  0x00); // WOR ??
      SPIWriteReg(CC110L_WOREVT0,  0x00); // WOR ??
      SPIWriteReg(CC110L_WORCTRL,  0xF8); // WOR ??
      SPIWriteReg(CC110L_FREND1,   0x56); // Front end RX configuration.`
      SPIWriteReg(CC110L_FREND0,   0x10); // Front end RX configuration.`
      SPIWriteReg(CC110L_FSCAL3,   0xE9); // Frequency synthesizer cal.`
      SPIWriteReg(CC110L_FSCAL2,   0x2A); // Frequency synthesizer cal.`
      SPIWriteReg(CC110L_FSCAL1,   0x00); // Frequency synthesizer cal.`
      SPIWriteReg(CC110L_FSCAL0,   0x1F); // Frequency synthesizer cal.`
      SPIWriteReg(CC110L_RCCTRL1,  0x00); // Packet automation control.`
      SPIWriteReg(CC110L_RCCTRL0,  0x00); // Packet automation control.`
      SPIWriteReg(CC110L_FSTEST,   0x59); // Frequency synthesizer cal.
      SPIWriteReg(CC110L_PSTEST,   0x7F); // Frequency synthesizer cal.
      SPIWriteReg(CC110L_AGCTEST,  0x3F); // Frequency synthesizer cal.
      SPIWriteReg(CC110L_TEST2,    0x81); // Various test settings.`
      SPIWriteReg(CC110L_TEST1,    0x35); // Various test settings.`
      SPIWriteReg(CC110L_TEST0,    0x09); // Various test settings.`
    }
    
    void setup_cc110l(void){
      PowerupResetCC110L();
      writeRFSettings();
      SPIStrobe(CC110L_SRX);
    }
    
    void setup_io(void){
      GDO0_IES  |=   GDO0_PIN;       // Int on falling edge (end of pkt)
      GDO0_IFG  &=  ~GDO0_PIN;       // Clear flag
      GDO0_IE   |=   GDO0_PIN;       // Enable int on end of packet
      GDO2_DIR &= ~GDO2_PIN;
    }
    
    /**********************************************************
                             Main
    **********************************************************/
    
    int main( void )
    {
      // Stop watchdog timer to prevent time out reset
      WDTCTL = WDTPW + WDTHOLD;
    
      for ( j = 0; j < 4; j++){
        results[j][0] = 17;
        results[j][1] = 0x01;
        for ( l = 2; l < 18; l++){
          results[j][l] = j*2 + l*3;
        }
      }
      
      SPISetup();
      setup_cc110l();
      _EINT();
      setup_io();
      LPM0;
      
      for (;;){
        for ( j = 0; j < 4; j++){
          RFReceivePacket(collected[j], status);
          RFSendPacket(results[j], 18);
        }
      }
      return 0;
    }
    

    Now I believe I have narrowed down where the problem occurs... Within the setup portion of my code, I refer to "Setup_cc110l();" which is shown here:

    void setup_cc110l(void){
      PowerupResetCC110L();
      writeRFSettings();
      SPIStrobe(CC110L_SRX);
    }

    It is able to complete the command "PowerupResetCC110L();" without any trouble.  It features SPI within it and waiting for transmission to complete:

    void PowerupResetCC110L(void){
      CSn_OUT |= CSn_PIN;
      __delay_cycles(60);
      CSn_OUT &= ~CSn_PIN;
      __delay_cycles(60);
      CSn_OUT |= CSn_PIN;
      __delay_cycles(60);
      CSn_OUT &= ~CSn_PIN;                          // /CS enable
      while (!(UCB0IFG&UCTXIFG));                   // Wait for TXBUF ready
      UCB0TXBUF = CC110L_SRES;                      // Send strobe
      // Strobe addr is now being TX'ed               
      while (UCB0STAT & UCBUSY);                    // Wait for TX to complete
      CSn_OUT |= CSn_PIN;                           // /CS disable
    }

    However, it is the next section when the code fails to progress, that is "writeRFSettings();" where it freezes just waiting for TXBUF to be ready.

    void SPIWriteReg(char addr, char value){
      CSn_OUT &= ~CSn_PIN;                          // /CS enable
      while((GDO2_IN & GDO2_PIN));                  // Wait for chip ready 
      while (!(UCB0IFG&UCTXIFG));                   // Wait for TXBUF ready   FREEZES!!!!
      UCB0TXBUF = addr;                             // Send address
      while (!(UCB0IFG&UCTXIFG));                   // Wait for TXBUF ready
      UCB0TXBUF = value;                            // Send data
      while (UCB0STAT & UCBUSY);                    // Wait for TX to complete
      CSn_OUT |= CSn_PIN;                           // /CS disable
    }
    
    
    void writeRFSettings(void){
      // Write register settings
      SPIWriteReg(CC110L_IOCFG2,   0x29); // GDO2 output pin config.`CHIP_RDYn
      ....

    I am at a loss as to why this happens.  Could it be how I set up the wait for TX to complete?  Could it be something else, but if so why is the first wait for TXBUF able to run properly, but the next time i ask it to do so it simply refuses to?

    So please, if anyone has any ideas what I am doing wrong, or where I can find a simple code that would allow me to communicate with a CC110L while still being able to select which MSP to use with it (preferably well detailed and easy to understand) then please let me know.  I have spent a long time trying to get this to work and each time I just cannot get it done.

    Thank you,

    Chris

  • digio: In most IDEs you can rightclick on the name and get the definition of the function/ struck.

    Which launchpad do you actually use? I could not see that we have a launchpad for the MSP you write you use.

    Could you post a schematic of your CC110L board? It could be that you have done something wrong with the SPI set-up for your MSP but it could also be that your board does not work. Have you checked that the xosc works on your board?
  • Thank you for pointing out the digio issue, I believe I have found where it was being declared now.  In regards to the launchpad, I feel I did not properly explain my situation and that may be causing confusion.  For that I am sorry, and will now explain it in greater detail. 

    First off, I am using two different circuits for my testing.  One circuit is a prototype of my project, so I will leave out the details of the other parts as they should have no influence on the problem at hand.  This circuit features a MSP430FR5728, which I am able to successfully program with the use of a MSP430FR5969 launchpad that I have been using as a programmer.  The method in which I do this can be found here.  For the record, I have done this before and successfully programed other MSP chips that were then able to do their simple tasks such as lighting up LED's and simple SPI communication.  Once it is programmed, I intend to power it with a separate power supply once I am ready to test the transmission.

    The second circuit that I am using is for the user to communicate with the prototype.  To do this, I am just using my MSP430FR5969 launchpad, with a CC110L booster pack attached to it.  It uses my computer as the power supply obviously, as it will remain plugged in during testing.  This is the part where I am seeing the code freeze, and therefor I can only assume that the same is happening with the first part. 

    Hopefully this time I explained it more clearly, and there is no confusion.  But just in case i will say it again here in the most simple way I can.  I have two parts for transmission, one the MSP430FR5969 launchpad with booster pack, and the other a MSP430FR5728 (that i can program at will) where you can see the wiring in the picture just a little below

    In regards to the wiring of my CC110L board, I will include a diagram was drawn up quickly that details the setup of the CC110L in relation to MCU and Antenna.  Hopefully it is detailed enough, but just in case I am also including the datasheet of the Balun that was used.  I have gone back and confirmed each connection myself, but am willing to do so as many times as it takes if anyone believe the problem may lie in my soldering.

    I have not yet checked that the xosc works, but will take a look at it.  Still, this would not be a problem with the booster pack setup which features the same problem as my personal wiring (see detailed explanation of boards a few paragraphs up).

    Hope this explained everything.

    Chris

  • RE-POSTING!  For some reason does not show previous post.  Will delete if duplicates

    Thank you for pointing out the digio issue, I believe I have found where it was being declared now.  In regards to the launchpad, I feel I did not properly explain my situation and that may be causing confusion.  For that I am sorry, and will now explain it in greater detail. 

    First off, I am using two different circuits for my testing.  One circuit is a prototype of my project, so I will leave out the details of the other parts as they should have no influence on the problem at hand.  This circuit features a MSP430FR5728, which I am able to successfully program with the use of a MSP430FR5969 launchpad that I have been using as a programmer.  The method in which I do this can be found here.  For the record, I have done this before and successfully programed other MSP chips that were then able to do their simple tasks such as lighting up LED's and simple SPI communication.  Once it is programmed, I intend to power it with a separate power supply once I am ready to test the transmission.

    The second circuit that I am using is for the user to communicate with the prototype.  To do this, I am just using my MSP430FR5969 launchpad, with a CC110L booster pack attached to it.  It uses my computer as the power supply obviously, as it will remain plugged in during testing.  This is the part where I am seeing the code freeze, and therefor I can only assume that the same is happening with the first part. 

    Hopefully this time I explained it more clearly, and there is no confusion.  But just in case i will say it again here in the most simple way I can.  I have two parts for transmission, one the MSP430FR5969 launchpad with booster pack, and the other a MSP430FR5728 (that i can program at will) and can see the wiring just a little down in this post.

    In regards to the wiring of my CC110L board, I will include a diagram was drawn up quickly that details the setup of the CC110L in relation to MCU and Antenna.  Hopefully it is detailed enough, but just in case I am also including the datasheet of the Balun that was used.  I have gone back and confirmed each connection myself, but am willing to do so as many times as it takes if anyone believe the problem may lie in my soldering.

    I have not yet checked that the xosc works, but will take a look at it.  Still, this would not be a problem with the booster pack setup which features the same problem as my personal wiring (see detailed explanation of boards a few paragraphs up).

    Hope this explained everything.

    Chris

  • First step is to check that the SPI works on the MCU side for both MSPs. Does the required IO go high/ low as a function of a different IO?

    Your schematic is not detailed enough to see if you have done things correctly. As an example you have to have a cap connected to pin 5. Please refer to the reference designs. The drawings in the datasheets are simplified and does not show all required components.

  • Sorry for not responding sooner,

    I went back through my code and saw I made a mistake in my SPI setup, which is what caused my code to be unable to properly perform SPI communication.  I have since fixed this mistake... but a new problem has come up with my code.  It now freezes before the wireless communication can begin.  To determine when this happened, I had my computer print out a random character after each step of the CC110L setup.  Below is the segment of code where the code freezes, and I have commented which lines do and do not print, to show which command is where the setup is no longer able to continue.

    void setup_io(void){
      GDO0_IES  |=   GDO0_PIN;       // Int on falling edge (end of pkt)
      printf("T %c \n",'5');         // PRINTS
      GDO0_IFG  &=  ~GDO0_PIN;       // Clear flag
      printf("T %c \n",'6');         // PRINTS
      GDO0_IE   |=   GDO0_PIN;       // Enable int on end of packet
      printf("T %c \n",'7');         // DOES NOT PRINT!  PREVIOUS LINE IS WHERE FREEZES
      GDO2_DIR &= ~GDO2_PIN;
    }
    

    I am not yet sure what is causing this, but intend to keep searching.  If anyone reading this might have an idea, I welcome you to suggest it cause odds are I might well have overlooked it.

    In regards to my schematic, I was not aware that the cap connected to pin 5 was essential.  The way I read the datasheet, it sounded option, but seems I was mistaken in that thought.  The reference designs I used as reference were within the datasheet, I believe on page 80 or so.  Is there another reference design that I was not aware of and/or did not notice?

    Thanks,

    Chris

  • Chris, 

    The MCU does not freeze, but that particular line you are enabling the interrupt and if the pins are in the correct state the interrupts will fire immediately. This will cause the MCU to jump to the ISR table and look for the ISR vector and then jump to the ISR code. If you do not have ISR code correctly placed at this time the MCU will enter a fault condition with a while(1);.

    Check the ISR, place a break point inside the ISR it should get there and if it does not then you have configured the ISR incorrectly.

    Regards,
    /TA