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 longer preamble

Other Parts Discussed in Thread: CC1120

hi,

i used this:

    trxSpiCmdStrobe(CC1120_SIDLE); 
    trxSpiCmdStrobe(CC1120_SFTX);  
    trxSpiCmdStrobe(CC1120_STX);  
    delayms(1800);

    cc112xSpiWriteTxFifo(buffer_to_radio,sizeof(buffer_to_radio)+2);
    trxSpiCmdStrobe(CC1120_STX);

    while (packetSemaphore == 0); 
   
    packetSemaphore = ISR_IDLE;

but is always die.

why?

the configure is:

    {CC1120_IOCFG3,            0xB0},
  {CC1120_IOCFG2,            0x06},
  {CC1120_IOCFG1,            0xB0},
  {CC1120_IOCFG0,            0x40},
  {CC1120_SYNC_CFG1,         0x08},
  {CC1120_DEVIATION_M,       0x48},
  {CC1120_MODCFG_DEV_E,      0x0D},
  {CC1120_DCFILT_CFG,        0x1C},
  {CC1120_IQIC,              0x00},
  {CC1120_CHAN_BW,           0x04},
  {CC1120_MDMCFG0,           0x05},
  {CC1120_SYMBOL_RATE2,      0x74},
  {CC1120_SYMBOL_RATE1,      0x7A},
  {CC1120_SYMBOL_RATE0,      0xE1},
  {CC1120_AGC_CS_THR,        0x19},
  {CC1120_AGC_CFG1,          0xA9},
  {CC1120_AGC_CFG0,          0xCF},
  {CC1120_FIFO_CFG,          0x00},
  {CC1120_FS_CFG,            0x14},
  {CC1120_PKT_CFG0,          0x20},
  {CC1120_PA_CFG0,           0x7D},
  {CC1120_PKT_LEN,           0xFF},
  {CC1120_IF_MIX_CFG,        0x00},
  {CC1120_FREQOFF_CFG,       0x22},
  {CC1120_FREQ2,             0x6C},
  {CC1120_FREQ1,             0x80},
  {CC1120_FS_DIG1,           0x00},
  {CC1120_FS_DIG0,           0x5F},
  {CC1120_FS_CAL1,           0x40},
  {CC1120_FS_CAL0,           0x0E},
  {CC1120_FS_DIVTWO,         0x03},
  {CC1120_FS_DSM0,           0x33},
  {CC1120_FS_DVC0,           0x17},
  {CC1120_FS_PFD,            0x50},
  {CC1120_FS_PRE,            0x6E},
  {CC1120_FS_REG_DIV_CML,    0x14},
  {CC1120_FS_SPARE,          0xAC},
  {CC1120_FS_VCO0,           0xB4},
  {CC1120_XOSC5,             0x0E},
  {CC1120_XOSC1,             0x03},

and how can I receive the data from radio? i received the data always CRC error.

  • Hi

    First of all, it is not necessary to strobe STX both before and after you fill the TXFIFO. You should either strobe STX before OR after you have written to the FIFO, preferably the latter.

    Second, how many bytes to you write to the TXFIFO and what does your packet look like? It seems that you set the length parameter for the cc112xSpiWriteTxFifo function to two bytes more than the actual buffer array. This parameter should be set to the actual size of your buffer array

    selina wang said:


        cc112xSpiWriteTxFifo(buffer_to_radio,sizeof(buffer_to_radio)+2);

  • I had tried ,but it all die.

    i use Variable Packet Length,first data is the length of the buffer,

    i send 03 02 01 into TXFIFO.

  • HI

    Then your length parameter should be 3, and your buffer array should be {0x03,0x02,0x01}. I'm not sure what you mean by "it all die". Do you get an FIFO_ERROR or doesn't the radio go into TX? Could you elaborate?

    Please look at the CC1120 Easy Link software example for how to set up a basic RF link with the CC1120:


    http://www.ti.com/lit/zip/swrc253

  • hi,

    I havenot use the longer preamble, all is OK.but when I used the preamble ,used the code:

    trxSpiCmdStrobe(CC1120_SIDLE); //this three strobe are send preamble.
        trxSpiCmdStrobe(CC1120_SFTX);  //this three strobe are send preamble.
        trxSpiCmdStrobe(CC1120_STX);   //this three strobe are send preamble.

        delayms(1800);

        cc112xSpiWriteTxFifo(buffer_to_radio,buffer_to_radio[0]+2);//sizeof(buffer_to_radio));
        
        while (packetSemaphore == 0); 

    and I debug, it stop there:    while (packetSemaphore == 0); 

    when I add  trxSpiCmdStrobe(CC1120_STX);  before the while (packetSemaphore == 0); it can run.

    could you try send a longer preamble wirh a  string of data?

    best regard

  • There is no problem sending a long preamble as you do. I tried the same thing and it sends preamble for 1800 ms before sending the packet.

    // Strobe TX to send packet
    trxSpiCmdStrobe(CC112X_STX);
    // Send preamble for 1,8 s
    waitMs(1800);
    // Write packet to TX FIFO
    cc112xSpiWriteTxFifo(txBuffer, sizeof(txBuffer));

    How is your ISR set up? In the example code the packetSemaphore is set in the ISR routine which is triggered by a falling edge on the PKT_SYNC_RXTX signal on GPIO2.