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.

CC1110 Delay Radio init and Strobe Receive

Other Parts Discussed in Thread: TEST2

Hello,

I have a problem with a basic receive program.

When I load the radio registers and I give directly a strobe RX command the receiver don't reacts on a rf signal from my signal generator, rssi won't change.

When I put in a delay of 175us between loading the radio registers and the SRX command the receiver is oke and I see the rssi changes when I change the output power of the signal generator

I can't find this kind of specifications in the datasheet of the CC1110F32.

Can anyone tell me if this is a standard behavour of the chip?

Or what causes the problem that I have to put in a "long" delay.

Kind Regards

Danny

The Netherlands

  • Hi,

    Please see DN110 for state transition times on CC1110.

    /Jonas

  • Hi Jonas,

    Thanks for showing me the DN110 document.

    The answer is still not clear but reading the DN110 and again the CC1110 datasheet I have made some solution but don't know if this solves the problem in all cases. I have put in a manual calibration SCAL befor I do anything with the radio.

    After initialising the chip, io and clock and give the radio an SIDLE and wait for IDLE state:  I put the radio in SCAL mode and wait for IDLE state. Then loading the radio registers and directly strobe SRX.

    Then the receiver works fine and showing me the right RSSI values.

    It is a strange behafour (refering the the statediagram page186 of the datasheet) because the option FS_AUTOCAL = When going from IDLE to RX or TX (or FSTXON)  is active and the chip should do the calibration automatically before going into RX?

      MCSM2   = 0x07;
      MCSM1   = 0x30;
      MCSM0   = 0x18;

    Kind Regards,

    Danny

  • Danny,

    You should set the radio registers before doing the calibration.

    If you are using FS_AUTOCAL = 01 calibration is preformed when going from IDLE to RX or TX, so no manual calibration is needed.

    Pseudocode:

    int main(void)

    {

      // Initialize your board

      halBoardInit();

     

      // Use default settings for RF chip, load RF registers 

      comlabRfSetup();

      

      // Set radio to known state, e.g you can strobe SIDLE here 

      comlabRfStopRadio();

      

      // Start test cases here

    }

    //Jonas

  • Hi Jonas,

    Sorry for late response, I had the flu for a week long.


    The solution You described now is the first code I tried to get the CC1110 to work, but then the receiver won't work.

    (Also described in my two posts:)
    The problem is after writing the registers and directly send the SRX command the receiver won't calibrate the receiver propperly.
    When I put in a delay of 175us between loading the radio registers and the SRX command the receiver is ok.
    The second solution if have found is to preform first a calibration and then load the registers and directly send the SRX command the receiver is also ok.

    This is not behavour described in the datasheets.

    Are there any other knows issues about this?
    Are there startup problems of the RF chip?
    I have 10pcb's with the CC1110 and al behave the same way.

    Please do some research instead of giving standard solutions.

    Kind Regards.
    Danny

  • Hi,

    can you please post your complete register settings?

    Rgds,

    Jonas

  • Hello Jonas,

    This is my complete init code and at the end setting receive command.

      P0 = 0;
      P1 = 0;
      P2 = 0; 
      PERCFG |= PERCFG_U1CFG;//UART1 Alt2 loc. RX = P1_7  TX = P1_6


      WDCTL = 0x05;//watchdog mode 0,236sec   
      P0SEL = 0x00;//All IO
      P1SEL = 0xC0;//P1_7 & P1_6 Peripheral function
      P2SEL = 0x00;//All IO 
      P0DIR = 0xFF;//All output
      P1DIR = 0x7F;//Pin7 input zonder weak up
      P2DIR = 0xFF;//All output 
      P1INP = 0x80;//Weak up bit7 (RX) disabled
      
      CLKCON = CLKCON_OSC32 | TICKSPD_DIV_1 | CLKSPD_DIV_1;// 0x80;

    if (MARCSTATE != MARC_STATE_IDLE)  //if RF not idle force to idle mode.
      {
        RFST = RFST_SIDLE;//0x04;
      }
      while (MARCSTATE != MARC_STATE_IDLE)
      {
        P1_1 = 1;
        P1_0 = 1;    
        WDCTL = 0xA5;
        WDCTL = 0x55;
      } 
      P1_1 = 0;
      P1_0 = 0;   
     
      RFIM = 0xFF;

      //manual calibration inserted otherwise receiving won't function propperly.
      RFST = RFST_SCAL;
      while (MARCSTATE != MARC_STATE_IDLE)
      {
        P1_1 = 1;
        P1_0 = 1;    
        WDCTL = 0xA5;
        WDCTL = 0x55;
      } 
      P1_1 = 0;
      P1_0 = 0;   
     
     
      IOCFG2 = 0x00; 
      IOCFG1 = 0x00;  
      IOCFG0 = 0x00;
     
      SYNC1 = 0x54;
      SYNC0 = 0x3D; 

      PKTLEN = 0xFF;  
      PKTCTRL1 = 0x60;//PQT -> 12
      PKTCTRL0  = 0x00;
       
      ADDR      = 0x00;
      CHANNR  = 0x00;
     
      FSCTRL1 = 0x08;
      FSCTRL0 = 0x00;
     
      FREQ2 = 0x21;
      FREQ1 = 0x6B;
      FREQ0 = 0xD0;
     
      MDMCFG4 = 0x5C;
      MDMCFG3 = 0x04; 
      MDMCFG2 = 0x06;
      MDMCFG1 = 0x22;
      MDMCFG0 = 0xF8;
     
      DEVIATN = 0x44;
       
      MCSM2   = 0x07;
      MCSM1   = 0x00;
      MCSM0   = 0x19;
     
      FOCCFG  = 0x2E;
      BSCFG = 0xBF;  
     
      AGCCTRL2 = 0x43;
      AGCCTRL1 = 0x09;
      AGCCTRL0 = 0xB5;

      FREND1  = 0xB6;
      FREND0  = 0x10;

      FSCAL3 = 0xEA;
      FSCAL2 = 0x2A;
      FSCAL1 = 0x00;
      FSCAL0 = 0x1F;
      FSTEST = 0x59;
     
      TEST2 = 0x81;
      TEST1 = 0x35;
      TEST0 = 0x09;
       
      PA_TABLE7 = 0x00;
      PA_TABLE6 = 0x00;
      PA_TABLE5 = 0x00;
      PA_TABLE4 = 0x00;
      PA_TABLE3 = 0x00;
      PA_TABLE2 = 0x00;
      PA_TABLE1 = 0x00;
      PA_TABLE0 = 0xC2;     
     
     
      S1CON = 0;
      RFIF = 0;
      RFIM = 0;

      
      cnt = RFD;//trash data in RFD
      RFST = RFST_SRX;
      RFIF = 0;
      RFTXRXIF = 0;
      RFTXRXIE = 1;
      S1CON = 0;

    //when I put in a delay with a for loop of about 175usec here, the receiver also works ok.


      while (MARCSTATE != MARC_STATE_RX)
      {
        P1_1 = 1;
        P1_0 = 1;    
        WDCTL = 0xA5;
        WDCTL = 0x55;
      } 
      P1_1 = 0;
      P1_0 = 0; 

     

    Kind Regards.

    Danny

  • Hi Danny,

    Sorry for the late response. 

    I assume that you mean that by "receiver works ok", you mean that you read a valid RSSI value. 

    The RSSI value is based on the gain setting in the RX chain and the measured signal level in the channel. In RX mode, the RSSI value can be read continuously from the RSSI status register until the demodulator detects a sync word (when sync word detection is enabled). At that point the RSSI readout value is frozen until the next time the chip enters RX mode. If sync word detection is disabled, the RSSI register will be continuously updated.

    With the settings you provided it will take approx 765us before you can read a fully valid RSSI value.

    Please see DN505 for a very detailed description about RSSI Interpretation and Timing.

    Hope this sorts out your problem!

    Cheers,

    Jonas

  • Hi Jonas,

    "receiver works ok" means indeed a valid rssi value based on my RF signal generator output power at the carrier frequency.

    I have programmed the CC1110 with the RSSI value is send to the computer through the uart.

    When the receiver is not working ok the rssi value is for the hole testing period (60seconds) between -100dBm and -110dBm. So the receiver is working but I think on the wrong frequency. During the testing period the marcstate value stays on receiving. I can conclude that the rssi is not frozen and also the timing (765us) is excluded from the problem.

    Is also did a readout test befor putting the radio in receive. But al the registers where updated with the correct byte value.

    I seems like a frequency calibration problem.

    The 8051 core is running at the maximum of 26MHz.

    It is so strange that if I do a manual calibration at the starup, while the radio registers are the incorrect values, and than loading the registers with the right values the receiver works fine after the SRX command with calibration.

    Can it be a undefined (calibration) state in the radio hardware?

    Or maybe a Memory acces problem of the radio interface?

    Regards.

    Danny

     

     

  • Hi,

    Have you tried running this on TI reference design? If so do you see the same problem? The register settings you posted, are they read after the problem occurred? Can you please post the registers FSCAL0, x1, x2, x3 from after you have seen the problem? I'm interested in what your calibration values are, to be able to judge if there is any problem with your calibration.

    Jonas

  • Hello Jonas,

    I've tried the firmware on the TI smart RFCC1110-868 1.3 board and gives the same problem.

    These are the FSCAL values after the problem:

    no change in RSSI on external RF signal from generator
    FSCAL3 = 0xEF
    FSCAL2 = 0x2C
    FSCAL1 = 0x04
    FSCAL0 = 0x1F

     

    These are the FSCAL values when the receiver works:

    RSSI change on external RF signal from generator
    FSCAL3 = 0xEF
    FSCAL2 = 0x2C
    FSCAL1 = 0x16
    FSCAL0 = 0x1F

    I've checked the register settings before the SRX command and after the command. All the values are the same. Except for the FSCAL values after the SRX command because off the auto calibration.

    Kind Regards.

    Danny

  • Danny,

    In your code you need to add functionality to check if the HS XOSC is stable. Start-up time for HS XOSC is typ 250us. 

    So instead of: CLKCON = CLKCON_OSC32 | TICKSPD_DIV_1 | CLKSPD_DIV_1;// 0x80;

    You should have something like:

    /******************************************************************************

    * @fn  clockSetMainSrc

    *

    * @brief  Function for setting the main system clock source.

    *         The function turns off the clock source that is not being used.

    *         TICKSPD is set to the same frequency as the source.

    *

    * @param  uint8 source (one of CLOCK_SRC_HFRC or CLOCK_SRC_XOSC)

    *

    * @return void

    *

    ******************************************************************************/

    void clockSetMainSrc(uint8 source)

    {

        register uint8 osc32k_bm = CLKCON & CLKCON_OSC32K_BM;


        // Source can have the following values:

        // CLOCK_SRC_XOSC   0x00  /*  High Speed Crystal Oscillator (XOSC) */

        // CLOCK_SRC_HFRC   0x01  /*  High Speed RC Oscillator (HS RCOSC) */

        if (source == CLOCK_SRC_HFRC)

        {

            SLEEP &= ~SLEEP_OSC_PD_BM;           // power up both oscillators

            while (!(SLEEP & SLEEP_HFRC_STB_BM));            // Wait until HS RCOSC is stable

            

            CLKCON = (CLKCON & ~CLKCON_CLKSPD_BM) | CLKCON_OSC_BM | CLOCK_SRC_HFRC;            // change system clock source to HS RCOSC

            

            while (!(CLKCON & CLKCON_OSC_BM));  // wait until CLKCON.OSC = 1 

                                                // (system clock running on HS RCOSC)

            SLEEP |= SLEEP_OSC_PD_BM;           // power down the unused oscillator

        }

        else if (source == CLOCK_SRC_XOSC)

        {

            SLEEP &= ~SLEEP_OSC_PD_BM;           // power up both oscillators

            while (!(SLEEP & SLEEP_XOSC_STB_BM)); // Wait until HS XOSC is stable

            

            CLKCON &= ~CLKCON_OSC_BM;           // change system clock source to HS XOSC

            while (CLKCON & CLKCON_OSC_BM);     // wait until CLKCON.OSC = 0 

                                               // (system clock running on HS XOSC)

            SLEEP |= SLEEP_OSC_PD_BM;         // power down the unused oscillator

        }

    Then call clockSetMainSrc(CLOCK_SRC_XOSC);

    //Jonas

  • Hi Jonas,

    The HS XOSC stable check solves the problem!

    Many, many, thanks for Your input.

     

    Kind Regards.

    Danny

  • Hi,

    Glad you solved it. Sorry for not being very clear from the start.

    Please use the "verified answer" button to indicate that the problem is solved.

    Cheers,

    Jonas

  • Hi,

    i have a same problem. I use the CC1110/CC1111 and try to write a code for the radio. I generate the carrier from the example code. The Register configuration i set it from SMartRF Studio 7. But if i want to send data, i don't receive it and on the spectrum analyzer i can not see my carrier more. Something i have wrong on my code but what?

    Please help me.

    Here is my code:

    /* RF settings SoC: CC1110 */  
    PKTCTRL0 = 0x05; l
    FSCTRL1 = 0x06;  
    FREQ2 = 0x10;  
    FREQ1 = 0xA7; 
    FREQ0 = 0x62;  
    MDMCFG4 = 0xF5;  
    MDMCFG3 = 0x83;  
    MDMCFG2 = 0x33; 
    DEVIATN = 0x15;  
    MCSM0 = 0x18; 
    FOCCFG = 0x17; 
    FREND0 = 0x11;  
    FSCAL3 = 0xE9;  
    FSCAL2 = 0x2A; 
    FSCAL1 = 0x00; 
    FSCAL0 = 0x1F; 
    TEST1 = 0x31; 
    TEST0 = 0x09; 
    PA_TABLE1 =0x60;
    PA_TABLE0 = 0x60;
    IOCFG0 = 0x06; 
    LQI = 0xF0; 
    PKTSTATUS = 0x80; 

    SYNC1 = 0xAA; 
    SYNC0 = 0xAA;

    RFST = 0x03;

    while (1)
    {

    RFD = RadioTxBuffer[zz];

    for( long int k=0; k<7000; k++);

    RFTXRXIE = 1;

    EA = 1;

    }

    #pragma vector = RFTXRX_VECTOR
    __interrupt void RFTXRX()
    {
    RFTXRXIF = 0;
    RFTXRXIE = 0;
    }

  • This is the same question as in http://e2e.ti.com/support/wireless_connectivity/f/156/t/341608.aspx. The post is answered in the other thread.