This project is a universal motor control design
that has support for TI EVM motor driver kits and can be used in conjunction with the AM263x
MCU devices. The user can run different TI EVM kits by setting the build configurations and
properties of the project. In the following sections, the LP-AM263 is used in
combination with the BOOSTXL-3PHGANINV 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:
- <install_location>\examples\ to select the
"universal_motorcontrol_lab" folder.
- The project can be configured to run on two 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 3phGaN_3SC) as shown in Figure 4-1.
- 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 4-2.
- 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 to "MOTOR1_FWC", and field weakening control functions are
disabled 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 4-3.
- Select the right supporting functions by enabling the pre-define symbol/s as shown
in Figure 4-2.
- Select the right target configuration file (.ccxml) as shown in Figure 4-4 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.
- AM263_LP.ccxml is for the LP-AM263
based hardware kit.
- AM263_CC.ccxml is for the TMDSCNCD263 based hardware kit.
- 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.
Uncomment the #define that corresponds with the motor being tested, and verify 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 4.3.
Table 4-3 The Supporting Algorithms, Functions
and Motors Matrix in Universal Motor Control
Algorithms or Functions |
Pre-Define Symbols |
LaunchPad |
controlCARD |
|
|
BOOSTXL-3PHGANINV |
TMDSHVMTRINSPIN |
eSMO based Sensorless FOC |
MOTOR1_ESMO |
✔,
LVSERVOMTR |
✔, HVPMSMMTR |
QEP Encoder based Sensored FOC |
MOTOR1_ENC |
✔,
LVSERVOMTR |
✔, HVPMSMMTR |
Hall Sensors based Sensored
FOC |
MOTOR1_HALLHALL_CAL |
✔,
LVSERVOMTR |
✖ |
Datalog with Graph Tool |
DATALOG_EN |
✔ |
✔ |
PWMDAC |
EPWMDAC_MODE |
✖ |
✔ |
SFRA Tool |
SFRA_ENABLE |
✔ |
✔ |
Step Response with Graph Tool |
STEP_RP_EN |
✔ |
✔ |