Society of Robots
     | Robot Forum | Robot Tutorials | Robot FAQ |
September 02, 2010, 09:48:17 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: SoR Robot Chat every friday night. Join us! (forum integration fix coming when I have time)
http://www.societyofrobots.com/robotforum/chat/

Robot Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: CC2500 for sending data gives trouble  (Read 461 times)
0 Members and 1 Guest are viewing this topic.
CC2500troubleTopic starter
Beginner
*

Helpful? 0
Offline Offline

Posts: 1


View Profile
« on: November 06, 2009, 12:38:13 AM »

Hello,

I am using Altera FPGA and am using their standard SPI communication method to communicate with the CC2500.

I load this routine in a loop to ensure I have all properly running: calibrate synthesizer, send five packets of data. I hoped to run through 0xFFFF loops, but more often than not, it fails somewhere in the middle.

Any thoughts?

  for (u8RX=0; u8RX<0xFFFF; u8RX++) {
    IOWR(LED_BASE,0,u8RX&0x00FF);
    //RF2500 Calibration
    //SIDLE, Exit RX/TX, turn off frequency synthesizer
    u8S[0]=0x36;                  alt_avalon_spi_command(SPI_BASE,SSl,0x01,&u8S[0],0x01,&u8R[0],SFl);
    u8S[0]=0x3D;              do {alt_avalon_spi_command(SPI_BASE,SSl,0x01,&u8S[0],0x01,&u8R[0],SFl);} while (!((u8R[0]&0xF0)==0x00));
    //SRX, Enable RX, Perform Calibration since FS_AUTOCAL=
    u8S[0]=0x34;                  alt_avalon_spi_command(SPI_BASE,SSl,0x01,&u8S[0],0x01,&u8R[0],SFl);
    u8S[0]=0x3D;              do {alt_avalon_spi_command(SPI_BASE,SSl,0x01,&u8S[0],0x01,&u8R[0],SFl);} while (!((u8R[0]&0xF0)==0x10));
    IOWR(TIMERR_BASE,0x0,0x0000); //CLEAR timer R
    IOWR(TIMERR_BASE,0x1,0x0004); //START timer R
    while (!(IORD(TIMERR_BASE,0) & 0x1)); //STAY while !TimeOut true; time delay for RF Calibration
    //End of RF2500 Calibration
   
    u8S[0]=0x3F; u8S[1]=0x05;     alt_avalon_spi_command(SPI_BASE,SSl,0x02,&u8S[0],0x01,&u8R[0],SFl);
    u8S[0]=0x3F; u8S[1]=BSta;     alt_avalon_spi_command(SPI_BASE,SSl,0x02,&u8S[0],0x01,&u8R[0],SFl);
    u8S[0]=0x3F; u8S[1]=UReC;     alt_avalon_spi_command(SPI_BASE,SSl,0x02,&u8S[0],0x01,&u8R[0],SFl);
    u8S[0]=0x3F; u8S[1]=Mac4;     alt_avalon_spi_command(SPI_BASE,SSl,0x02,&u8S[0],0x01,&u8R[0],SFl);
    u8S[0]=0x3F; u8S[1]=Mac5;     alt_avalon_spi_command(SPI_BASE,SSl,0x02,&u8S[0],0x01,&u8R[0],SFl);
    u8S[0]=0x3F; u8S[1]=Mac6;     alt_avalon_spi_command(SPI_BASE,SSl,0x02,&u8S[0],0x01,&u8R[0],SFl);
    //STX, start transmission (will go RX when done TX)
    u8S[0]=0x35;                  alt_avalon_spi_command(SPI_BASE,SSl,0x01,&u8S[0],0x01,&u8R[0],SFl);
    u8S[0]=0x3D;              do {alt_avalon_spi_command(SPI_BASE,SSl,0x01,&u8S[0],0x01,&u8R[0],SFl);} while (!((u8R[0]&0xF0)==0x10));
    IOWR(TIMERS_BASE,0x0,0x0000); //CLEAR timer S
    IOWR(TIMERS_BASE,0x1,0x0004); //START timer S
    while (!(IORD(TIMERS_BASE,0) & 0x1)); //STAY while !TimeOut true; delay for RXTX conversion
    iGDO0--; iGDO0--; //Reset from SyncWord and End of Packet notifications
  }
Logged
Pages: [1]
  Print  
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Sending packets of data through RF UART « 1 2 3 »
Software
airman00 69 9420 Last post November 07, 2008, 06:48:16 AM
by airman00
Ask Sending ADC data to PC, via serial
Software
hendrachubby 3 479 Last post June 25, 2009, 03:50:22 AM
by hendrachubby
How to interface the cc2500?
Electronics
yash25 1 833 Last post August 12, 2009, 03:52:53 PM
by Soeren
sending data to axon through hyperterminal
Misc
ukesh 13 854 Last post December 07, 2009, 03:04:01 PM
by waltr
Powered by MySQL Powered by PHP Powered by SMF | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!


Advertise on this Forum