|
|
|
|
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
November 20, 2009, 09:34:59 PM
1 Hour
1 Day
1 Week
1 Month
Forever
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
Robot Forum
>
Software
>
Software
>
CC2500 for sending data gives trouble
0 Members and 1 Guest are viewing this topic.
Pages:
[
1
]
Author
Topic: CC2500 for sending data gives trouble (Read 72 times)
CC2500trouble
Beginner
Helpful? 0
Offline
Posts: 1
CC2500 for sending data gives trouble
«
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
]
Jump to:
Please select a destination:
-----------------------------
General Misc
-----------------------------
=> Misc
=> Robot Videos
-----------------------------
Software
-----------------------------
=> Software
-----------------------------
Electronics
-----------------------------
=> Electronics
-----------------------------
Mechanics and Construction
-----------------------------
=> Mechanics and Construction
Related Topics
Subject
Started by
Replies
Views
Last post
sending out 1.5ms
Software
ed1380
8
2383
April 11, 2007, 05:19:03 PM
by
ed1380
Sending packets of data through RF UART
«
1
2
3
»
Software
airman00
69
7206
November 07, 2008, 04:48:16 AM
by
airman00
Ask Sending ADC data to PC, via serial
Software
hendrachubby
3
266
June 25, 2009, 01:50:22 AM
by
hendrachubby
How to interface the cc2500?
Electronics
yash25
1
273
August 12, 2009, 01:52:53 PM
by
Soeren
Advertise on this Forum
Loading...