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 send packet issues

Other Parts Discussed in Thread: CC2500, MSP430F2274

I am currently using the CC25000EMK on the MSP-EXP430FG4618 experimenter board to communicate with the eZ430-RF2500.

This is utilising a modified version of the CCxxxxEMK code running on the RF2500T to gain a common RF interface between the two boards.

I am trying to send a packet from the eZ430 to the EXP board. The packet that I attempt to send appears to be successfully sent, it contains the address and pin number of one of the LEDs on the EXp board and this LED successfully toggles as desired.

The issue is that this is meant to happen multiple times, however when invoking RFSendPacket(char *txBuffer, char size) for the first time, although the packet appears to send, the RFSendPacket method never completes. it is hanging on this line:

 

while (TI_CCIGDO0_PxIN & TI_CC_GDO0_PIN)   // Wait GDO to clear -> end of pkt

 

above the method in the cc2500 code, it is stated that "GDO must be configured to be asserted when when sync word is sent and de-asserted at end of packet, which is accomplished by setting the IOCFG0 register to 0x06"

i assume that i have the GDO mapped correctly, as the line to sync the Tx is: 

 

while (! TI_CCIGDO0_PxIN & TI_CC_GDO0_PIN)   // wait GDO to go hi -> sync TX'ed

 

which uses the exact same check values, just when they are not high.

does anyone know where it issue lies? my guess would be with the "setting the IOCFG0 register to 0x06" however I am not sure how to do this, i assumed it would be automatic?

  • Hi,

    I think you are right that the problem is related to the not properly configured GDO0 pin on the CC2500. The source code expects it to be configured to output the Start of Frame Delimiter (SFD), which means it will toggle low->high whenever sync word is transmitted/received in start of packet (nice to use to tell the receiver MCU there is incoming data), and toggle high->low at end of packet. It's a very commonly used control signal to use for an MCU. It is the IOCFG0 register that controls what function the GDO0 pin (GDO = general data output) should have.

    I am not familiar with what kind of software you are using, but if you've based it upon the eZ430-RF2500 example you probably have a file called mrfi_CC2500_spi.c , in which you have the function void mrfiSpiWriteReg(uint8_t addr, uint8_t value) (have a look in the "components/mrfi/radios/cc2500" folder), which you can use to write that register. Alternatively, there might be a "init" (initialization) function of some sort you've forgotten to use that does this, as I assume the eZ430-RF2500 example got the CC2500's GDOx pins configured correctly. The address and the possible values for the IOCFG0 register is listed in the CC2500 datasheet.

    If you are uncertain about whether you have the GDO0 pin configured correctly, you may try to read back the register value from the CC2500 (e.g. by using the uint8_t mrfiSpiReadReg(uint8_t addr) function.)

  • Thanks for the speedy reply!

    unfortunately, it is not based on the sensor monitor example, it is based on the the IAR project called "CCxxxxEMK_interface" in the "wireless interface using msp430" folder of the slac129a. This is the zip file i downloaded containing it:      http://www.ti.com/litv/zip/slac129a

    there is a function   void TI_CC_SPIReadBurstReg(char, char *, char); with the following description:

    //  void TI_CC_SPIReadBurstReg(char addr, char *buffer, char count)
    //
    //  DESCRIPTION:
    //  Reads multiple configuration registers, the first register being at address
    //  "addr".  Values read are deposited sequentially starting at address
    //  "buffer", until "count" registers have been read.

    is this the equivalent for this interface?

    for reference, here is the file detailing the pin and port setup of the GDO0:

    note: this *should* be modified for the MSP430F2274 of the eZ430-RF2500, obviously i have made a mistake somewhere! commented out sections are due to this component not being present on the board

    #define TI_CC_LED_PxOUT         P1OUT
    #define TI_CC_LED_PxDIR         P1DIR
    #define TI_CC_LED1              BIT0
    #define TI_CC_LED2              BIT1
    // #define TI_CC_LED3              BIT2
    // #define TI_CC_LED4              BIT3

    #define TI_CC_SW_PxIN           P1IN
    #define TI_CC_SW_PxIE           P1IE
    #define TI_CC_SW_PxIES          P1IES
    #define TI_CC_SW_PxIFG          P1IFG
    // #define TI_CC_SW1               0x10
    #define TI_CC_SW2               BIT2
    // #define TI_CC_SW3               0x40
    // #define TI_CC_SW4               0x80

    #define TI_CC_GDO0_PxSEL        P2SEL
    #define TI_CC_GDO0_PxOUT        P2OUT
    #define TI_CC_GDO0_PxIN         P2IN
    #define TI_CC_GDO0_PxDIR        P2DIR
    #define TI_CC_GDO0_PxIE         P2IE
    #define TI_CC_GDO0_PxIES        P2IES
    #define TI_CC_GDO0_PxIFG        P2IFG
    #define TI_CC_GDO0_PIN          BIT6

    #define TI_CC_GDO1_PxOUT        P3OUT
    #define TI_CC_GDO1_PxIN         P3IN
    #define TI_CC_GDO1_PxDIR        P3DIR
    #define TI_CC_GDO1_PIN          BIT2

    #define TI_CC_GDO2_PxOUT        P2OUT
    #define TI_CC_GDO2_PxIN         P2IN
    #define TI_CC_GDO2_PxDIR        P2DIR
    #define TI_CC_GDO2_PIN          BIT7

    #define TI_CC_CSn_PxOUT         P3OUT
    #define TI_CC_CSn_PxDIR         P3DIR
    #define TI_CC_CSn_PIN           BIT0


    //----------------------------------------------------------------------------
    // Select which port will be used for interface to CCxxxx
    //----------------------------------------------------------------------------
    #define TI_CC_RF_SER_INTF       TI_CC_SER_INTF_USCIB0  // Interface to CCxxxx

  • just to let you know, got the issue sorted, seems to have been a problem with the EXP board not sending the reply as opposed to the eZ430 not being configured correctly. it now successfully sends constant packets =]

**Attention** This is a public forum