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.

CC2500 state switching (strobe) problem

Other Parts Discussed in Thread: CC2500

Hi!

I've got a problem with switching between state of CC2500 using strobe commands. SPI communication works well. Configuration registers are like below:

CC2500_SETTINGS cc2500_reg_val = {
    0x06,  // IOCFG0        GDO0Output Pin Configuration
    0x47,  // PKTCTRL1      Packet Automation Control
    0x44,  // PKTCTRL0      Packet Automation Control
    0x18,  // ADDR          Device Address
    0x58,  // CHANNR        Channel Number
    0x12,  // FSCTRL1       Frequency Synthesizer Control
    0x5D,  // FREQ2         Frequency Control Word, High Byte
    0x93,  // FREQ1         Frequency Control Word, Middle Byte
    0xB1,  // FREQ0         Frequency Control Word, Low Byte
    0x2D,  // MDMCFG4       Modem Configuration
    0x3B,  // MDMCFG3       Modem Configuration
    0xF1,  // MDMCFG2       Modem Configuration
    0x82,  // MDMCFG1       Modem Configuration
    0x00,  // DEVIATN       Modem Deviation Setting
    0x18,  // MCSM0         Main Radio Control State Machine Configuration
    0x1D,  // FOCCFG        Frequency Offset Compensation Configuration
    0x1C,  // BSCFG         Bit Synchronization Configuration
    0xC7,  // AGCCTRL2      AGC Control
    0x00,  // AGCCTRL1      AGC Control
    0xB0,  // AGCCTRL0      AGC Control
    0xB6,  // FREND1        Front End RX Configuration
    0xEA,  // FSCAL3        Frequency Synthesizer Calibration
    0x00,  // FSCAL1        Frequency Synthesizer Calibration
    0x11,  // FSCAL0        Frequency Synthesizer Calibration
    0x04,     // PKTLEN
    0xFF     //    PATABLE
};

My program sends 4B of data (dest address, source address, and 2B of data from a sensor) in a one second time interval. The main problem is that when I fill TX_FIFO with a valid data and strobe STX command for the first time, the device remains in IDLE state (checked with the proper read register). During the second and another iterations the device enters TX state but stays in this state (but it should go to IDLE afterwards according to config). What is more the GPIO0 pin which should assert/deassert as described in the datasheet (generating an interrupt for uC) remains low all time (I can switch its state using the config register though).

