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.

Need Help for Simple EZ430-RF2500 Communication

Other Parts Discussed in Thread: CC2500, MSP430F2274, MSP430F2619, CC1100, SIMPLICITI, Z-STACK

Hello,

I have been looking at what would be the best way in order to use the CC2500 device with two different MSP430 microcontrollers (MSP430F2274 from EZ430-RF2500 and MSP430F2619).

I have six EZ430-RF2500 modules. The EZ430-RF2500 Sensor Monitor Software is provided and works perfectrly good.

In the slaa325 pack that you provide, it is explained how to Interface the MSP430 to CC1100/2500. Code and library are also provided.

I have been trying to configure the EZ430-Rf2500 with the code from slaa325, but I couldn't make it work.

 

I wanted to know if someone could provide me with the working project. Everyone seems to provide with bits of code and it is really hard to analyze them. I am using IAR.

A simple program transmitting a packet to the receiver and switching a LED would be all I ask for.

 

I thank you all for your help,

Eric

  • Wow, my eyes stretched bigger than an apple when I saw this

    http://www.zgus.com/rf/simpliciTI_for_CCE/_porting_notes.txt

    [:)][:)][:)][:)][:)][:)][:)][:)][:)][:)][:)][:)][:)][:)][:)][:)][:)][:)]

  • How can I make a mesh network in simpliciti? explain me wider?

  • JEYASEELAN ARULANANTHAJOTHIE SARAS said:

    How can I make a mesh network in simpliciti? explain me wider?

    SimpliciTI only supports a Star or Peer-to-Peer topology and not Mesh.  For a Mesh network, the Zigbee Z-Stack is required.

  • Maxx said:

    @Vnlotus

    I won't be able to upload before next week, because i'm away tomorrow, and this week end. I hope it doesn't compromise your expectations!

    @Maxx and expert,

    I really want to listen to your advice to solve my issue below ( i also raised this issue in early post of this thread):

    I already had P2P communication with Ez430-RF2500 by using simpliciTI. But  i still want to do this with using RFSendPacket(), RFReceivePacket() functions thank to slaa325 ( I got it from here: http://focus.ti.com/mcu/docs/mcusupporttechdocsc.tsp?abstractName=slaa325&sectionId=96&tabId=1502).

    I have been sitting here for 2 weeks but i could not make it run well with Ez430-RF2500.

    Initially, I have followed  accordingly to steps at chapter 5.2( Adapting the Demo Project to Other Hardware), however it haven't worked.

    And then, i have examined the source code, and I pull up for Button Pin, and i also have enable interrupt of USCIB0, and the result....it haven't still could not worked.

    I have debugged and found out that:

    - when button was pressed,  the interrupt happened

    - However  when RFsendpacket() function called, after 2 functions  TI_CC_SPIWriteBurstReg(TI_CCxxx0_TXFIFO, txBuffer, size) and TI_CC_SPIStrobe(TI_CCxxx0_STX) done,     GD0 did not go high and low as expected.

    It is nice if anybody can help to provide the well-working examples.

    Thanks for all your help. It is much appreciated.

    Vnlotus, Vietnam

     

     

     

     

  • In lab 1, when I transmit messages as specified from hypperterminal, it was not recieved and viewed as binary code on the LEDs at the other ED. why?

    When I press the button switch on the ED with battery, it transmits and that is received and viewed on hypperterminal.

  • In lab 1, when I transmit messages as specified from hypperterminal, it was not recieved and viewed as binary code on the LEDs at the other ED. why? When I press the button switch on the ED with battery, it transmits and that is received and viewed on hypperterminal.

  • vnlotus said:

    @Maxx and expert,

    [...]

    Thanks for all your help. It is much appreciated.

    Vnlotus, Vietnam

     

    vnlotus,

    The email you gave on 03-25-2009 11:03 PM led me to a Delivery Status Notification. Could you please check it because i'm trying to send you my workspace, hoping that it could help you!

     

    Maxx, Scotland.

     

  • Hi Maxx,

    Thanks for your sharing. My email: robbie.ng64@gmail.com (or hongquyngo@yahoo.com)

    Really look forward to your workspace!

    Vnlotus, Vietnam


  • Hi,

    I noticed in the TI_CC_hardware_board.h file that you have defined,

    #define TI_CC_GDO0_PIN          as   0x20, shouldnt it be 0x40 ?? as it is on bit 6?

    Having said that I also noticed that you have picked up the problem with no pullups on the Switch.. This was not documented by TI and caused me some degree of bother as well and i suspect eveyone who have tried and failed.

    I still cant get the application to work properly,  my code gets stuck in CC1100-CC2500.c

    void RFSendPacket(char *txBuffer, char size)
    {
        TI_CC_SPIWriteBurstReg(TI_CCxxx0_TXFIFO, txBuffer, size); // Write TX data
        TI_CC_SPIStrobe(TI_CCxxx0_STX);         // Change state to TX, initiating
                                                // data transfer
     
       //while (!(TI_CC_GDO0_PxIN & TI_CC_GDO0_PIN));
                                                // Wait GDO0 to go hi -> sync TX'ed
       //while (TI_CC_GDO0_PxIN & TI_CC_GDO0_PIN);
                                                // Wait GDO0 to clear -> end of pkt
    }

    i have to comment out the two while statements.  I have verifed on the Spectrum Analyser that the device transmits on the correct frequency, which would indicate that the SPI interface and CC2500 are functioning correctly. 

    Can anyone suggestion a solution, has anyone actually ported this code and made it work? I would like to get a working copy.  Dont see why TI cant provide a working project, it would same alot of time and frustration.

     

    Rob


  • Rob Price said:

    I noticed in the TI_CC_hardware_board.h file that you have defined,

    #define TI_CC_GDO0_PIN          as   0x20, shouldnt it be 0x40 ?? as it is on bit 6?

    Rob, you are correct. I actually corrected it to be 0x40, but it still couldn't work. And i am also facing with the same issue  you mentioned.

    @ Maxx  and  everyone ported this code successfully, could you help to advise the reasons which make this code cant work?

    Vnlotus, Vietnam

  • Change your code to the following:

    P2SEL &= ~GDO0_PIN; 

      GDO0_PxIES |= GDO0_PIN;       // Int on falling edge (end of pkt)

      GDO0_PxIFG &= ~GDO0_PIN;      // Clear flag

      GDO0_PxIE |= GDO0_PIN;        // Enable int on end of packet 

     

    Adding that first line containing the P2SEL (which could be GDO0_PxSEL if you have something like that defined).

     

    I am though still having trouble with getting stuck after a second TX after transmitting first and then entering RX mode, and leaving RX mode to TX something. Getting stuck on the GDO0 line too.

  • BL said:
    Adding that first line containing the P2SEL (which could be GDO0_PxSEL if you have something like that defined).

    Hi BL, you pointed out  the  reason correctly. I also received  same advice  from Maxx

    With adding  that  instruction my application is now running well....hooray!

    Thank you! thank you!....

  • The code on the other End Device will update its LEDs to show which message it sends to the other End Device.   The End Device in Hyperterminal does the same thing.  In fact, from a code standpoint, the are mirrors of each other.

  • Hi everybody, I've the same problem but, even forcing P2.6 to be a GPIO by resetting P2SEL.6, it doesn't work yet.

    I'm getting crazy with this code...which is supposed to be the easiest example, But i can't undestand why it doens't do what I expect

    Any tips?

    Gian Nicola

  • I solved by myself. the problem was that i'm working with variable packet lengths, so I had to write the packet lenght in the FIFO as first value before changing the CC2500 status to STX.

     

  • And then follow with the End Device (battery board):

    The BSP init and the Address set are done the same way as the access point above.

    Line 155 does a SimpliciTI Init which inializes the device as an End Device with a Join token that should match the Access Point (since the use the same SMPL_NWK_Config.dat file).  The End Device is defined in the SMPL_Config.dat file (which is different than the one used in the Access point).

    The SMPL_Init is buried in a while loop that will continue to perform the SMPL_Init until a  SMPL_NO_JOIN response is not received.  SMPL_NO_JOIN means the access point did not respond to the End Device with a Join Token.  This is important in a data hub application as all the  joining end devices will connect to the end device that sits next to the Access point in the Data Hub.  If the Access Point does not respond, the End Device will not be able to join.

    If a SMPL_NO_JOIN was not received, it is assumed that Access Point responded and the End Device will then send a LinkTo request in Line 162 to connect to the Link Listen End Device in the Data Hub.

    LinkTo does the work of the End Device (along with the Interrtupts):

    a.  Line 196 will continue to send a Link To request until the End Device (in Link Listen) in the Data Hub responds (which should be immediately if it's in range).

         1.  if it doesn't respond, the LEDs will toggle and the End Device will do another Link To request.

         2.  if it does respond, the End Device now has the LinkID (linkID1) from the Link Listen Device in the Data Hub and the Star network is formed and the LEDs are turned off.

    b.  Line 212 does an Endless While Loop that will continuely do:

        1.  Turn the Radio off, and puts the MSP430F2274 into Sleep mode LPM3.  An expiration of Timer A will wake the MCU up approximately once a second

        2.  The Radio is turned on in Line 219 when the F2274 is woken by the Timer A interrupt

        3.  Lines 222 to 260 read the Temperature and Vcc, format the data, and put it in the msg[ ] array as they did with the Access Point

        4.  The message is transmited to the Data Hub in Line 262 by the SMPL Send API call with linkID1 (from step a. 2 above) and the msg array from step b. 3

        5.  The SMPL Send in line 262 will either get a SMPL_SUCCESS received meaning the message was sent.  A CCA_FAIL (no clear channel to transmit) will typically be the cause of not having a SMPL_SUCCESS.  LEDs will be toggled (on or off) to show that a message was successfully sent.

        6.  And the while loop is repeated back to b. 1

    It's much simpler than the Data Hub (USB Device)

  • Explain me what is happening in the code?

    why ae you using 0xFF?

    what is Flash_Addr[0]...1,2,3?

    WHY ARE YOU ANDING THEM?

    if( Flash_Addr[0] == 0xFF &&
          Flash_Addr[1] == 0xFF &&
          Flash_Addr[2] == 0xFF &&
          Flash_Addr[3] == 0xFF )

  • JEYASEELAN ARULANANTHAJOTHIE SARAS said:

    Explain me what is happening in the code?

    why ae you using 0xFF?

    When the on-chip flash has been erased, the value you will read back at a location byte is 0xFF.  Flash erases to all 1's.  You then program zeros when you want to write to the flash.

     

     

    JEYASEELAN ARULANANTHAJOTHIE SARAS said:

     

    what is Flash_Addr[0]...1,2,3?

    It is just a variable defined in the demo_ED.c file of the Wireless Sensor demo (SLAC139) that is used by the demo application to either have a predefined address for the device, or if all 0xFF's, then a random address is created for the device.

     

    JEYASEELAN ARULANANTHAJOTHIE SARAS said:
      

    WHY ARE YOU ANDING THEM?

    if( Flash_Addr[0] == 0xFF &&
          Flash_Addr[1] == 0xFF &&
          Flash_Addr[2] == 0xFF &&
          Flash_Addr[3] == 0xFF )

    This is not an anding process, but a logical AND.  It is checking to see if all bytes of Flash_Addr[3], [2], [1], and [0] are all 0xFF, then generate a random address.  If any of the bytes were NOT 0xFF, then the "programmed" address would be used.

  • What this code doing?

    __no_init volatile int tempOffset @ 0x10F4

    What this code doing?

    __no_init volatile char Flash_Addr[4] @ 0x10F0

  • Why do we want to write the address to simpliciti address registers?

    Lines 158 to 162 will take the SimpliciTI address written in the info memory and write it to the SimpliciTI Address registers.

  • This is the syntax the IAR Embedded Workbench code generation tools use for specifically assigning a variable to a memory location, which in this case happens to be in the INFO Flash segment.

  • In the demo_AP.c file, which I assume you are referencing given the line numbers, the code first checks to see if the location in the INFO memory is valid (ie. not erased).  If it is valid, it will assign the SimpliciTI device address with the IOCTL call.

    If it IS erased, then a random address is generated and assigned to the SimpliciTI device address with the IOCTL call.  This code is simply checking to make sure a non- 0xFFFFFFFF is used.

  • How this functions? where it is defined? 

    BSP_ENTER_CRITICAL_SECTION(intState);

  • Why do we want to check this, because you said that these are variables and not memmory locations? Flash_Addr[0]...1,2,3 are these memmory locations of flash?

    if( Flash_Addr[0] == 0xFF &&
          Flash_Addr[1] == 0xFF &&
          Flash_Addr[2] == 0xFF &&
          Flash_Addr[3] == 0xFF )

    But I understand that we want to check the flash about is that have all 0xFF.

  • JEYASEELAN ARULANANTHAJOTHIE SARAS said:

    How this functions? where it is defined? 

    BSP_ENTER_CRITICAL_SECTION(intState);

    This is defined in the .\Components\bsp\bsp.h file.  It retrieves the current interrupt state and saves it into the intState variable, then disables interrupts.

    I would recommend a tool called Source Navigator which is available from http://sourcenav.sourceforge.net/.  This tool allows you index the code base and provides a convenient means of navigating through the software.  It provide grep utilities, an editor, etc.  I have used this to answer the questions you ask like "Where is this defined?"

  • JEYASEELAN ARULANANTHAJOTHIE SARAS said:

    Why do we want to check this, because you said that these are variables and not memmory locations? Flash_Addr[0]...1,2,3 are these memmory locations of flash?

    if( Flash_Addr[0] == 0xFF &&
          Flash_Addr[1] == 0xFF &&
          Flash_Addr[2] == 0xFF &&
          Flash_Addr[3] == 0xFF )

    But I understand that we want to check the flash about is that have all 0xFF.

    I don't believe I said they were not memory locations.  A variable needs to be stored somewhere in the memory map of the CPU, whether it is in RAM or a constant in Flash.

    This thread is really getting off topic.  If you have a new inquiry, please post a new thread.

  • PLEASE HELP ME:

    I want to make a temperature logger in pc with one AP and two ED. I think the random address and flash things is not necessary if I set the device address in dat files.

    Am I right?

    I want to know which part I should delete in the sensor demo that is not necessary??

  • PLEASE HELP ME:

    I want to make a temperature logger in pc with one AP and two ED. I think the random address and flash things is not necessary if I set the device address in dat files.

    I do not need signal strength, volt measurement. Only temperatur measurement logging.

    I want to know which part I should delete in the sensor demo that is not necessary??

  • JEYASEELAN ARULANANTHAJOTHIE SARAS said:

    I want to make a temperature logger in pc with one AP and two ED. I think the random address and flash things is not necessary if I set the device address in dat files.

    Yes, this is true.

     

    JEYASEELAN ARULANANTHAJOTHIE SARAS said:

    I do not need signal strength, volt measurement. Only temperatur measurement logging.

    I want to know which part I should delete in the sensor demo that is not necessary??

    If you don't need the random address generation, then obviously remove the createRandomAddress() function and the associated code calling it.

    The main portions to edit are in the linkTo() function of the demo_ED.c.  There are pieces associated with making measurements of the voltage with the ADC10 that can be deleted.  Also, the size of the message could be adjusted on both the demo_ED.c and demo_AP.c side if the voltage is not needed.

  • hi guys, I've tried using SimpliciTI following the instructions posted in the first few posts but I have past the evaluation days and cant debug/download the program.

    I have 2 MSP430 2500 devices with an FET. I have tried using example codes but they don't seem to work either. Could anyone provide codes using I2C or SimpliciTI that I could use on IAR embedded workbench 4.0? thanks!

    P.S. I'm totally new to this, so if I'm suppose to be doing anything else besides running/debugging the master and slave code to the devices please let me know.

  • Hello.

     

    I tried to use the SLAA325-Code with my ez430-rf2500 boards but it doesnt seem to work. I'm not sure if i modified the software correctly.

    Is there a working version for IAR availible?

  • I would suggest starting with the SimpliciTI stack.

    An example of using this stack in a demonstration is in the Wireless Sensor Demo available from the eZ430-RF2500 Product Folder.

  • Hi

              I am also trying to get a few eZ430-RF2500 modules up and running with the source files found in slaa325 without success. I tried with both CCE ver 3.1 and 4.0 with similar errors being flagged. The instructions in the include.h file in regards to uncommenting (or commenting) certain  # includes to match your hardware doesn't provide a clean compile. After a few frustrating days I gave up. The other issue I'm not sure about is that most of the source files indicate that the examples were done using the IAR platform while I'm attempting to use the CCE.

              Bottom line if anyone provides some info in regards to this issue I will certainly check it out. Even just knowing if the code is viable with the eZ430-RF2500 hardware would be a step forward since my knowledge of the CCE ide is at best sketchy!

     

    Thanks

    Denis Lebel

     

     

  • Hi.

     

    SimpliciTi is no option for me as i plan porting the software to a F2003 with only 1kb of Flash.

     

    I finally got it working. I dont know what I did wrong the first time, but I set up a new project in IAR with the actual sample code from SLAA325 and it works now. Well at least most of the time. Sometimes i need to reset the RF2500 multiple times until the connection between both boards works.

     

    Regards,

     

    Tim

  • I got the code from the slaa325 to work using the eZ430-RF2500 kit. I'm using the CCE ver4 and the only changes to the original

    files from the archive were to include.h as follows:


    #include "TI_CC_CC1100-CC2500.h"
    #include "TI_CC_spi.h"
    //#include "CC1100-CC2500.h"                                                 // **CHG** comment out this line
    #define __MSP430F2274__                                                       // ** CHG** add this line
    #include "TI_CC_msp430.h"

    // Uncomment/Comment out depending on which experimenters board is being used
    //#include "TI_CC_hardware_board.h"                                       // **CHG **commented this line
    #include "TI_CC_hardware_board_eZ430.h"                           // **CHG** uncommented this line
    //#include "TI_CC_hardware_board_EXP4618.h"
    //#include "TI_CC_hardware_board_EXP5438.h"

     

    After a successful build I loaded the *.out file that was generated in both wireless boards and bingo! Pressing the PB on one board toggles the

    led on the other.

    Hope this helps out

    Denis Lebel