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/TMS320F28069M: ePWM different declearation

Part Number: TMS320F28069M
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: Code Composer Studio

Hello All,

I am using sample code frm controlSUIT HVLLC.

In the attachment "main", the EPWM is accessed twice: 1)line410:  ePWM_CompairDB_CNF(); line 452: EPwm1Regs.ETSEL.bit.SOCAEN=1.

In the  ePWM_CompairDB_CNF(); (*ePWM[n]). is used to access the pwm register which I thought is as same as EPwm1Regs. But now I found all of the codes related to the (*ePWM[n]).cannot change pwm registers.

After digging the definition and declaration of ePWM, only EPwm1Regs is mapped in the memory.

My question is how (*ePWM[n]) is referred to PWM registers?

Thanks,

Tian

  • Hello Tian,

    Both methods, using *ePWM[n] or EPwmxRegs, are valid to write to EPWM registers. *ePWM[] is declared as an extern in line 27 of your 2nd screenshot. You can right-click on *ePWM[] and select open declaration to confirm this.

    When you step through the PWM_ComplPairDB_CNF() and looking at the Debug Registers window, are there specific EPWM registers written to in the code not being updated or do all of the registers remain unchanged?

    Elizabeth
  • Hello Elizabeth,

    There is no definition on *ePWM[] by selecting open declaration. This is my concern since I cannot even find the definition from TI's sample project "HV resonant LLC".

    The EPWM registers did not change when stepping through the PWM_ComplPairDB_CNF().

    *ePWM[] should be linked to EPWM1REG somehow to make this work. Can you point out that header file if it exists?

    Thanks,
    Tian
  • Tian,

    I'm looking at the HV LLC project in: C:\ti\controlSUITE\development_kits\TMDSHVRESLLCKIT_v1.0\HVLLC
    Did you find your example project somewhere else in controlSUITE?

    When I press Open Declaration, CCS opens DPLib.h located in C:\ti\controlSUITE\libs\app_libs\digital_power\f2802x_v3.2\include.

    I imported the project into CCS from controlSUITE and didn't make any changes. Can you check how you imported the project? The digital power library directory search path should already be added to the project when you import it.

    Elizabeth
  • Hi Elizabeth,

    I imported this project from ControlSUITE/Development Tools/Digital Power/HV Resonant LLC Developer's Kit/Example Projects/High Voltage LLC DC/DC Converter. then click the "Import the example project into CCS".
    But "open declaration" still does not work.

    I can find the declaration of ePWM[] in the file you mentioned. But this is still a declaration but not a definition of a register (i.e. not related to EPWM1REG). What do you think on this?

    I found the following definition in the f2802_V3.2/include. But I am using f28069 and I replaced f2802x with f2806x library which does not include the definition of *ePWM[].

    Do you have any suggestion on this?

    Thanks,
    Tian

  • Hi Tian,


    You can define the *ePWM[] struct in your own project with the same formatting.

    For an example, refer to lines 95-98 in:
    C:\ti\controlSUITE\device_support\f2806x\v151\F2806x_examples_ccsv5\hrpwm_duty_sfo_v6\Example_2806xHRPWM_Duty_SFO_V6.c


    Elizabeth
  • Thank you, Elizabeth!