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.

Unable to change CC1200 TX freq.

Guru 15580 points
Other Parts Discussed in Thread: CC1200

My custom CC1200 board seems to transmit on 774MHz no matter what values I put in FREQ2, FREQ1, FREQ0. Here are the steps I follow:

GPIO_write(hGpio,TX_ENABLE,1); //Enable Transceiver

trxSpiCmdStrobe(CC120X_SRES);// Write registers to radio

USTIMER_delay(1000);
cc1200_init_registers();
trxSpiCmdStrobe(CC120X_SFSTXON);
USTIMER_delay(1000);
createPacket(txBuffer);
cc120xSpiWriteTxFifo(txBuffer, sizeof(txBuffer));// Write packet to TX FIFO
trxSpiCmdStrobe(CC120X_STX);// Strobe TX to send packet

What am I doing wrong?

  • Try running a SCAL strobe

  • Ter,

    (Looks like you're also a work-a-holic....:)

    TER said:
    Try running a SCAL strobe

    Doesn't SFSTXON perform the required cal? (/*  SFSTXON - Enable and calibrate frequency synthesizer. */). I have tried SCAL also (instead of CC120X_SFSTXON) but it did not help. As I understand it, the SCAL calibrates the VCO then turns it off (/*  SCAL    - Calibrate frequency synthesizer and turn it off. */).

    FYI, here's my register file:


    static const registerSetting_t preferredSettings[]=
    {
    {CC120X_IOCFG2, 0x06},
    {CC120X_SYNC_CFG1, 0xA8},
    {CC120X_SYNC_CFG0, 0x13},
    {CC120X_DEVIATION_M, 0x99},
    {CC120X_MODCFG_DEV_E, 0x05},
    {CC120X_DCFILT_CFG, 0x26},
    {CC120X_PREAMBLE_CFG0, 0x8A},
    {CC120X_IQIC, 0x00},
    {CC120X_CHAN_BW, 0x02},
    {CC120X_MDMCFG1, 0x42},
    {CC120X_MDMCFG0, 0x05},
    {CC120X_SYMBOL_RATE2, 0xC9},
    {CC120X_SYMBOL_RATE1, 0x99},
    {CC120X_SYMBOL_RATE0, 0x99},
    {CC120X_AGC_REF, 0x2F},
    {CC120X_AGC_CS_THR, 0xF7},
    {CC120X_AGC_CFG1, 0x00},
    {CC120X_AGC_CFG0, 0x80},
    {CC120X_FIFO_CFG, 0x00},
    {CC120X_SETTLING_CFG, 0x03},
    {CC120X_FS_CFG, 0x12},
    {CC120X_WOR_CFG0, 0x20},
    {CC120X_WOR_EVENT0_LSB, 0x14},
    {CC120X_PKT_CFG2, 0x00},
    {CC120X_PKT_CFG0, 0x20},
    {CC120X_RFEND_CFG0, 0x09},
    {CC120X_PKT_LEN, 0xFF},

    {CC120X_IF_MIX_CFG, 0x18},
    {CC120X_TOC_CFG, 0x03},
    {CC120X_MDMCFG2, 0x00},
    {CC120X_FREQ2, 0x05},
    {CC120X_FREQ1, 0xA3},
    {CC120X_FREQ0, 0x33},
    {CC120X_IF_ADC1, 0xEE},
    {CC120X_IF_ADC0, 0x10},
    {CC120X_FS_DIG1, 0x04},
    {CC120X_FS_DIG0, 0x55},
    {CC120X_FS_CAL1, 0x40},
    {CC120X_FS_CAL0, 0x0E},
    {CC120X_FS_DIVTWO, 0x03},
    {CC120X_FS_DSM0, 0x33},
    {CC120X_FS_DVC0, 0x17},
    {CC120X_FS_PFD, 0x00},
    {CC120X_FS_PRE, 0x6E},
    {CC120X_FS_REG_DIV_CML, 0x1C},
    {CC120X_FS_SPARE, 0xAC},
    {CC120X_FS_VCO0, 0xB5},
    {CC120X_IFAMP, 0x0D},
    {CC120X_XOSC5, 0x0E},
    {CC120X_XOSC1, 0x03},
    };

  • It could look like your frequency word is wrong, I got 53 MHz when I used it as input to SmartRF Studio...

  • Thanks TER. That was a typo. I am now using:

    {CC120X_FREQ2, 0x5A},
    {CC120X_FREQ1, 0x33},
    {CC120X_FREQ0, 0x33},

    As before, it doesn't matter what I put into these registers. I must be doing something else wrong.

    I think it has something to do with my SPI interface timing. I am not using an MSP430, therefore I cannot use your Macros. I have built my own SPI command structure but it appears not to be working properly. For example, here are the SPI transactions during the register programming of the FREQ registers. Notice that the chip status byte indicates that the frequency synth calibration is running. 

    Do I need to wait for this to complete before continuing the register programming?