This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Help with TMS320C6747

Other Parts Discussed in Thread: TMS320C6747, ADS1278

Guys - I got a call from George at Sharp Labs in Camas and he asked me to get some help for him on his C6747 and CCS. See below.

Hi Lori (Laurie?),

I am building an analyzer for sensors we are developing here at Sharp Labs and am having trouble with Code Composer Studio. I have entered a technical support request with TI as attached below. My boss has asked me if there is any local help or if TI has (or can recommend) consulting services to help me.

 I am using Code Composer Studio Version 3.3.81.11

I am using the Spectrum Digital Demo board with TI part no. TMDX0SKL137BET. I am using the DSP as a TMS320C6747 although I may have the ARM enabled. I have no code for the ARM.

My PC is a Dell Precision PWS390. Intel Core 2 CPU, 1.86 GHz, 4 GB RAM.

 Libraries:

·         Edma3_lld_01_11_00_03

·         Pspdrivers_01_30_00_06

·         Bios_5_41_03_17

 I have three ADS1278 analog to digital converters connected to the C6747 through the SPI. The C6747 SPI port is in slave mode. When I attempt to call the edma library to configure it, I crash Code Composer when debugging. Code Composer crashes even before I start the DSP program. It crashes when I try to View->Symbol Browser, and list the Globals.

 If I include the following line, download the program, and try to view the Global variables, Code Composer crashes.

EDMA3_DRV_clearErrorBits(chanHandle->edmaHandle,
            chanHandle->deviceInfo.rxDmaEventNumber);

If I change the call to the following line, Code Composer doesn’t crash. (But my program won’t do what it needs to do.)

EDMA3_DRV_clearErrorBits(chanHandle->edmaHandle,
            1);When Code Composer crashes, it gives the following error message:Unexpected Fatal Error Encountered which may have been caused by stack overflow, out of memory condition, or access violation

 I get the same results with two different demo boards. I get the same results on both my desktop PC and my laptop PC.

 When Code Composer crashes, my program in the C6747 appears to run, but I can’t verify that, as I can’t debug.

 I don’t know if I should just be waiting for technical support to respond, but, as I said, my boss is asking if there is any other help to get me going.

 Thanks,

 George Middleton

SHARP LABS OF AMERICA, INC.

5700 NW Pacific Rim Boulevard, Camas, Wa.  98607

Phone: 360-834-8609  Fax: 360-834-8689

