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.

cc110L time to send 5 bytes

Other Parts Discussed in Thread: CC110L, MSP430G2553, TEST2

I'm working on an application CC110L.

The goal is to send 5 bytes (16-bit crc). But the waiting time for packet transmission is completed,  is approximately 30 ms.

Here is the bytes to send (with data rate 2.4kBaud):

    buffer[0]=0x05;
    buffer[1]=CHIP_ID_1;
    buffer[2]=0xb8;
    buffer[3]=0x20;
    buffer[4]=0x27;

Here is the function to send the bytes (i´m using msp430g2553 with spi at 8 MHz):

void TX_PACK(void){
  int a=5, z=0;
  P3OUT &= ~BIT1;                          // /CS enable
  while(P1IN&BIT1);                       //SO pin
  while (!(IFG2&UCA0TXIFG));               // Wait for TXBUF ready
  UCA0TXBUF = 0x7F;                         // Send address
  while (!(IFG2&UCA0TXIFG));               // Wait for TXBUF ready
  while(a>0){
  UCA0TXBUF = buffer[z];                        // Send data
  while (UCA0STAT & UCBUSY);                // Wait for TX complete
  z++;
  a--;
  }
  P3OUT |= BIT1;         // /CS disable
  TI_CC_SPIStrobe(0x35);
 
  P3OUT |= BIT6;    //led ON
  ENT_LPM_TESTE();   //30ms
  P3OUT &= ~BIT6;  //led OFF
}

The Time to send this package correctly is too high.

Is there any possibility of reducing this time?

  • You have not included your register settings. Have you turned off preamble, sync and CRC? These will be sent if not turned off.

  • I can not disable the preamble because it syncs the transmitter and receiver.

    The sync word is to identify.

    Here is the register settings (made by Smart software TI):

    void writeRFSettings(void){    
    //halRfWriteReg(SMARTRF_SETTING_IOCFG2,0x3F);    
    halRfWriteReg(SMARTRF_SETTING_IOCFG0,0x06);       //GDO0 Output Pin Configuration
    halRfWriteReg(SMARTRF_SETTING_FIFOTHR,0x47);      //RX FIFO and TX FIFO Thresholds
    halRfWriteReg(SMARTRF_SETTING_SYNC1,0xDD);        //Sync Word, High Byte
    halRfWriteReg(SMARTRF_SETTING_SYNC0,0xDD);        //Sync Word, Low Byte
    halRfWriteReg(SMARTRF_SETTING_PKTLEN,0x07);       //Packet Length
    halRfWriteReg(SMARTRF_SETTING_PKTCTRL0,0x04);     //Packet Automation Control
    halRfWriteReg(SMARTRF_SETTING_FSCTRL1,0x06);      //Frequency Synthesizer Control
    halRfWriteReg(SMARTRF_SETTING_FREQ2,0x10);        //Frequency Control Word, High Byte
    halRfWriteReg(SMARTRF_SETTING_FREQ1,0xA7);        //Frequency Control Word, Middle Byte
    halRfWriteReg(SMARTRF_SETTING_FREQ0,0x62);        //Frequency Control Word, Low Byte
    halRfWriteReg(SMARTRF_SETTING_MDMCFG4,0x87);      //Modem Configuration
    halRfWriteReg(SMARTRF_SETTING_MDMCFG3,0x83);      //Modem Configuration
    halRfWriteReg(SMARTRF_SETTING_MDMCFG2,0x12);      //Modem Configuration
    halRfWriteReg(SMARTRF_SETTING_MDMCFG1,0x23);      //Modem Configuration
    halRfWriteReg(SMARTRF_SETTING_MDMCFG0,0x3B);      //Modem Configuration
    halRfWriteReg(SMARTRF_SETTING_DEVIATN,0x51);      //Modem Deviation Setting
    halRfWriteReg(SMARTRF_SETTING_MCSM0,0x18);        //Main Radio Control State Machine Configuration
    halRfWriteReg(SMARTRF_SETTING_FOCCFG,0x16);       //Frequency Offset Compensation Configuration
    halRfWriteReg(SMARTRF_SETTING_RESERVED_0X20,0xFB);//Use setting from SmartRF Studio
    halRfWriteReg(SMARTRF_SETTING_FSCAL3,0xE9);       //Frequency Synthesizer Calibration
    halRfWriteReg(SMARTRF_SETTING_FSCAL2,0x2A);       //Frequency Synthesizer Calibration
    halRfWriteReg(SMARTRF_SETTING_FSCAL1,0x00);       //Frequency Synthesizer Calibration
    halRfWriteReg(SMARTRF_SETTING_FSCAL0,0x1F);       //Frequency Synthesizer Calibration
    halRfWriteReg(SMARTRF_SETTING_RESERVED_0X29,0x59);//Use setting from SmartRF Studio
    halRfWriteReg(SMARTRF_SETTING_RESERVED_0X2A,0x7F);//Use setting from SmartRF Studio
    halRfWriteReg(SMARTRF_SETTING_RESERVED_0X2B,0x3F);//Use setting from SmartRF Studio
    halRfWriteReg(SMARTRF_SETTING_TEST2,0x81);        //Various Test Settings
    halRfWriteReg(SMARTRF_SETTING_TEST1,0x35);        //Various Test Settings
    halRfWriteReg(SMARTRF_SETTING_TEST0,0x09);        //Various Test Settings
    halRfWriteReg(SMARTRF_SETTING_CRC_REG,0xFF);      //
    halRfWriteReg(TI_CCxxx0_PATABLE,0xC0);         ////Signal Strength tranmission

    halRfWriteReg(SMARTRF_SETTING_CRC_REG,0x80);///transmit

    }

  • From the reg settings you are sending 4 byte preamble, 2 byte sync, 5 byte payload and 2 byte CRC

    1/2400*(4+2+5+2)*8=44 ms

    If you want to speed things up you have to increase the datarate since you want the preamble + sync to keep good packet handling.

  • Ok.

    I was wrong in my calculations.

    Thank you!

  • Please be aware that you are using fixed packet length mode and set PKTLEN = 7 but you are writing only 5 bytes to the TXFIFO. This will make your TXFIFO underflow.

    BR

    Siri

  •  

    Using Smart Studio:

    When PKTLEN = 7 it has 2 bytes of crc and 5 bytes to send data.

    Am I wrong?

     

  • Yes, CRC is not part of PKTLEN. You can use SmartRF Studio to calculate this for you, remember to turn off the "add sequence number"