EVK1000 sending information via usb

Hello, I’m currently trying to send information via usb from one device to another and I was wondering if someone has done this already and are willing to share some of their code?

Basically I want to send lots of information(preferably as much as possible, 6.8Mbps as specified in the data sheet) from one device to another via the EVK1000 cards.

I will update this thread later(not sure when) with my own code if no one has done this before.

Hi Oskar
How are you getting on?
Maybe the presentation attached is of some help.

Let me know if have an issue getting the documents.

/Leo

Hello, after some downtime on my work I have a new problem.
My program is basically a clone of the DecaRanging program provided by DecaWave and I want to send data. I have successfully read data from USB but when I want to send it I can’t seem to get the messages.
I tried to use the code provided in examples 1 and 2, simple TX/RX to send my information and I can’t receive any data.

for sending I use:
dwt_writetxdata(sizeof(tx_msg), tx_msg, 0);
dwt_writetxfctrl(sizeof(tx_msg), 0);
int sent = dwt_starttx(DWT_START_TX_IMMEDIATE);
where I check if variable ‘sent’ is 1 for successful transmission. This works and I can send my information.

For receiving I use:
int rxEnable = dwt_rxenable(DWT_START_RX_IMMEDIATE); //check to see if rx_enabled, returns 0 == success
while (!((status_reg = dwt_read32bitreg(SYS_STATUS_ID)) & (SYS_STATUS_RXFCG | SYS_STATUS_ALL_RX_ERR)))
{ };
This is where my problem occurs, in the example files the register SYS_STATUS_ID is correctly set when receiving a message but when I use it in my main method (within the clone of DecaRanging) it doesn’t return anything. Is there some variable I have forgot to set? Or is there something in the DecaRanging program that prevents this to be set that I have overlooked?

Shouldn’t the register SYS_STATUS_ID be set to SYS_STATUS_RXFCG every time we have an incoming message?

I noticed that I had been a bit too quick while cleaning up the code and accidentally stop to call the function inittestapplication(s1switch) which, as I understand it, is the setup for channel configuration. I have now reinitialized this but the problem persists, it seems like I can’t receieve any messages.
The receiver polls SYS_STATUS_ID with the same method as described above. Should I poll any other registers to check when a message has been received? Do I need to configure something else to enable the interrupt?

I also noticed that the files provided for ‘decadriver’ from the example files and the ‘DecaRanging’ application are not the same. This has some minor problems and I’m guessing that this might be one cause of the problems? Why do you provide code for both the application and the examples if they are not compliant with each other?

I’ve tried out the example programs for simple TX/RX and they work fine so it should not be a hardware problem.

Please write if you want any other information, I’ll be happy to oblige.

[size=medium][font=serif]Hi Oskar,[/font][/size]
[size=medium][font=serif]Could I ask you what EVK SW you’re using? Indeed what you stated for example EVK Code 2.10 would not be compatible with the sample code. This because the 2.10 SW is available as it is the default SW in the EVK1000 today. However if you use EVK code 3.11 the drivers would be compatible with the sample code drivers. both would have driver version 4.0.0.x.[/font][/size]
[size=medium][font=serif]And for your info: TREK 2.25, EVK 3.11 and Sample code API 2.4 all use driver version 4.0.0.x [/font][/size]

[size=medium][font=serif]Not receiving /sending anything could have various reasons [/font][/size]
[size=medium][font=serif]a) Are tag and anchor configured to same parameters; channel, preamble code and length, PRF, data rate, std/nstd SFD etc.?
b) Are their crystal frequencies within the correct tolerance?
c) Does the Anchor actually receive the blink, and then send the response?
d) Are the same response delays being used at both ends, and, no additional delays for debug output or breakpoints etc. ?
e) Are there any RX events at all: e.g. preamble detect, SDF timeout, PHR error, RSE etc that show something is happening?[/font][/size]

[font=serif][size=medium]Finally, please use APS022 (attached) our debug application note for debugging. Eg check the status of the devices (0x0F and 0x19)[/size][/font]

Further explanation of the problem: I have inherited this project from another person which developed/modded the old ‘DecaRanging’ program and the drivers used are indeed 2.1 (2.16.01) while the examples are 04.00.06. Meaning that Im not entire sure which files were edited. I’m pretty new to CoIDE and programming of ARM processors so there might be some crucial point I have overlooked.

My problem right now is that I have the usb working inside the DecaRanging application(old drivers) but I can’t get it to work when incorporated with the example files. So I either have to fix the sending/receiving inside the modded DecaRanging application(with old drivers), where the USB works properly or incorporate USB into the example files.
Are there example files for older drivers available somewhere?

or changelogs for all files between version so I can easily see the changes made to different files?

I suspect that I at the moment have files of different versions which is why I haven’t been able to get this to work yet.

I will check all the suggested reasons as well as soon as I can and thank you for the debugging guide, I hadn’t found that on your website before. Might I suggest you put it up there as well?

Hi, Flink
May I ask how did you read data from USB? What API did you use or did you write your own?

Thanks a lot!!