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/TMS320F28379D: usb communication

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE,

Tool/software: Code Composer Studio

hallo,

1. Would you please let me know how to define Tirnometric fucnctions in ccs.

- I included math headerfile i.e  CLA.h but still getting errors. Please check the below console pic.

2. I used round and floor in arduino but i didn't understand how to use those macros in ccs.

Thanking you 

With regards

eswar kommi

  • In your project's include options, include the compiler /include directory. For example, in my installation, this is at:

    C:\ti\ccsv8\tools\compiler\ti-cgt-c2000_18.12.1.LTS\include

    This will link in math.h provided in the compiler release, which contains Trig function definitions. Also include the RTS library (libc.a) present in /lib in the linker file search path. For example, in my installation, this is at:

    C:\ti\ccsv8\tools\compiler\ti-cgt-c2000_18.12.1.LTS\lib

    With these two updates, and once you include math.h in your source file where you make the Trig call, it should work. Moreover, if you want it to run more efficiently on the F28379D, you may want to enable --fp_mode = relaxed under your Project properties in Compiler-Optimization. This will allow the TMU to be used for Trig functions, which is much faster than the calls into the RTS library.

    Thanks,

    Sira

  • Hi Sira,

    Thanks for the reply, I tried those optioins but still i am getting cos error.

    In my board i used both and fp_ mode also relaxed

    1. C:\ti\ccs910\ccs\tools\compiler\ti-cgt-c2000_18.12.2.LTS\lib

    2. C:\ti\ccs910\ccs\tools\compiler\ti-cgt-c2000_18.12.2.LTS\include

    Thanking you 

    Regards

    Eswar kommi

  • Eswar,

    You are getting Warnings, not errors. Errors appear to be related to other issues. Please fix these errors first. Is this .c file your file or a TI file?

    Thanks,

    Sira

  • Hi Sira,

    It is an .c file from TI. I am trying to do usb communication so i took example from TI and try to edit the code accodrding to my logic.

    Thanks 

    eswar.

  • Eswar,

    Is this from C2000Ware? If yes, please provide me the path to the example project and file.

    Thanks,

    Sira

  • Hi Sira,

    Please find the below Attachements for path which I downloaded it from resource explorer in ccs.

    1. Is it possible directly to Access USB Pin On TMS320F28379D Board. Because in the circuit diagrams they were connected Via UART lines to FTDI chip.

    So i am thinking usb not possible and have to do UART for Serial communication.

    2. 

    2. I think usb possible only by using using control card.The example programm which i am editing is actually for control card. I trying to do usb communication       without control card and normally with tms320f28379d board.

    Please let me know if anything which i explained is not correct

    Thanks 

    eawar kommi

  • Hi Sira,

    One more point.

    even though the above example problem usb_ex1_dev serial.c is for control card. AFter reducing  the transfer bits in my code whi i added in it. It got run but got this type of error.

    Please find the below pic

    Thanks 

    Sira

  • Eswar,

    I used the usb_ex1_dev_serial project in C2000Ware. I modified usb_ex1_dev_serial.c in the following way:

    #include "math.h"

    Inside main():

    float32_t sin_input, sin_output;

    and inside the while(1) loop:

    sin_input = 1.570796f;
    sin_output = sinf(sin_input);

    This project builds without any warnings or errors, and also generates the right output. This is how you can add trigonometric and other math functionality to this project. If you look at the linker settings for this project, it already has the required RTS library (libc.a).

    In your original message, you stated " I included math headerfile i.e  CLA.h but still getting errors". CLA.h is not the correct header file to include.

    Also, I am not the best person to address your USB specific queries on this project. Once you confirm that your math related queries are resolved, I would suggest marking this request as resolved and creating a new query with your USB specific questions. These will be assigned to the appropriate expert.

    Thanks,

    Sira

  • Hi Sira,

    Thanks for your feedback.

    With regards

    eswar kommi