Society of Robots
     | Robot Forum | Robot Tutorials | Robot FAQ |
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 20, 2009, 09:34:59 PM

Login with username, password and session length
Search:     Advanced search
Sept 30th - New Price - Axon is now $94

Robot Forum
72,667 Posts in 9,267 Topics by 5,291 Members
Latest Member: VerAye
* Home Help Help Login Register
0 Members and 1 Guest are viewing this topic.
Pages: [1] Print
Author Topic: CC2500 for sending data gives trouble  (Read 72 times)
CC2500troubleTopic starter
Beginner
*

Helpful? 0
Offline Offline

Posts: 1


View Profile
« on: November 05, 2009, 10:38:13 PM »

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 out 1.5ms
Software
ed1380 8 2383 Last post April 11, 2007, 05:19:03 PM
by ed1380
Sending packets of data through RF UART « 1 2 3 »
Software
airman00 69 7206 Last post November 07, 2008, 04:48:16 AM
by airman00
Ask Sending ADC data to PC, via serial
Software
hendrachubby 3 266 Last post June 25, 2009, 01:50:22 AM
by hendrachubby
How to interface the cc2500?
Electronics
yash25 1 273 Last post August 12, 2009, 01:52:53 PM
by Soeren
Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!


Advertise on this Forum