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: Space Vector Pulse Modulation in HVACI_Sensorless

Other Parts Discussed in Thread: TMS5701224, TMS570LS1224, CONTROLSUITE, MOTORWARE

Tool/software: Code Composer Studio

Hello,

I have some questions.
1) I want to adapt the HVACI_Sensorless (for F2803x) project for the TMS570LS1224 processor. First of all I ran the project for F2803x and I want to start the conversion for TMS570LS1224 from the last part (Space Vector and PWM block). Below is a screenshot of the blocks.(1.Screen view). How should I proceed for this? I think the register assignments for the project F2803x processor have changed. Where are Epwm and other register assignments done in the HVACI_Sensorless project?For example, where is PWM1 A/B in the HVACI_Sensorless project? and where should I make changes for TMS5701224.

2) 

I am adding libraries one by one to adapt this project for TMS570LS1224. First of all, I added the libraries used in the last block. (SVGEN, F2803x.pwm, IQmathLib etc.). But when I run the project, I get the following errors. For example, _iq and Uint16 are not defined. The screenshots is below.(2-3-4.Screen views)

* gmake: Target 'all' not remade because of errors.
* gmake: *** [main.obj] Error 1
* # 20 identifier "Uint16" is undefined
* # 20 identifier "_iq" is undefined
* # 20 identifier "EQep1Regs" is undefined
* # 20 identifier "EPwm7Regs" is undefined
* # 20 identifier "ECap1Regs" is undefined

CAN YOU HELP ME QUICKLY WITH THIS?
Thank you for your help.

Have a Good Day..

1.Screen view

2.Screen view

3.Screen view (in HVACI_Sensorless) - it is normal color.

