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.

HVACI_Scalar

Other Parts Discussed in Thread: TMS320F28027, CONTROLSUITE

I need to compile the HVACI_Scalar project in a TMS320F28027.
In the ControlSUITE this appears in made ​​for a f2803x. Are there libraries for f2802x?
I simply want to V/HZ control open loop for a inducion motor.

Thanks you.

Best regards.

Diego

  • Diego,

    The F28035 device and F28027 device are very similar and therefore the software written for the F2803x should largely be applicable to the F2802x series of devices. 

    In fact, the non-CLA files of the f2803x motor control library should be fully compatible to the F28027 device.  More details on differences between various devices can be found in following helpful appnote:
    http://www.ti.com/lit/spru566


    ---

    The main difference between the MCUs is that there are a few less peripherals (PWMs, QEP, CAN, etc) and less memory. 

    In the ACI_Scalar project, the main difference would entail changing the F28035_XXXXX_HVACI_Scalar.CMD to a F28027-based linker command file.  You'd want to make this based on the F28027.cmd file found here (\controlSUITE\device_support\f2802x\v210\f2802x_common\cmd\).  If done right, this would fix the memory issue.  You'd also want to change out the header files to the ones relevant to the F2802x series.  And then finally, you'll want to comment out any code that exercises peripherals that don't exist in the F28027.  This sounds complicated, but it isn't too bad and is very doable.


    Thank you,
    Brett

  • Brett, 

    Thank you very much for your reply.

    I delete:
      - F28035_FLASH_HVACI_Scalar.CMD
      - F28035_RAM_HVACI_Scalar.CMD
    and replace:
    - F28027.cmd from "\ controlSUITE \ device_support \ f2802x \ v210 \ f2802x_common \ cmd \"

    In Includes:
    "$ {CONTROLSUITE_HVMOTOR_ROOT} / device_support/f2803x/v125/DSP2803x_headers/include"
    "$ {CONTROLSUITE_HVMOTOR_ROOT} / device_support/f2803x/v125/DSP2803x_common/include"
    "$ {CONTROLSUITE_HVMOTOR_ROOT} / libs/math/IQmath/v15c/include"
    "$ {CONTROLSUITE_HVMOTOR_ROOT} / development_kits / ~ SupportFiles/F2803x_headers"
    "$ {CONTROLSUITE_HVMOTOR_ROOT} / libs/app_libs/motor_control/math_blocks/v4.0"
    "$ {CONTROLSUITE_HVMOTOR_ROOT} / libs/app_libs/motor_control/drivers/f2803x_v2.0"

    replace by:
    "$ {CONTROLSUITE_HVMOTOR_ROOT} / device_support/f2802x/v125/DSP2802x_headers/include"
    "$ {CONTROLSUITE_HVMOTOR_ROOT} / device_support/f2802x/v125/DSP2802x_common/include"
    "$ {CONTROLSUITE_HVMOTOR_ROOT} / libs/math/IQmath/v15c/include"
    "$ {CONTROLSUITE_HVMOTOR_ROOT} / development_kits / ~ SupportFiles/F2802x_headers"
    "$ {CONTROLSUITE_HVMOTOR_ROOT} / libs/app_libs/motor_control/math_blocks/v4.0"
    "$ {CONTROLSUITE_HVMOTOR_ROOT} / libs/app_libs/motor_control/drivers/f2803x_v2.0"

    In HVACI_Scalar.h:
    # if (DSP2802x_DEVICE_H == 1)
    # include "f2803xileg_vdc.h" / / Include header for the ILEG2DCBUSMEAS object
    # include "f2803xpwm.h" / / Include header for the PWMGEN object
    # include "f2803xpwmdac.h" / / Include header for the PWMGEN object
    # include "f2803xqep.h" / / Include header for the QEP object
    # include "f2803xcap.h" / / Include header for the CAP object
    # include "DSP2802x_EPwm_defines.h" / / Include header for PWM define
    # endif

    replace by:

    #if (DSP2802x_DEVICE_H==1)
    #include "f2803xileg_vdc.h" // Include header for the ILEG2DCBUSMEAS object
    #include "f2803xpwm.h" // Include header for the PWMGEN object
    #include "f2803xpwmdac.h" // Include header for the PWMGEN object
    #include "f2803xqep.h" // Include header for the QEP object
    #include "f2803xcap.h" // Include header for the CAP object
    #include "DSP2802x_EPwm_defines.h" // Include header for PWM defines
    #endif

    When I go to "Rebuild Project", in the "problems" appears:

    Description Resource Path Location Type
    identifier "EQep1Regs" is undefined HVACI_Scalar.c /HVACI_Scalar line 21, external location: C:\Archivos de programa\Texas Instruments, Inc\controlSUITE\libs\app_libs\motor_control\drivers\f2803x_v2.0\f2803xdrvlib.h C/C++ Problem
    identifier "EPwm6Regs" is undefined HVACI_Scalar.c /HVACI_Scalar line 14, external location: C:\Archivos de programa\Texas Instruments, Inc\controlSUITE\libs\app_libs\motor_control\drivers\f2803x_v2.0\f2803xdrvlib.h C/C++ Problem
    identifier "EPwm7Regs" is undefined HVACI_Scalar.c /HVACI_Scalar line 15, external location: C:\Archivos de programa\Texas Instruments, Inc\controlSUITE\libs\app_libs\motor_control\drivers\f2803x_v2.0\f2803xdrvlib.h C/C++ Problem
    identifier "EPwm5Regs" is undefined HVACI_Scalar.c /HVACI_Scalar line 13, external location: C:\Archivos de programa\Texas Instruments, Inc\controlSUITE\libs\app_libs\motor_control\drivers\f2803x_v2.0\f2803xdrvlib.h C/C++ Problem

    What code I should comment to eliminate these errors?

    Best regards.

    Diego 

  • Diego,

    It appears that the software is utilizing peripherals that exist on the F2803x but not the F2802x.  You'll have to comment out the functionality achieved by these non-existent peripherals.

    From my recollection, the QEP in the F2803x utilized an external encoder.  This will likely not be necessary in your system.  Several of these higher-numbered PWMs were used as DACs to aid in debugging.  They'd also not be necessary.


    Thank you,
    Brett

  • Brett,

    Thank you very much for your reply.
    Finally I was able to compile the program without mistakes, to do this I had to comment some lines in f2803xdrvlib.h and in HVACI_Scalar.h.

    Now when I make a debug (I use C2000 launchpad) , add the variable EnableFlag in the Expression window then appears in the value column the following error:
    EnableFlag unknown Error: Memory map prevented us reading of target memory at 0x00009348 @ Data

    What does this error mean?

    Best regards,

    Diego

  • Diego,

    This tells me that either your target configuration is wrong, your main linker command file is wrong, or your Headers_nonBIOS.cmd file is still the F2802x version.


    Thank you,
    Brett

  • Brett,

    you say:

      "your main linker command file is wrong"

    In project -> properties -> General CCS ->
    Linker command Files: F28027.cmd (discussed above) Is this correct?

    you say:

      "our Headers_nonBIOS.cmd file is still the F2802x version."

    Do I have to use DSP2803x_Headers_nonBIOS.cmd or DSP2802x_Headers_nonBIOS.cmd?

    Thank you.

    Best regards,

    Diego

  • Diego diac said:

    you say:

      "your main linker command file is wrong"

    In project -> properties -> General CCS ->
    Linker command Files: F28027.cmd (discussed above) Is this correct?



    [BL] Yes you can do it there or you can copy-paste/link the file.  (I personally usually do the latter)


    Diego diac said:

    you say:

      "or your Headers_nonBIOS.cmd file is still the F2802x version."

    Do I have to use DSP2803x_Headers_nonBIOS.cmd or DSP2802x_Headers_nonBIOS.cmd?



    [BL] You should use everything made for the F2802x except the motor control library files (of which there is only a F2803x version).  I'd make a local copy of these and then make whatever edits necessary to include as much F2802x material as possible.


    Thank you,
    Brett