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.

CC1101: Find transmission frequency

Part Number: CC1101

Hello, I am trying to find the exact frequency to which I transmit from another transmitter, with the rssi approximating me up to + - 0.5 mhz,

however it is not enough to decode the signal correctly. Is there any value to help me find it more accurately, or to decode with a higher tolerance range?

Thank you

  • Javier,

    We have a register inside the CC1101 that will provide an estimate of the frequency difference (or error) between the TX node and the RX node for any given packet.

    Here is a quick snapshot from our SmartRF Studio online guide.

    Here is a function that we have developed to show to convert this information into Hertz.

    /* Select the correct XTAL frequency for the hardware */

    #define SCALING_FREQ (float)((RF_XTAL)/65.536)

    #define SCALING_FREQEST (unsigned long)((RF_XTAL)/16.384)

     

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

    * @fn radio_freq_error

    *

    * @brief Estimate the frequency error from two complement coded

    * data to frequency error in Hertz

    *

    * input parameters

    *

    * @param freq_reg_error - two complement formatted data from transceiver

    *

    * output parameters

    *

    * @return freq_error - 32 bit signed integer value representing

    * frequency error in Hertz

    *

    */

    int radio_freq_error(void) {

    long freq_error_est;

    unsigned char regState;

    /* Read marcstate to check for frequency error estimate */

    trx8BitRegAccess(RADIO_READ_ACCESS | RADIO_BURST_ACCESS, FREQEST, &regState, 1);

    /* Calculate the frequency error in Hz */

    freq_error_est = regState;

    /* the incoming data is 8 bit two complement format, separate "sign" */

    if (freq_error_est > 128) {

    freq_error_est = freq_error_est - 256;

    }

    /* convert the data to hertz format in two steps to avoid integer overuns */

    freq_error_est = freq_error_est * (long)SCALING_FREQEST;

    return ((int)freq_error_est);

    }

    Hope this helps.

    Regards,

    /TA

  • It works in async mode? I have no packet in fifo

    Thank you
  • Does this not help you? If not, then you need to further explain what it is you are trying to do.

    /TA
  • It works, thank you for your help!