Can please somebody explain to me what am I doing wrong and why my cc2500 behaves so weird? I got a plenty of this devices and I have the same problem with every of them so it must be sth wrong with the config (which I took from SmartRF Studio with a small changes suitable for my design). I would very appreciate any helpful advice.

  • The CC2500 only has a 64 byte FIFO, you are sending 75 bytes of data. You will get a FIFO overflow error and the device will get stuck.

    Regards,
    /TA
  • But I am sending only 4 bytes each iteration...

  • Where did these configuration originate from?, Can you send me the configuration in XML format (from SmartRF studio).

    Please also try a set of configurations that is closer to the recommended settings from SmartRF Studio.

    /TA
  • <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE configuration SYSTEM "C:/Program Files (x86)/Texas Instruments/SmartRF Tools/SmartRF Studio 7/config/xml/configdata.dtd"[]>
    <dcpanelconfiguration>
        <Devicename>CC2500</Devicename>
        <Description>Saved configuration data</Description>
        <registersettings>
            <Register>
                <Name>ADDR</Name>
                <Value>0x18</Value>
            </Register>
            <Register>
                <Name>AGCCTRL0</Name>
                <Value>0xb0</Value>
            </Register>
            <Register>
                <Name>AGCCTRL1</Name>
                <Value>0x00</Value>
            </Register>
            <Register>
                <Name>AGCCTRL2</Name>
                <Value>0xc7</Value>
            </Register>
            <Register>
                <Name>BSCFG</Name>
                <Value>0x1c</Value>
            </Register>
            <Register>
                <Name>CHANNR</Name>
                <Value>0x58</Value>
            </Register>
            <Register>
                <Name>DEVIATN</Name>
                <Value>0x00</Value>
            </Register>
            <Register>
                <Name>FOCCFG</Name>
                <Value>0x1d</Value>
            </Register>
            <Register>
                <Name>FREND1</Name>
                <Value>0xb6</Value>
            </Register>
            <Register>
                <Name>FREQ0</Name>
                <Value>0xb1</Value>
            </Register>
            <Register>
                <Name>FREQ1</Name>
                <Value>0x93</Value>
            </Register>
            <Register>
                <Name>FREQ2</Name>
                <Value>0x5d</Value>
            </Register>
            <Register>
                <Name>FSCAL0</Name>
                <Value>0x11</Value>
            </Register>
            <Register>
                <Name>FSCAL1</Name>
                <Value>0x00</Value>
            </Register>
            <Register>
                <Name>FSCAL3</Name>
                <Value>0xea</Value>
            </Register>
            <Register>
                <Name>FSCTRL1</Name>
                <Value>0x12</Value>
            </Register>
            <Register>
                <Name>IOCFG0</Name>
                <Value>0x06</Value>
            </Register>
            <Register>
                <Name>MCSM0</Name>
                <Value>0x18</Value>
            </Register>
            <Register>
                <Name>MDMCFG1</Name>
                <Value>0x82</Value>
            </Register>
            <Register>
                <Name>MDMCFG2</Name>
                <Value>0xf1</Value>
            </Register>
            <Register>
                <Name>MDMCFG3</Name>
                <Value>0x3b</Value>
            </Register>
            <Register>
                <Name>MDMCFG4</Name>
                <Value>0x2d</Value>
            </Register>
            <Register>
                <Name>PA_TABLE0</Name>
                <Value>0xff</Value>
            </Register>
            <Register>
                <Name>PKTCTRL0</Name>
                <Value>0x44</Value>
            </Register>
            <Register>
                <Name>PKTCTRL1</Name>
                <Value>0x47</Value>
            </Register>
            <Register>
                <Name>PKTLEN</Name>
                <Value>0x04</Value>
            </Register>
        </registersettings>
        <dcpanel>
            <Property name="m_chkRegView" role="44">2</Property>
            <Property name="m_chkRfParameters" role="44">2</Property>
            <Property name="m_tabUserMode" role="37">1</Property>
            <Property name="m_easyModeSettings" role="33">-1</Property>
            <Property name="m_typicalSettings" role="33">-1</Property>
            <Property name="m_testFuncPanel" role="37">2</Property>
        </dcpanel>
        <rfparameters>
            <Property name="Xtal frequency" role="46">26.000000</Property>
        </rfparameters>
        <conttx>
            <Property name="m_rbtModulated" role="45">1</Property>
            <Property name="m_rbtUnmodulated" role="45">0</Property>
            <Property name="m_cmbDataFormat" role="46">-1</Property>
            <Property name="m_chkFreqSweep" role="44">0</Property>
            <Property name="m_chkChanSweep" role="44">0</Property>
        </conttx>
        <contrx>
            <Property name="m_cmbDataFormat" role="46">-1</Property>
            <Property name="m_chkAutoScroll" role="44">2</Property>
        </contrx>
        <packettx>
            <Property name="m_edtPayloadSize" role="42">4</Property>
            <Property name="m_edtPacketCount" role="42">100</Property>
            <Property name="m_edtPacketCountEsy" role="42">100</Property>
            <Property name="m_edtRandomPacketData" role="42">44 40 </Property>
            <Property name="m_edtPacketData" role="42"></Property>
            <Property name="m_edtAccessAddress" role="42"></Property>
            <Property name="m_edtDeviceAddress" role="42"></Property>
            <Property name="m_chkAddSeqNbr" role="44">2</Property>
            <Property name="m_chkInfinite" role="44">0</Property>
            <Property name="m_chkInfiniteEsy" role="44">0</Property>
            <Property name="m_rbtRandom" role="45">1</Property>
            <Property name="m_rbtText" role="45">0</Property>
            <Property name="m_rbtHex" role="45">0</Property>
            <Property name="m_chkAdvanced" role="44">0</Property>
        </packettx>
        <packetrx>
            <Property name="m_edtPacketCount" role="42">100</Property>
            <Property name="m_edtPacketCountEsy" role="42">100</Property>
            <Property name="m_edtAccessAddress" role="42"></Property>
            <Property name="m_chkInfinite" role="44">0</Property>
            <Property name="m_chkInfiniteEsy" role="44">0</Property>
            <Property name="m_cmbViewFormat" role="46">0</Property>
            <Property name="m_chkSeqNbrIncluded" role="44">2</Property>
            <Property name="m_edtDumpFile" role="42"></Property>
            <Property name="m_chkAdvanced" role="44">0</Property>
            <Property name="m_chk802154gMode" role="44">0</Property>
        </packetrx>
        <commandpanel>
            <Property name="m_chkInsertLength" role="44">0</Property>
            <Property name="m_edtTxFifo" role="42"></Property>
            <Property name="m_edtRxFifo" role="42"></Property>
            <Property name="m_cmbInstrInput" role="46">-1</Property>
        </commandpanel>
    </dcpanelconfiguration>
    

    The config from SmartRF Studio. I made veryy little changes which are crucial for my project and should not cause these weird behavior of the device.

  • Well, now I am using a 10kbits current optimized configuration set from SmartRF Studio 7 v2.2.0. I have only changed Variable Packet Size to Fixed Packet Size (size of 4 bytes), changed the Address, enabled data whitening.

    When I check the state after sending STX command strobe, it is TX_State and after circa 10ms it goes to IDLE - which is good.
    But I still do not get the GPIO0 state change (assert/deassert) when the device goes to TX. Do you have any idea why?