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.

Compiler: About HVsensorless for Tms570ls1224

Other Parts Discussed in Thread: HALCOGEN, TMS570LS1224

Tool/software: TI C/C++ Compiler

Hello there,
I want to adapt the HVACI_Sensorless (for F2803x) project for TMS570LS1224. For this, I think of combining the codes in the project with the codes I have produced from HALCOGEN.
First, I will generate pwm with Space Vector. For this, I will adapt the libraries svgenlib.h, f2803xpwm.h, f2803xdrvlib.h, f2803xbmsk.
I was a little confused while adapting the f2803xdrvlib.h library.
The EPwm1Regs parameter is defined for the ePWM [ch1] structure inside f2803xpwm.h. But HALCOGEN codes have the definition of etpwmREG1 ((etpwmBASE_t *) 0xFCF78C00U). Do these defines perform the same task? Should I add the EPwm1Regs structure to HALCOGEN codes?
And is this method right? I am waiting for your suggestions to realize this project.(How should I proceed?)
Thank you so much
Have a good day ..

  • Hello Emre,

    The TMS570 uses the same ePWM IP as on C2000 MCU. But TMS570 doesn't support HRPWM (high-resolution PWM).

    The registers used on TMS570 and F2803 should have the same definition. 

  • Thank you Wang,

    I still have some questions .

    The registration assignments for TMS570LS12x and F2803x are below. There are record assignments in the definition of PWM_INIT_STATE in the F2803xpwm.h library (for F2803x). For example, the LOADAMODE_ZRO Record value is defined in PWM_INIT_STATE. This value is defined as 0x0000 in the file F2803Xbmsk.h. However, TMS570LS12x is defined in the library etpwm.h as LoadMode_CtrEqZero = 0U.
    Should I write LoadMode_CtrEqZero in PWM_INIT_STATE? Or should I create the F2803Xbmsk.h library for TMS570 and make PWM_INIT_STATE definitions from there?
    And my other question is that in the DSP2803x_epwm.h library, "all" and "bit" and definitions such as TBCTL_REG are made. Should I make these definitions? If I do, will there be conflicts in the codes?
    I'm waiting for your answers.
    Thank you for your help.
    Have a nice day.

    1)F2803xpwm.h defines

    2) F2803Xbmsk.h defines

    3)DSP2803x_epwm.h defines

    4) etpwm.h defines