E-mail: GMIDDLETON@SHARPLABS.COM

 

 

  • Hi George,

    It looks like a TI employee posted this for you.  The first thing you should do is register to the E2E forum so you can post and get replies directly.

    I have a L137 EVM from Spectrum Digital.  Is this what you have?  I have been able to work with the SPI using EDMA with this board, although my versions of DSP/BIOS, PSP, and EDMA are slightly older.  Have you tried running the examples on the EVM?  The PSP s/w includes BIOS examples.  For the SPI and EDMA, you should find the example here:

    ..\packages\ti\pspiom\examples\evm6747\spi\edma\build

    This will be in your PSP install folder.  Please try this example and tell me the result.

    Mike

  • Hi Mike, I do have an e2e. Thanks.

    I have tried the spi\edma code. I even used those drivers to input one buffer from my ADCs. It worked fine.

    My application requires constant input from the SPI. The SPI is in slave mode and I need ping-pong buffering in the EDMA. The spi_edma.c doesn't have those features. I started down a path to modify the pspiom\spi drivers to be more like the mcasp drivers. That started to get very complicated and I not famililar with the BIOS stream I/O. So I back off that and decided to use the pspiom\spi and pspiom\mcbsp as models and build my own code to setup the SPI and EDMA.

    Now I'm trying to prove my code, and Code Composer keeps shutting down. I took all the new code out of my project until I could compile, load, examine memory, and run. Then I added code chunks back in until Code Composer shuts down after I compile, load, and attempt to examine memory. Code Composer has no problem with the compile and load. Only with examining memory and stepping thru the code.

    If I create a new minimul project that duplicates this problem, would you run it and help me verify if the problem is just me?

    George

  • ok - I understand more now.  You can capture the first buffer of data but doing a continuous capture is causing problems?  The GIO is not really suited for continuous (e.g. streaming) I/O.  Better to use SIO but then you would have to use McASP.  We have A/Ds in our application and use the SPI to program the settings and an FPGA to read the streaming data.  Can you do something similar where you use McASP to read the A/D outputs and SPI to configure the device?  SPI is a peripheral meant for bursty communication with multiple devices, not dedicated, continuous data I/O like McASP.

    At any rate, if you can attach a zipped project, I can take a look at it...

    Mike

  • I'm working on creating a zipped project for you.

    I went around with the hardware guys at TI (I think that is who they were) about getting input from ADC1278s with McASP and coudn't find a way. I used a CPLD and created an SPI stream from the ADC signals. If the SPI won't do at a steady stream. I'm in trouble.

    With three ADC1278s in series, and discarding 4 channels, I have 24 bits/channel times 20 channels or 480 bits of data. The frame for the ADC1278 is fixed at 512 bits. That leaves 32 bit times to ping-pong between SPI inputs. The SPI clock is 8.192 MHz. So 3.91 uS to change buffers and 58.6 uS to fill a buffer.

    I was planning to use the cCnt to put multiple SPI frames into one buffer. That would give more time between buffers. I'm not sure I can do that, but the spec's don't seem to preclude it.

    I'm hoping to bypass the SIO and go directly from buffer full callback function to semiphore my task to process that buffer. It seems that the SIO copies the data from one buffer to another. But i'm not sure about that.

    George

  • I'm uploading a file (CC_EDMA_Problem.zip) which contains a project that illustrates my problem.

    In the file adcspi_edma.c at line 137 is a #if 0 that comments out a call to EDMA3_DRV_requestChannel(). I compile and load the program and select View->Symbol Browser, then select the "Globals" tab and expand "CC_EDMA_Problem.out", and I see a list of the global variables.

    If I change the #if 0 to #if 1, and do the same steps as above, when I expand "CC_EDMA_Problem.out", Code Composer give the following message in a message box:

    Unexpected Fatal Error Encountered which may have been caused by a stack overflow, out of memory condition, or access violation.

    I'm going to try and save your work before TERMINATING this application.

     

    Please let me know if you can duplicate these conditions.

    I assume I have something wrong in my configuration but I don't know what it is.

    Thanks,

    George

     

     

  • Mike, I uploaded the file under my user name (is that the right jargon?). I couldn't see how to attach it to this thread. Can you get to it?

    George

  • George,

    I got your zip file.  I assume you use the PSP and DSP/BIOS libs w/o any of your own mods?  I'll try and take a look at this tomorrow or Monday.

    Mike

  • Mike,

    The problem exists with the standard DSP/BIOS and PSP libraries. (I have a couple of changes to the PSP libary, but the upload uses the standard libs.)

    Thanks,

    George

  • George,

    I built the program with your suggestions.  The code I have has a #ifdef RQCH so I just comment in/out the #define RQCH at file top.  I don't see any problems like you described.  In all cases I can browse the global symbol.  This may be a CCS problem.  Does your code RUN if you try not to open the symbol browser?  Try using the watch window and typing a symbol.  Not quite as good but it may work...

    I have CCS 3.3.82.13

    Mike

     

  • Mike,

    I have run the code and stopped at a breakpoint so I can examine my EMDA setup. In about a minute or so, CC just disappears from my "desktop". The program just dies. No message box or anything.

    I have version 3.3.81.11. (I have included a MS Word file containing my CC's "About Box".) Not sure how to get an update.

    I can't continue to develope my code with any efficiency. What do you suggest? CC 3.3 came with my eval system. Should I upgrade to (as in buy) version 4? Is the problem CC or the connection between CC and the eval board?

    In other words, where do I go from here?

     

    CC_Version.doc
  • George,

    So my CCS is a little newer than yours.  You could check the release notes for CCS and see if there was an issue like you are having that was fixed in my version.  You can use the Help -> Update advisor for this.  I don't think you need to upgrade to 4.0

    Here are a couple things to consider:

    • Does the crash happen with ANY program, or just certain ones?  If the PSP and BIOS examples all build and run w/o crashing, it would imply that your particular project is the problem.  I tend to doubt this, though, since you get a crash before you code ever runs.  In earlier versions of CCS (like before 3.1), I'd get a lot of IDE crashes.  But CCS 3.3 seems pretty stable on my machine.
    • Something may have gotten corrupted on your PC that is causing these problems.  To check this, install CCS on another PC (maybe you have a laptop at work, too?).  See if the problem happens on the fresh install.
    • Try and get it to happen with the smallest amount of code and least amount of libraries linked in.  This will help isolate the problem and is easier for others to look at it.

    I'll try and be of more help if I can, but since I can't repeat the problem, it will be hard.  I still think using SPI for continuous input is a little bit risky, but it could be I just don't have experience developing code to do it.  I use McASP to read in A/D samples (FPGA reads in the samples, does some intial processing, and then passes samples to the DSP).

    Mike

  • Mike,

    Thanks. I will look at the release notes.

    From the beginning of my project, I installed CCS on my laptop and was using it successfully, until I ran into this problem. (I have other chips controlled by and/or read from the i2c bus and SPI0.) That all worked. When my desktop exhibited this CCS problem, I tried the laptop and got the same thing.

    I had upgraded to later versions of BIOS, EDMA3, and the PSP libraries on both computers, so on the laptop, I un-installed everything. Then I installed just from the CD that came with my eval board. And I have the same problem. (CCS from the CD is also version 3.3.81.11.)

    Both computers are Dell. It just occured to me that I should install CCS and etc. on my home computer which is not Dell and see what happens. But that one is Vista. Don't know if that will be an issue. (Both work computers are XP.)

    When I select Help->Update in CCS, it opens a web-page, logs in, and says I am up-to-date.

    Ok. I'll try to make my code smaller.

    Your FPGA to McASP might be a good solution, but it would also be using EDMA and I may have the same problem. And I have already build a companion board with the SPI as a destination, so I believe I should persure the SPI for a bit yet. I don't think the CCS problem has to do with the SPI. But, then again, I don't know what the problem is. But switching hardware pieces before I know the cause of the problem seems overkill.

    Thanks,

    George

  • Mike,

    Is there anyway I can get the same version of CCS that your are running? We're loosing a lot of project time and my boss is wondering if we should be leaving the TI DSP.

    Thanks,

    George

  • Hi George,

    You should be able to get the same versions I have from the TI update web page.  You can try a fresh install and update to the versions I have.  Do you have a local TI rep you can talk with about your issues?  If not, I can try and put someone in touch with you.

    To answer another question, I have CCS installed on a Vista PC and everything works.  I haven't seen any of the crash issues you were seeing.  I have CCS installed on a Gateway desktop running Vista and a Dell laptop running XP.  For Vista, you need to make sure you have User Account Control turned off.

    If you need the versions of all the s/w packages I'm using, I'll have to send that to you tomorrow.  I don't have access today since I'm working remotely.

    Mike

  • George Middleton said:
    I have version 3.3.81.11. (I have included a MS Word file containing my CC's "About Box".) Not sure how to get an update.

    Hi George,

    3.3.81.11 is a DSK/EVM version of CCS. As you mentioned, they come bundled with a DSK/EVM and only works with that target.

    Unfortunately they are not update-able.

    Since CCS crashed, there should be some generated dump files. They contain information that can help us diagnose where the cause of the crash came from.

    I also encourage taking a peek at CCSv4. Even if we find that the cause of the crash is a bug in 3.3, your version of CCS can not receive any patches. You can get a free bundled license to work with your board (like your 3.3 DSK version), so there is no cost for upgrading.

    Thanks

    ki

  • Ki - Does George need a specific version of BIOS, etc?  I noticed the following in the GSG:

    • For the CCS version that comes with the Starter kit, you need to install the file bios_setupwin32_5_33_05.exe.

    http://wiki.davincidsp.com/index.php/Getting_Started_Guide_for_C6747#Installing_the_SDK_Software

    Thanks,

    Aaron

  • I don't know enough about the SDK to comment on that. Regardless, CCS should not be crashing to the extent that George is experiencing

  • Ki, Thanks for the info on versions. I am including the latest mini-dump file. Last night I determined that I only have this problem when I used the following typedef:

    typedef Void (*AdcSpi_Callback)(Ptr *arg, AdcSpi_Payload *packet);

    That was just a typo on my part, as what I wanted was

    typedef Void (*AdcSpi_Callback)(Ptr arg, AdcSpi_Payload *packet);

    When I changed to the "Ptr arg", my CCS problems went away.

    I still think this is a CCS problem, as a pointer to a pointer shouldn't be a problem. Or it's the way Ptr is defined/typedefed. The compiler handled it, but the Symbol Browser didn't.

    I didn't realized I could convert to version 4 and be licensed. But the "Licensing - CCSv4" page says it will generate a key for DSK/EVM tool bundles. I haven't used v4. It would take some time to switch, I think. Is there an advantage?

    I am now linking to BIOS 5.41.03.17, even though CCS About box shows 5.33.01. Using the component manager, I changed the BIOS for the TMS320C67XX, but not for the other chips I don’t have. How does CCS decide what to put in the About box? (Not that I need to know.)

     

    ccapp20100311154253.zip
  • Thanks for the dmp attachment. Yup, the crash is coming from the OFS / symbol manager in CCS, trying to demangle a name (or something related to that). Makes sense that you hit it when opening the Symbol Browser. We can try reproducing the issue and looking at fixing it but to be honest, CCS 3.3 is being deprecated and there is little resources allocated to supporting it. Even if a fix is made, there is still the issue of DSK\EVM versions being unable to be updated. I would like to suggest a move to v4. The Modules view is a complete replacement for the Symbol Browser, and hopefully the issue is gone there. That brings me to your next question:

    George Middleton said:
    I didn't realized I could convert to version 4 and be licensed. But the "Licensing - CCSv4" page says it will generate a key for DSK/EVM tool bundles. I haven't used v4. It would take some time to switch, I think. Is there an advantage?

    The advantages of moving to v4 from v3 are described here. We feel it is well worth the move. However I will not try an minimize the fact that there is a substantial learning curve for people who are long time users to CCS v3 (and earlier). The environment is completely different.

    George Middleton said:
    I am now linking to BIOS 5.41.03.17, even though CCS About box shows 5.33.01. Using the component manager, I changed the BIOS for the TMS320C67XX, but not for the other chips I don’t have. How does CCS decide what to put in the About box? (Not that I need to know.)

    I believe CCS will look at what the target configuration is and then check the component manager for the BIOS and CGT version for that family. I'm not 100% sure however...