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.

TMS320F280039C: Where can I find the Libraries of "Driverlib Functions" which have been identified in Device Technical Reference Manual?

Part Number: TMS320F280039C
Other Parts Discussed in Thread: LAUNCHXL-F280049C, C2000WARE, TMS320F28377S, TMS320F2810, TMS320F280049C

Where can I find the Libraries of "Driverlib Functions" which have been identified in Device Technical Reference Manual?

For example, looking at TI given "led_ex1_blinky.c" associated with Launchpad LAUNCHXL-F280049C indicates below function,

GPIO_setPadConfig(DEVICE_GPIO_PIN_LED1, GPIO_PIN_TYPE_STD);

In above function, I can find the "setPadConfig" in technical reference manual "TMS320F28004x_Technical Reference Manual_sprui33f.pdf".

Now, the question is in given example as per above function line, "GPIO_PIN_TYPE_STD" has been programmed. Then, how do I know what are other types in place of "STD"?

In other words, where can I find the all other possible LIBRARY of such functions?

Take another example of "adc_ex11_burst_mode_epwm.c", refer below function,

EPWM_setADCTriggerSource(EPWM1_BASE, EPWM_SOC_A, EPWM_SOC_TBCTR_U_CMPA);

I can find the "setADCTriggerSource" in technical reference manual in the Table of ".........Registers to Driverlib Functions".

But, how can I find the Libraries of "EPWM_SOC_TBCTR_U_CMPA"? What are other possibilities to porgram a device?

I am able to learn these Libraries in TI issued examples, but, as a beginner, How can I learn to program for many other possibilities for different applications?

