Problem with dspi for MOD54415 with new NBeclipse IDE

Topics for the Eclipse Environment
Post Reply
nicobari
Posts: 110
Joined: Mon Jan 30, 2012 12:15 pm

Problem with dspi for MOD54415 with new NBeclipse IDE

Post by nicobari »

Hi,
So I have two different computers A and B. A has an old version of Netburner Eclipse IDE (2.6) when dspi.h and dspi.cpp were not included by default. So I downloaded them from the forum and installed it and compiled my code and it worked perfectly. Now for the new computer B I downloaded NBeclipse IDE 2.6.4 which has dspi module included by default and compiled my previous code and when I uploaded it to MOD54415 it just gives me -1 value but when I go back and recompile the same code from the computer A and upload it to MOD54415 it works again. I haven't tried swapping the dspi.h and dspi.cpp file between Computer A and B. Is this a bug in NBeclipse 2.6.4 or I am doing something incorrectly. I will appreciate any help in this matter.

Regards,
TM
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: Problem with dspi for MOD54415 with new NBeclipse IDE

Post by rnixon »

Do you have any way of doing a file compare to see any differences between them?

Have you made any changes to system files that were not duplicated on the second computer?
nicobari
Posts: 110
Joined: Mon Jan 30, 2012 12:15 pm

Re: Problem with dspi for MOD54415 with new NBeclipse IDE

Post by nicobari »

I copied the .cpp file from computer A to computer B. To be honest I don't know how to do a file compare other than visually looking at each other. For the second computer I just downloaded NBEclipse 2.6.4 and installed it (I didn't modify any system files).

Thanks,
TM
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: Problem with dspi for MOD54415 with new NBeclipse IDE

Post by rnixon »

nbeclipse can do a file compare, but I don't remember how. I bet Tod knows.........
Ridgeglider
Posts: 513
Joined: Sat Apr 26, 2008 7:14 am

Re: Problem with dspi for MOD54415 with new NBeclipse IDE

Post by Ridgeglider »

The easiest way to do a file compare is to have two projects in the same workplace. In the (typically) right hand Project Explorer window select one file. Then press CTRL and click on the second file (usually in a different project, but not necessarily). Right click, to reveal the menu. Scroll to "Compare With" --> "Each Other". This works for a file by file compare. It is also possible to compare an entire project. Instead of selecting individual files, select two project folders! The tool will show all the files that are different, and allow you to expect each individually. Very useful. You can edit each of the files too upon finding differences.

By the way, you can also compare with previous versions, as long as they'e been worked on in the current workspace. This makes changing files in the "Compare With" feature a bit less risky since you can always revert to an earlier version. See also the "Replace With" menu option next to the "Compare With: feature.

There are lots of "Diff Editors" that will do these things outside Eclipse, but the Eclipse tools work pretty well.
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: Problem with dspi for MOD54415 with new NBeclipse IDE

Post by dciliske »

nicorabi,

Can you give some more detail as to what is giving you the '-1'? Each of the dspi calls returns an completion status (DSPI_OK, DSPI_BUSY, DSPI_ERROR), but none of these is '-1'. Something seems wrong with your description. Can you post the code section that is giving you problems?

-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
nicobari
Posts: 110
Joined: Mon Jan 30, 2012 12:15 pm

Re: Problem with dspi for MOD54415 with new NBeclipse IDE

Post by nicobari »

Sorry for the late response I was tied up in solving the issue and was running back to computer A to upload the code. I am attaching my section of code below.

Code: Select all

DSPIStart(1,IMU_command,IMU1_raw,24,NULL);//IMU1
while(!DSPIdone(1)){};
DSPIStart(3,IMU_command,IMU2_raw,24,NULL);//IMU2
while(!DSPIdone(3)){};
I am initializing my DSPI as

Code: Select all

void initDSPI(){
DSPIInit(3,2000000,16,0x01,1,1,1,0,0,0);//initializing SPI
DSPIInit(1,2000000,16,0x01,1,1,1,0,0,0);//initializing SPI
}
and when I print IMU1_raw or IMU2_raw I see -1 in all of them

I will do a file compare and see what I get.

Thanks for the help,
TM
Last edited by nicobari on Fri May 09, 2014 11:18 am, edited 1 time in total.
nicobari
Posts: 110
Joined: Mon Jan 30, 2012 12:15 pm

Re: Problem with dspi for MOD54415 with new NBeclipse IDE

Post by nicobari »

Also I checked the return values of DSPIInit and DSPIStart and they both are 0 which is "STATUS OK" as defined in dspi.h

So I really don't know what is incorrect.

Regards,
TM
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: Problem with dspi for MOD54415 with new NBeclipse IDE

Post by dciliske »

Arg... I'm sorry, I should have known this issue when you said you were using 2.6.4, but I keep thinking that's the latest; it's not :/

There's a problem with the DSPI driver prior to 2.6.5 where it will shut down the bus a byte or two early during transfers that has since been fixed. You can grab the 2.6.5 beta from support to fix this.
Dan Ciliske
Project Engineer
Netburner, Inc
nicobari
Posts: 110
Joined: Mon Jan 30, 2012 12:15 pm

Re: Problem with dspi for MOD54415 with new NBeclipse IDE

Post by nicobari »

Thanks, Just finished installing the 2.6.5 and it works.

Thanks,
TM
Post Reply