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.

TIDM-DC-DC-BUCK: Adapting solution to F28P55x

Part Number: TIDM-DC-DC-BUCK
Other Parts Discussed in Thread: C2000WARE, SFRA

I am getting stuck on some undefined identifiers in my CCS project. To summarize where I am at, I am attempting to migrate the TIDM-DC-DC-BUCK project from F28004x to the F28P55x. I am a beginner to embedded systems, and have learned a lot by trial & error with this project.

To begin the migration, I used a Universal Project for the F28P55x, then referenced the original project for F28004x, copying nearly everything exactly the same. The details of this procedure are shown in this powerpoint pdf file: 20251216_TI_E2E_prompt.pdf

Now I am stuck on a few undefined identifiers:

image.png

I believe that these identifiers are having issues because the pins are named slightly differently for the F28P55x compared to the F28004x. I am not sure how to proceed to fix these identifiers. It is worth noting that "CMPSS_DACREF_VDDA" appears to not even be a functionality in the F28P55x version of the code. Do I just delete this line from "buck_hal.c"? That doesn't seem very robust.

What follows is just speculation. When I "ctrl+click" on each of the identifiers, following it down to the lowest level of C2000Ware, I found this "pin_map_legacy.h" for the F28004x, which seems like it might be of interest. What is the purpose of this file? It seems like it is meant just for the problem I have. Another thought I had would be to go into "buck_user_settings.h" to manually change the pin assignments to match those identifiers for F28P55x. Something doesn't sit right with me to go in and change identifiers manually - it seems not very robust. For example, maybe these files are linked or get updated when I rebuild the project anyways, so this doesn't help.

  • Zachary,

    These seems like defines related issues in user_settings.h.

    You can check what pins from F28P55x is getting used here and update those defines accordingly. Try to resolve those easy fix issues first and then let me know what other issue are you facing.

    Regards,

    Sumit

  • Hi Sumit,

    The first issue I have encountered has to do with fixing these defines-related issues. I was able to fix the "EPWM" issues easily, as their identifiers only changed slightly.

    "CMPSS_DACREF_VDDA" is nonexistent for the F28P55x as a functionality. I don't know how to properly edit the code where it shows up without affecting the performance of the project. It shows up in 'buck_hal.c' in the function 'BUCK_HAL_setupOverCurrentCmpssTrip' as: 

        //
        // Use VDDA as the reference for comparator DACs
        //
        dacConfig = CMPSS_DACVAL_SYSCLK |
                CMPSS_DACREF_VDDA; // need to change this

    I am hoping you can provide some insight on how to change this.

    Furthermore, I was unable to find "GPIO_28_SCIRXDA" and "GPIO_29_SCITXDA" in the F28004x technical reference manual (TRM), so I am unsure how to proceed. I did find "SCIA_RX" and "SCIA_TX" in Section 8.6 of the F28004x TRM, but I'm not sure if these are the same thing.

    Assuming that those sets of pins do indeed match, I glanced at the F28P55x TRM to find "SCIA_RX" and "SCIA_TX" in Section 10.9.

    Please let me know how to proceed with the VDDA pin and these SCI pins, thank you!

  • Zachary,

    You can search the project by ctrl+H for that function and you will find the following definition CMPSS_configDAC for P55x. You can choose option by looking at the comment. You can search other functions for high and low side CMPSS as well CMPSS_configDACHigh and  CMPSS_configDACLow. You can refer the TIDA010062 CCS project with P55x to see how these references are set. Search these functions and you will see the use case that you can refer and copy.

    Regarding GPIO_28_SCIRXDA and GPIO_29_SCITXDA are defines to use with APIs. But you are right their pin assignments are same in this case. Generally we try to keep it at GPUI28 and 29.

    Regards,

    Sumit

  • Hi Sumit, 

    I have now resolved those errors. Thanks for your assistance. Now when I build the project, I am getting a slew of new errors, and I have no good ideas for how to proceed. Maybe these errors are related to the warnings? I will paste screenshots of the errors below.

  • Nevermind that last post. I think I figured it out. It was because I had two folders with source files, one I copied over from the 04x reference design, and the one in the new project by default. So things were getting assigned, allocating memory, etc twice.

    Now I am getting stuck on a relatively simple error. I found that the driverlib folder (C:\ti\C2000Ware_6_00_01_00\driverlib\f28p55x\driverlib) for 55x and 04x are slightly different. The 55x driverlib folder doesn't contain the "can.c/.h" source files. 

    I found MCAN on the 55x, I'll try replacing can.h/.c with that and see how it goes.

    EDIT: I realized that this error and more like it were popping up within the "device" folder, which I copied over directly from the F28004x reference design. So it is obvious to me now why there were all these errors. I am learning! I deleted the "device" folder, and those kind of errors (compiler errors, I think) were resolved.

  • Now I am getting stuck with linker errors. Please see the "<Linking>" console output below:

    Building target: "Universal Project_F28P55x_v2.out"
    Invoking: C2000 Linker
    "C:/ti/ccs1281/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu1 --vcu_support=vcrc -Ooff --advice:performance=all --define=_TI_EABI_ --define=_DEBUG --define=CLA_DEBUG=1 --define=DEBUG --define=F28x_DEVICE --define=CPU1 --define=LARGE_MODEL --define=_FLASH --define=generic_flash_lnk --define=_LAUNCHXL_F28P55X --define=BUCK_CONTROL_RUNNING_ON_CPU --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi -z -m"Universal Project_F28P55x_v2.map" --heap_size=0x200 --stack_size=0x3F8 --warn_sections -i"C:/ti/ccs1281/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/lib" -i"C:/ti/C2000Ware_6_00_01_00" -i"C:/Users/zachm/w_ccs_v12_workspaces/Universal Project_F28P55x_v2/CPU1_LAUNCHXL_FLASH/syscfg" -i"C:/ti/ccs1281/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/include" --reread_libs --define=_FLASH --define=generic_flash_lnk --diag_wrap=off --display_error_number --xml_link_info="Universal Project_F28P55x_v2_linkInfo.xml" --entry_point=code_start --rom_model -o "Universal Project_F28P55x_v2.out" "./buck.obj" "./buck_hal.obj" "./buck_main.obj" "./syscfg/board.obj" "./syscfg/device.obj" "./syscfg/device_cmd.obj" "./syscfg/c2000ware_libraries.obj" "./f28p55x_codestartbranch.obj" "./libraries/DCL/DCL_DF22_L2L3.obj" "./libraries/DCL/DCL_clamp_L1.obj" "./libraries/DCL/DCL_error.obj" "./libraries/sfra/sfra_gui_scicomms_driverlib.obj" "../libraries/CLAmath/cla2_math_library_fpu32_eabi.lib" "../libraries/FPUfastRTS/rts2800_fpu32_fast_supplement_eabi.lib" "../libraries/SFO/SFO_v8_fpu_lib_build_c28_driverlib_eabi.lib" "../libraries/sfra/sfra_f32_tmu_eabi.lib" -l"syscfg/device_cmd.cmd"  -lc2000ware_libraries.cmd.genlibs -lboard.cmd.genlibs -llibc.a 
    <Linking>
    error #16004-D: file "../libraries/SFO/SFO_v8_fpu_lib_build_c28_driverlib_eabi.lib<SFO_v8_fpu_lib_build_c28_driverlib.obj>" has a Tag_VCU attribute value of "1" that is different than one previously seen ("3"); combining incompatible files
    warning #10247-D: creating output section "dclfuncs" without a SECTIONS specification
    warning #10247-D: creating output section "ramfuncs" without a SECTIONS specification
    warning #10247-D: creating output section "isrcodefuncs" without a SECTIONS specification
    warning #10247-D: creating output section "SFRA_F32_Data" without a SECTIONS specification
    "syscfg/device_cmd.cmd", line 117: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. run placement with alignment/blocking fails for section ".bss" size 0x962 page 0.  Available memory ranges:
       RAMLS5       size: 0x800        unused: 0x7b5        max hole: 0x7b5     
    error #10010: errors encountered during linking; "Universal Project_F28P55x_v2.out" not built

    >> Compilation failure
    makefile:161: recipe for target 'Universal Project_F28P55x_v2.out' failed
    gmake[1]: *** [Universal Project_F28P55x_v2.out] Error 1
    makefile:157: recipe for target 'all' failed
    gmake: *** [all] Error 2

    **** Build Finished ****

  • It seems like there there were specific section of memory allotted for SFRA and DCL data. Could you please refer the example by importing TIDM010062 example code with P55x from C2000Ware DPSDK and refer the lnk.cmd file for the same. That way you can compare your lnk.cmd for the following section. You can use this file to copy settings.

    Regards,

    Sumit

  • I have been able to successfully import the TIDM010062 example into my workspace and locate the "28p55x_generic_flash_lnk.cmd" file, no problem. I am a little bit confused on the rest of what you said, though. You say I should compare to "my lnk.cmd". I assume this means that I should find a similar ".cmd" file within my F28P55x Universal Project that ends in "lnk.cmd". But in my project I don't immediately see any such file in the project root (see screenshot below on the left). 

    Rather, the error points to a ".cmd" file buried in the project directory (screenshot below in the middle) called "device_cmd.cmd". Should I copy the contents of the "28p55x_generic_flash_lnk.cmd" into "device_cmd.cmd"? If so, I am concerned because when I go to edit this file it warns me that it is a derived file (below on the right). I don't totally know what this means, but it seems to indicate to me that any edits I make will be overwritten by some other source.

          

    Furthermore, after exploring a little bit (reading the migration user's guide for F28003x and F28P55x), Section 4.2 directs me to a C2000Ware directory that contains many ".cmd" files (screenshot below). I don't know what I am really looking at here, but I am just including this in case it helps you to help me!

    Please let me know your thoughts, thank you.

    -Zach Miles

  • Hello Zach,

    You can use "28p55x_generic_ram_lnk.cmd" file from here. If you are using SFRA then you may have to assign those sections from example code .cmd file here and save it. I would say first try as it is and then edit it if needed.

    If you are not using SFRA then you don't need to edit this file and remove that piece of code from the project.

    Regards,

    Sumit

  • You can also refer this project especially .cmd file for your reference to see if that resolves your issue. This is same TIDM-DC-DC-BUCK code but with the P55x device.

    /cfs-file/__key/communityserver-discussions-components-files/908/buck_5F00_p55x.zip

    Please note that this is not released code just tried something to resolve your issue. So, use with caution.

    Regards,

    Sumit

  • Hi Sumit,

    I tried both of your most-recent posts, but no luck. Here is a pdf detailing the steps I took. Page 53 is where I show my work for this ".cmd" file business.

    260116_TI_E2E_prompt.pdf

    Please let me know what to try next, thank you.

  • Zach,

    Question: Did you try the zip file ccs project that I sent directly? Does it build and load on the LP?

    Regards,

    Sumit

  • Hi Sumit,

    I did not try that. However, I have come up with a different approach to this problem that I am going to pursue. I am going to try to work from the ground up with a simple example within the resource explorer, writing my own code.

    Start low-level, work slowly to higher complexity: Start with a F28P55x example file that has ADCs and/or EPWMs set up (example: "Resource Explorer/C2000 real-time microcontrollers/Embedded Software/C2000Ware/English/Devices/F28P55x/F28P559SJ9/Examples/Driverlib/adc/adc_ex2_soc_epwm"), understand the inner workings of this, make a second, complementary PWM, test it. Make the ADCs, test them. Etc...

    I will make a new post in the future if I have issues with this new approach or decide to come back to this high-level approach we have been trying.

    Thank you for all your assistance.

    -Zach