4.Screen view (for Tms570ls1224) it is not normal color. So it is undefined.

  • Hello Emre,

    I am not familiar to C2000 controlSuite. Did you take a look at Hercules motorWare at this link: https://processors.wiki.ti.com/index.php/TMS570LS12x_CNCD ?

  • Hi,

    Yes, I did, but I couldn't see the HVACI_Sensorless project for HERCULES. I want to control the AC motor without sensor with TMS570LS1224. This project in ControlSuite is exactly what I want, but not for my processor. Where can I find the HVACI_Sensorless project for Hercules?

    I have been waiting your answer ,

    Thank your help

  • You will have to manually port the example over to TMS570. The LS1224 Cortex R4F CPU also has a floating point coprocessor, so you don’t need to use the IQMath library. You can reuse all the source and header files. Assembly routines, if any, will need to be ported to ARM assembly.

  • Thanks,

    How can I tell if there are assembly routines? And if thre is, how can I convert it to ARM assembly?and;

    So how do you suggest me to follow the road? My primary goal is to apply the space vector application and see the pwm signals on the oscilloscope.
    But when I add the libraries, I get the following errors.


    **** Build of configuration Debug for project deneme07 ****

    "C:\\ti\\ccs930\\ccs\\utils\\bin\\gmake" -k -j 4 all -O

    Building file: "C:/Users/EMRE/Desktop/deneme07libs/dsp_header/source/DSP2803x_GlobalVariableDefs.c"
    Invoking: ARM Compiler
    "C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/bin/armcl" -mv7R4 --code_state=32 --float_support=VFPv3D16 --include_path="C:/Users/EMRE/Desktop/deneme07libs/supportfiles/Tms570ls1224_headers" --include_path="C:/Users/EMRE/Desktop/deneme07libs/dsp_header/include" --include_path="C:/Users/EMRE/Desktop/deneme07libs/motor_control/math_block" --include_path="C:/Users/EMRE/Desktop/deneme07libs/motor_control/drivers" --include_path="C:/Users/EMRE/Desktop/deneme07libs/IQ_math/include" --include_path="C:/Users/EMRE/Desktop/deneme07libs/dsp_common/include" --include_path="C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="DSP2803x_GlobalVariableDefs.d_raw" "C:/Users/EMRE/Desktop/deneme07libs/dsp_header/source/DSP2803x_GlobalVariableDefs.c"

    >> Compilation failure
    subdir_rules.mk:9: recipe for target 'DSP2803x_GlobalVariableDefs.obj' failed
    "C:/Users/EMRE/Desktop/deneme07libs/dsp_header/include/DSP2803x_Device.h", line 49: warning #262-D: explicit type is missing ("int" assumed)
    "C:/Users/EMRE/Desktop/deneme07libs/dsp_header/include/DSP2803x_Device.h", line 49: error #66: expected a ";"
    "C:/Users/EMRE/Desktop/deneme07libs/dsp_header/include/DSP2803x_Device.h", line 50: warning #262-D: explicit type is missing ("int" assumed)
    "C:/Users/EMRE/Desktop/deneme07libs/dsp_header/include/DSP2803x_Device.h", line 50: error #66: expected a ";"
    2 errors detected in the compilation of "C:/Users/EMRE/Desktop/deneme07libs/dsp_header/source/DSP2803x_GlobalVariableDefs.c".
    gmake: *** [DSP2803x_GlobalVariableDefs.obj] Error 1
    Building file: "../HVACI_Sensorless-DevInit_F2803x.c"
    Invoking: ARM Compiler
    "C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/bin/armcl" -mv7R4 --code_state=32 --float_support=VFPv3D16 --include_path="C:/Users/EMRE/Desktop/deneme07libs/supportfiles/Tms570ls1224_headers" --include_path="C:/Users/EMRE/Desktop/deneme07libs/dsp_header/include" --include_path="C:/Users/EMRE/Desktop/deneme07libs/motor_control/math_block" --include_path="C:/Users/EMRE/Desktop/deneme07libs/motor_control/drivers" --include_path="C:/Users/EMRE/Desktop/deneme07libs/IQ_math/include" --include_path="C:/Users/EMRE/Desktop/deneme07libs/dsp_common/include" --include_path="C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="HVACI_Sensorless-DevInit_F2803x.d_raw" "../HVACI_Sensorless-DevInit_F2803x.c"

    >> Compilation failure
    subdir_rules.mk:16: recipe for target 'HVACI_Sensorless-DevInit_F2803x.obj' failed
    "C:/Users/EMRE/Desktop/deneme07libs/supportfiles/Tms570ls1224_headers/PeripheralHeaderIncludes.h", line 38: warning #262-D: explicit type is missing ("int" assumed)
    "C:/Users/EMRE/Desktop/deneme07libs/supportfiles/Tms570ls1224_headers/PeripheralHeaderIncludes.h", line 38: error #66: expected a ";"
    "C:/Users/EMRE/Desktop/deneme07libs/supportfiles/Tms570ls1224_headers/PeripheralHeaderIncludes.h", line 39: warning #262-D: explicit type is missing ("int" assumed)
    "C:/Users/EMRE/Desktop/deneme07libs/supportfiles/Tms570ls1224_headers/PeripheralHeaderIncludes.h", line 39: error #66: expected a ";"
    "../HVACI_Sensorless-DevInit_F2803x.c", line 35: error #20: identifier "IER" is undefined
    "../HVACI_Sensorless-DevInit_F2803x.c", line 36: error #20: identifier "IFR" is undefined
    "../HVACI_Sensorless-DevInit_F2803x.c", line 539: warning #145-D: a value of type "volatile PINT *" cannot be used to initialize an entity of type "PINT *"
    4 errors detected in the compilation of "../HVACI_Sensorless-DevInit_F2803x.c".
    gmake: *** [HVACI_Sensorless-DevInit_F2803x.obj] Error 1
    Building file: "../HVACI_Sensorless.c"
    Invoking: ARM Compiler
    "C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/bin/armcl" -mv7R4 --code_state=32 --float_support=VFPv3D16 --include_path="C:/Users/EMRE/Desktop/deneme07libs/supportfiles/Tms570ls1224_headers" --include_path="C:/Users/EMRE/Desktop/deneme07libs/dsp_header/include" --include_path="C:/Users/EMRE/Desktop/deneme07libs/motor_control/math_block" --include_path="C:/Users/EMRE/Desktop/deneme07libs/motor_control/drivers" --include_path="C:/Users/EMRE/Desktop/deneme07libs/IQ_math/include" --include_path="C:/Users/EMRE/Desktop/deneme07libs/dsp_common/include" --include_path="C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="HVACI_Sensorless.d_raw" "../HVACI_Sensorless.c"

    >> Compilation failure
    subdir_rules.mk:23: recipe for target 'HVACI_Sensorless.obj' failed
    "C:/Users/EMRE/Desktop/deneme07libs/supportfiles/Tms570ls1224_headers/PeripheralHeaderIncludes.h", line 38: warning #262-D: explicit type is missing ("int" assumed)
    "C:/Users/EMRE/Desktop/deneme07libs/supportfiles/Tms570ls1224_headers/PeripheralHeaderIncludes.h", line 38: error #66: expected a ";"
    "C:/Users/EMRE/Desktop/deneme07libs/supportfiles/Tms570ls1224_headers/PeripheralHeaderIncludes.h", line 39: warning #262-D: explicit type is missing ("int" assumed)
    "C:/Users/EMRE/Desktop/deneme07libs/supportfiles/Tms570ls1224_headers/PeripheralHeaderIncludes.h", line 39: error #66: expected a ";"
    "../HVACI_Sensorless.c", line 330: error #20: identifier "IER" is undefined
    "../HVACI_Sensorless.c", line 561: warning #225-D: function "__IQsat" declared implicitly
    "../HVACI_Sensorless.c", line 567: warning #225-D: function "__IQmpy" declared implicitly
    "../HVACI_Sensorless.c", line 1325: warning #225-D: function "__IQmpy" declared implicitly
    3 errors detected in the compilation of "../HVACI_Sensorless.c".
    gmake: *** [HVACI_Sensorless.obj] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

  • Many of the compile errors in the header files appear to be real errors that would need to be addressed one by one. You would need to do that just like getting compile errors on any source code file you create.

    The errors related to some variables not being defined or the warnings about implicit declarations are usually because you are missing including the required library, e.g. IQMath library. As I mentioned before TMS570LS1224 has a floating-point coprocessor, so you can convert (manually) these calls to IQMath library functions to actual floating-point operations.

    Assembly routines are typically in separate files with an extension like ".asm", so you can look to see if there are source files with such an extension in the CCS code project.

    We have not ported this example from the ControlSuite, and do not have a ready example for you to use.