Please advice with support document on How to add such functions in TI issued Table of ".........Registers to Driverlib Functions". 

  • Hi, 

    You can download C2000Ware and explore the "driverlib" folder for the f28003x. You will find all the driverlib source code in this folder. 

    There is also a driverlib API guide available at https://dev.ti.com/tirex/explore/node?node=A__ALLvXv5ya93oQ1lAr1HRLQ__c2000ware_devices_package__coGQ502__LATEST

    Best Regards

    Siddharth

  • Hi Siddharth,

    Many thanks for the link which exactly I was looking for.

    However, bit confused (sorry, being a beginner) with your indication as "You can download C2000Ware and explore the "driverlib" folder for the f28003x. You will find all the driverlib source code in this folder."

    What I did was, in CCS tried to Import the examples under "driverlib" for my device f28004x. Learned all the examples.

    Do you mean the same as per my understanding as explained above? Else, please clarify in more detailed manners How can I find the driverlib source code in such folder? I mean, does am I missing something???

    Regards,

    Venkatesh

  • Venkatesh,

    You can look into the <C2000Ware>\driverlib\f28004x\driverlib folder. The driverlib source is available in this folder.

    Best Regards

    Siddharth

  • Siddharth,

    Thanks. Found it with source code. I guess, these are the typical functions of source code for adc.c or gpio.c etc. Please confirm.

    On the while, I am updating my old device TMS320F2810 to TMS320F28377S with all same functions but in new CCS. 

    Please correct me, to update to new device, I am copying all functions in newer version of CCS based on driverlib functions and associated library.

    Is this is the right way? Or Kindly suggest any other alternative way? Previously, I migrated from Legacy CCV3.3 version project but it has many errors.

    Regards,

    Venkatesh

  • Venkatesh,

    TMS320F2810 had only support for bit field headers. TMS320F28377S supports both driverlib and bit field headers.  The bit field header for TMS320F28377S are available at  <C2000Ware>\device_support\f2837xs\headers. You can take a look at it and take a decision which approach to take.  You can also have a combination of driverlib and bit-field.

    Best Regards

    Siddharth

  • Siddharth,

    Thanks for your very useful tip/info.

    Yes, found all .h files in include directory. As per your point of view being my old device TMS320F2810 is based on Bit Field, with several .h files as shown in attached screenshot of project in CCS, it will be more convenient to modify the CCS functions in Bit Field mode of programming with similar functions (to be modified to suit to new device TMS320F28377S) with inclusion of .h files copied from your suggested directory.

    Yes, my preference is also the same with much less efforts to suit my very purpose to migrate to the new device with same application and functionality.

    Please confirm and advise for the same strategy.

    Regards,

    Venkatesh

  • Siddharth,

    Further to above, is it correct that I need to Add Files .h and modify .c files to suit TMS320F28377S requirements based on Technical Reference Manual's Registers.

    How about other files .pp, .asm, .dat, .mak, .abs etc. However, I found .cmd 2 files which also need to be copied?

    Please clarify since I am beginner for this activity with learning phase.

    Regards,

    Venkatesh

  • Siddharth,

    This is additional question related to above migration concern:

    Being there are several .c files, how to link them because in CCS. Please note below my understanding:

    1. CCS permits only one .c file containing code with "void main(void)"

    2. In order to link the "void main(void)", it needs to link another .c file with a content of function as

    extern void FILE_NAME();

    3. Later create another .c file containing code as ...

    void FILE_NAME()
    {

    }

    OR

    1. Refering to import/device_support/f2837xs/examples/empty_projects/ccs/empty_bitfield_project contains .c file with sample code as

    void main(void)
    {

    }

    2. Another .c file contains the code as

    void

    function .... (for example... GPIO_WritePin(Uint16 gpioNumber, Uint16 outVal)

    {

    }

    Now, my query is....

    Which option is best, as per item 2 & 3 above OR after the OR with bitfield sample example_projects.

    My preference is as per sample example_projects of bitfield.

    Please confirm.

    Regards,

    Venkatesh

  • Venkatesh,

    You can multiple C files in the CCS project. You can refer one of the existing example to see how the C files are added.

    Also refer the following link

    https://software-dl.ti.com/ccs/esd/documents/users_guide/index_project-management.html

    Best Regards

    Siddharth 

  • Siddharth,

    Please reply for this query.

    Regards,

    Venkatesh

  • Siddharth,

    Thanks for this reply with very useful tip.

    Please also reply for above 2 queries at the earliest.

    Regards,

    Venkatesh

  • Venkatesh,

    Which queries you are referring to? 

    As mentioned , you can have multiple C files within a CCS project.  One of the C files will have a main() function. The remaining functions can be in separate C files. It depends on how you want to structure your code.

    Best Regards

    Siddharth

  • Siddharth,

    Got your point.

    Looking at above shared screenshot of my existing old project under legacy 3.3C of CCS,

    Is it correct that I need to Add Files .h and modify .c files to suit TMS320F28377S requirements based on Technical Reference Manual's Registers.

    How about other files .pp, .asm, .dat, .mak, .abs etc. However, I found .cmd 2 files which also need to be copied? I guess, I need to copy all .h & .cmd files from the device_support directory of 2000ware. Guessing that .pp, .asm etc files which appears in my old existing project are relevent to old 3.3V of ccs.

    Please clarify since I am beginner for this activity with learning phase.

    Regards,

    Venkatesh

  • Venkatesh,

    Yes, you will need to add the C , Header , Linker command files (.cmd) for TMS320F28377S.  If there are any assemblty files (.asm), then you need to add those as well. The other files like .pp..mak  etc are generated when you compile the CCS project and need not be added to the project.

    Best Regards

    Siddharth   

  • Siddharth,

    Many thanks for your satisfactory and helpful tips.

    This is resolved my queries with many thanks, again.

    Regards,

    Venkatesh

  • Siddharth,

    You can multiple C files in the CCS project. You can refer one of the existing example to see how the C files are added.

    Also refer the following link

    https://software-dl.ti.com/ccs/esd/documents/users_guide/index_project-management.html

    Based on your clarifications, I am unable to find the "existing example to see how the C files are added."

    Please share the any examples to have multiple .c files having code works for all .c files.

    Regards,

    Venkatesh

  • Venkatesh, 

    You can  take a look at the I2C example "i2c_ex4_eeprom_polling" (<c2000Ware>\driverlib\f2837xs\examples\cpu1\i2c\CCS) . 

    It uses multiple C files.

    Best Regards

    Siddharth

  • Siddharth,

    Many Thanks....

    As per your suggested link, the contents can't be imported to my CCS which CCS shows as "GRAYED". Not understanding the reason.

    However, (\C2000Ware_4_03_00_00\device_support\f28004x\examples\i2c) link is able to import 2 examples containing several .c files. These have....

    "i2c_ex1_master.c" with "void main(void)" and others .c files have 

    In "f28004x_gpio.c" typically for example......

    void
    InitGpio() 

    void
    GPIO_SetupPinOptions(Uint16 gpioNumber, Uint16 output, Uint16 flags)

    In "f28004x_dma.c" typically for example......

    void StartDMACH1(void)

    void DMACH2AddrConfig(volatile Uint16 *DMA_Dest,volatile Uint16 *DMA_Source)

    Hope these are the examples to consider multiple .c files in my old project and similar way I need to manage.

    Just please confirm...

    Regards,

    Venkatesh

  • Venkatesh, 

    The project maybe already imported into the CCS workspace , hence it is showing up as "Grayed".  You can check the project explorer and see if these projects are already listed .

    You can refer any exaample which uses multiple C files.

    Best Regards

    Siddharth

  • Siddharth,

    In continuation of my query about multiple .c files in single project.

    I tried build LED1 & LED2 blinking in single project.

    "ex4_led_ex1_blinky" works fine. But, "Ex5_led_ex2_blinky_dcsm" doesn't work based on principles as proposed your examples. However, the same "Ex5_led_ex2_blinky_dcsm" project works fine with blinking of LED1 and it doesn't care with LED2 blinking although such .c file is available in the project. Is it that CCS 12 version with driverlib mode accepts only one "void main(void)"?

    Where is my mistake? What needs to be corrected in"Ex5_led_ex2_blinky_dcsm" so that LED2 can also blink? How can I link LED2 .c file to the project?

    These are Projects associated with "LAUNCHXL-F280049C"

    3632.ex4_led_ex1_blinky.zipEx5_led_ex2_blinky_dcsm.zip

  • Venkatesh,

    CCS project can have one entry point function  or main() and it can invoke functions in other C files.

    In the  "ex5_led_ex2_blinky_dcsm" project, the function "My_LED2" is never called. It should be called from the main() function for it to work.. 

     "ex4_led_ex1_blinky" works since the Toggle_My_LED2 function is invoked from the main function . This is the approach you should adopt.

    Best Regards

    Siddharth

  • Siddharth,

    Many Thanks......... Is this same concept applicable for Bitfield type?.......

    On the while.......

    After Importing a project from \C2000Ware_4_03_00_00\device_support\f28004x\examples\led "led_ex1_blinky" is unable to build showing an error as,

    "Error connecting to the target: (Error -716 @ 0x0) Required dynamic library jscserdes could not be located. The library isn't on the search path. (Emulation package 9.11.0.00128)"

    The Project doesn't have a facility to chose "Build Configurations\Set Active\CPU1_LAUNCHXL_RAM" and under targetConfigs there is no option to chose "TMS320F280049C_LaunchPad.ccxml", therefore such error occurs.

    However, the same LED project is able to import and build "without any errors" under \C2000Ware_4_03_00_00\driverlib\f28004x\examples\led

    How to eliminate the error?

    PFA screenshot for a project of LED with errors as per title....

    Regards,

    Venkatesh

  • Venkatesh,

    Yes, the same concept applies to bit-field.

    For the above error, looks like the project does not have "TMS320F280049C_LaunchPad.ccxml" and hence it is showing this error.  You can check under the targetConfigs to see the available ccxml files for the project.  The ccxml file is used to launch the debug session and connect to the board.

    Best Regards

    Siddharth