The example lab is a universal project
that has support for various TI EVM motor driver kits that can be used in
conjunction with the F280025C, F280039C, or F2800137 C2000 MCU devices. The user can
run different TI EVM kits by setting the build configurations and properties of the
lab project. In the following sections, the LAUNCHXL-F280025C, LAUNCHXL-F280039C, or LAUNCHXL-F2800137 is used in combination with the BOOSTXL-DRV8323RS lab to show how to import and run the example lab on
this kit.
- Import the project within CCS by
clicking "Project" ➔"Import CCS Projects...", and then click "Browse..." button
to select search directory at:
- F28002x based
lab:<install_location>\solutions\universal_motorcontrol_lab\f28002x\ccs\motor_control\
to select the "universal_motorcontrol_lab_f28002x" project.
- F28003x based
lab:<install_location>\solutions\universal_motorcontrol_lab\f28003x\ccs\motor_control\
to select the "universal_motorcontrol_lab_f28003x" project.
- F280013x based
lab:<install_location>\solutions\universal_motorcontrol_lab\f280013x\ccs\motor_control\
to select the "universal_motorcontrol_lab_f280013x" project.
- The lab project can be configured
to run on a variety of motor driver kits. You can select one of these kits by
right-clicking on the imported project name and selecting the right build
configuration (such as Flash_lib_DRV8323RS_3SC) as shown in Figure 3-18.
- Configure the project to select
the supporting functions in the project by right-clicking on the imported
project name, and then click the "Properties" command to set the pre-define
symbols for the project as shown in Figure 3-19.
- A pre-define symbol is
active or disabled by removing or adding the "_N" in the name. For
example, field weakening control is enabled by removing the "_N" in
"MOTOR1_FWC_N" to change it to "MOTOR1_FWC", and field weakening control
functions are disabled for motor 1 (Compressor) by changing the
"MOTOR1_FWC" symbol name to "MOTOR1_FWC_N".
- Select the right
supporting motor control algorithm based on the motor and hardware board
by enabling the related pre-define symbol as described above. The
supporting algorithms and related motors matrix are shown in Table 3-4.
- Select the right
supporting functions by enabling the pre-define symbol/s as shown in
Figure 3-19.
- Select the right target
configuration file (.ccxml) as shown in Figure 3-21 by right clicking on the file name to select "Set as Active Target
Configuration" and "Set as Default Target Configuration" on the pop-up menu.
- TMS320F280025C_LaunchPad.ccxml is for the LAUNCHXL-F280025C based hardware kits.
- TMS320F280025C.ccxml is
for the TMDSCNCD280025C based hardware kits.
- Select
or define the right motor model in the user_mtr1.h and
user_common.h files. These files are located under the src_board
folder located in the project explorer window. The motor defines section in the
user_mtr1.h file begins on line 921. Uncomment the #define that
corresponds with the motor being tested, and ensure that the rest of the #define
motors remain commented out. Make sure that the motor parameters in the code
match with the specifications of the connecting motor.
- Set up the hardware kit, connect
the motor, encoder, and/or hall sensor to the kit as described in Section 3.2.