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.

CCS/CCSTUDIO: SPI debugging under CCS 6: are there any application notes, examples or similar?

Part Number: CCSTUDIO
Other Parts Discussed in Thread: TMS320F28027, CONTROLSUITE, C2000WARE

Tool/software: Code Composer Studio

Hi,What are the issues and concerns that I have to be aware when debugging SPI connection in Code Composer.

Can someone point me to the proper application document, any other document, or the example of the code?

Pointing me to the search line would not work. I have tried to search far and wide for the solution and have not found it.

Thanks in advance,

VladP

  • Vlad,

    What device are you using?

    John
  • Piccolo, TMS320F28027
  • Thanks. I will ask a C2000 expert to assist.
  • Much appreciated. Thank you for a quick reaction. My guess is that the debugger messes with the SPI in some way.
  • Hi Vlad,

    Have you made any progress? Do you have C2000Ware (or its predecessor controlSUITE) installed? It contains examples that should help you learn how to use SPI.

    You can find the documentation for your device here:

    http://www.ti.com/product/TMS320F28027/technicaldocuments

    The document called "TMS320x2802x, 2803x Piccolo Serial Peripheral Interface (SPI) Reference Guide (Rev. B)" should help you. If you think the debugger is causing your issues, you may want to look at the SPIPRI register in particular--the FREE and SOFT bits control what happen to your transmissions when the emulation suspends.

    Whitney

  • Hi,

    Thanks for the answer, and I will look into FREE and SOFT bit controls. That was very helpful.

    Thanks for the answer about documentation.

    To answer on your other questions:

    Yes, my SPI is working, but without debugger. I need to use debugger to debug some issues related to SPI.

    Yes, I do have controlSUITE and the loopback examples, which are useful to a certain degree.

    Comment about examples:

    The problem with examples is that those are for  loopback only, SPI Tx and Rx direction are using the same data register.

    Common data register may be deceiving when testing the loopback. It is good for a partial sanity check but does not cover real inter-device SPI communication.

    Currently, we have a workaround to send and receive each time when moving the data either way, which is very cumbersome.

    Thank you for pointing at the document. It is useful, but not updated since 2009.

    I searched for the same document in forums and got question about: "What is TXFFIVL?"

    From that, I see that the update of the document is to be made. The question is when?

    TI used to have errata documents.

    In conclusion:

    I will look into the SOFT, and FREE bits to see if that helps with debugging SPI.

    I will continue to search through forums, since the documents about SPI are out of date, and at some point either not precise, or perhaps wrong.

  • Thanks for your feedback. We do have some enhancement requests filed to add some non-internal-loopback SPI examples (like sending from SPIA to SPIB). We are aware of that gap.

    If you're concerned about issues in the documents, you can try cross-referencing them with the technical reference manuals for some of our newer devices (like the TMS320F28004x or TMS320F2807x). The SPI module hasn't changed much over the years. I know that's not an ideal solution though.

    Whitney

  • Thank you for your quick feedback and overall effort. I will look into newer documents as well.
    sincerely
    Vlad P.