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: reading and monitoring FREQOFF_EST

Other Parts Discussed in Thread: CC1120, CC1125, CC1200

We are currently evaluating hardware that uses the CC1120. At the moment we are examining the difference in frequency between our transmitters and our receivers. From what I understand, this value should be in FREQOFF_EST. However, the individual values we are reading from FREQOFF_EST vary significantly - depending on the FREQOFF_CFG config and whether we are using zero IF - up to 30kHz between two sequential readings in some cases. In addition to this, the value varies regardless of whether we are receiving packets or not. So I wish to ask:   When is FREQOFF_EST valid?

  • Not a direct answer to your question, but what I've seen is that enabling feedback to PLL will give a reliable and very accurate frequency estimate.

    Set FREQOFF_CFG to 0x30.

    Did a test using CC1125, but also applicable for CC1120:

    • Receive: EM6 programmed to 868MHz, real frequency 867.989865MHz => 10135Hz frequency offset.
    • Transmit: CAT1 CC1125 EM. Carrier at 868 MHz (offset of a few 100 Hz, not measured)
    • Measured data: Min:10742, Max:10986 (out of 100 measurements)
  • Hi Sverre,

    Thank you very much - now I have some figures with which I can compare my results. But maybe I need to clarify my question more:

    1. When do you read the frequency offset? If after receiving a packet, then how long after receiving a packet?
    2. If you don't receive any packets at all, what value is the of frequency offset? And does that value change over time?

    Thanks again!

  • For a FIFO based system you can read out the frequency estimate after sync found. The registers have no shadow registers meaning that the MSB part may be updated while you read the LSB part. Hence you should read 2-3 times to ensure that the registers got correctly read. When I have checked this with SmartRF Studio, I read out the value after the packet is received (requires that you go to IDLE when packet received).

    You have to have a signal in the channel (either a CW or a packet) to get a valid estimate else I assume that it could start tracking noise.
  • Hi TER,

    Aaaah! The magic word there is IDLE! And yes, we are using FIFO. Previously, my settings included:

    {CC112X_RFEND_CFG1, 0x3F}, // RXOFF_MODE = RX
    {CC112X_RFEND_CFG0, 0x30}, // TXOFF_MODE = RX

    So I was in RX when I was reading the frequency offset, and was thus probably reading noise when our processor finally got round to reading it. I have changed to go to IDLE after RX and TX, and I am still reading the frequency offset after the end of the packet is reached, but it remains the same through multiple readings. If I adjust the Carrier frequency then the frequency offset changes as we expect it to. Now it all makes sense!

    With the same frequency on the development kit and our hardware, our minimum and maximum offset readings are wider than those Sverre mentioned, being: Min = -915, Max = 2135 and Standard Deviation = 501.6935301 for 500 readings, but that's probably hardware implementation.

    TER and Sverre, thank you for your help!
  • Also a question: How do you read the offset estimate in SmartRF Studio?
  • When you have received a packet with smartRF Studio, press the refresh button in the low right corner (you need to tick for register view). Then Studio will read back the registers from CC1200
  • Note that for best accuracy set FREQOFF_CFG to 0x30 or 0x34. This is not the default setting in Studio and needs to be changed by the user.

    According to the information I have the frequency offset estimate accuracy is given by the absolute level of frequency deviation. Typically the frequency offset estimate accuracy will be less than +-3/64*FreqDeviation. 

  • Hi TER and Sverre,

    Thanks, I can read the FREQOFF_EST0 and FREQOFF_EST1 registers from the evaluation boards, but the scaled values they give us are all over the place. 10s of kHz difference between readings when transmitting from TrxEB to TrxEB. I'm guessing I don't have the same config as you do Sverre - would you mind sending me the config you used for your CC1125 (does it need to be translated for the CC1120?) and your scaling factor (from the register explanation of FREQOFF_EST1 - Frequency Offset Estimate MSB)? I would like to run the same test here. Also, I'm not sure what an EM6 is in this context (and can't seem to find it by a quick search of the TI website).

    The reason I ask all of this is that we are trying to evaluate our hardware design. The difference between minimum and maximum offsets that you measured Sverre (Min:10742, Max:10986 (out of 100 measurements)) is an order of magnitude less than ours (about 2400Hz difference), and I want to know why. Maybe it's RF config - we are using zero IF for 200kHz RX bandwidth and about 24 kHz deviation - maybe it's the hardware design. I note the comment of: "Typically the frequency offset estimate accuracy will be less than +-3/64*FreqDeviation."

    Thank you for your help.
  • The boards used for testing were

    - A standard CC1120EM (evaluation module) as receiver (I wrote CC1125 previously - this is wrong).

    - A CAT1 CC1125EM with TCXO as a transmitter.  

    EM6 is just an internal name for the board used as a receiver (Evaluation Module number 6). 

    We used the 1.2 kbps, +/-4 kHz deviation, 25 kHz RX filter BW setting from SmartRF Studio for the test.

    Just to make sure you do the FREQOFF_EST to frequency conversion correctly:

    IF hex2dec(FREQOFF_EST) < 32768 then frequency offset = hex2dec(FREQOFF_EST)/2^18*32000000/4;

    ELSE  frequency offset = (hex2dec(FREQOFF_EST)-65536)/2^18*32000000/4)

    Will try to find time to do some measurements in the lab today. Maybe the difference is related to zero IF.

  • Hi Sverre,

    I have managed to replicate your experiment with 1.2 kbps, +/-4 kHz deviation, 25 kHz RX filter BW setting from SmartRF Studio, and I get similar minimum and maximum values for that deviation - both on the TrxBEs and our hardware. I have also tweaked our config and get expected minimum and maximum values for 24kHz deviation. And the frequency offset calculations you mentioned above give me the same results. Thank you for your help!

    I am curious as to where " +-3/64*FreqDeviation" comes from. And whether the +- means approximately or a range of +/- (though maybe I'm too pedantic ;) ). And for what values of FREQOFF_CFG it is valid.

    Thanks again!
  • Good to read that you have made progress.

    The statement regarding " +-3/64*FreqDeviation" comes from a simulation with 50 kbps, +/-25 kHz deviation where the designer saw the error values {-3, -2, -1 0, 1, 2}/64*Deviation.