JAJU879 November   2022

 

  1.   概要
  2.   リソース
  3.   特長
  4.   アプリケーション
  5.   5
  6. 1System Description
  7. 2System Overview
    1. 2.1 Block Diagram
    2. 2.2 Design Considerations
    3. 2.3 Highlighted Products
      1. 2.3.1 TMS320F280039C
      2. 2.3.2 UCC21530-Q1
      3. 2.3.3 OPA607-Q1
      4. 2.3.4 LM25184-Q1
      5. 2.3.5 TCAN1044A-Q1
    4. 2.4 System Design Theory
      1. 2.4.1 Three-Phase PMSM Drive
      2. 2.4.2 Field Oriented Control of PM Synchronous Motor
      3. 2.4.3 Field Weakening (FW) and Maximum Torque Per Ampere (MTPA) Control
      4. 2.4.4 Compressor Drive with Automatic Vibration Compensation
      5. 2.4.5 Hardware Prerequisites for Motor Drive
        1. 2.4.5.1 Motor Current Feedback
          1. 2.4.5.1.1 Current Sensing with Three-Shunt
          2. 2.4.5.1.2 Current Sensing with Single-Shunt
        2. 2.4.5.2 Motor Voltage Feedback
  8. 3Hardware, Software, Testing Requirements, and Test Results
    1. 3.1 Hardware Requirements
      1. 3.1.1 Hardware Board Overview
      2. 3.1.2 Test Conditions
      3. 3.1.3 Test Equipment Required for Board Validation
    2. 3.2 Test Setup
      1. 3.2.1 Hardware Setup
      2. 3.2.2 Software Setup
        1. 3.2.2.1 Code Composer Studio Project
        2. 3.2.2.2 Software Structure
    3. 3.3 Test Procedure
      1. 3.3.1 Level 1 Incremental Build
        1. 3.3.1.1 Project Setup
        2. 3.3.1.2 Running the Application
      2. 3.3.2 Level 2 Incremental Build
        1. 3.3.2.1 Project Setup
        2. 3.3.2.2 Running the Application
      3. 3.3.3 Level 3 Incremental Build
        1. 3.3.3.1 Project Setup
        2. 3.3.3.2 Running the Application
      4. 3.3.4 Level 4 Incremental Build
        1. 3.3.4.1 Project Setup
        2. 3.3.4.2 Running the Application
        3. 3.3.4.3 Tuning Field Weakening and MTPA Control
        4. 3.3.4.4 Tuning Vibration Compensation
        5. 3.3.4.5 CAN FD Command Interface
    4. 3.4 Test Results
      1. 3.4.1 MCU CPU Load, Memory, and Peripheral Usage
  9. 4Design and Documentation Support
    1. 4.1 Design Files
      1. 4.1.1 Schematics
      2. 4.1.2 BOM
    2. 4.2 Tools and Software
    3. 4.3 Documentation Support
    4. 4.4 サポート・リソース
    5. 4.5 Trademarks

CAN FD Command Interface

A CAN FD interface for sending commands and receiving debug information can optionally be added to the project. This interface not only demonstrates the use of the MCAN module on the C2000 device, but is helpful for debugging the project in a situation where a JTAG-based debug probe connection is inconvenient.

You will need to connect the CAN FD interface on the reference design board to an external device with which the reference design application will be communicating. For example, you could use a CAN FD-to-USB adapter to send and receive frames from a PC. You could also use another C2000 development board with a CAN FD transceiver. The TMS320F280039C LaunchPad™ development kit (LAUNCHXL-F280039C) has an on-board CAN transceiver and is a useful tool for this purpose. A CAN FD communication utility application for the LAUNCHXL-F280039C has been provided as part of the reference design software folder. This will be the method demonstrated in this section.

Note:

To connect to multiple devices in CCS at the same time, extra steps may be required, especially in the case where the two boards use the same debug probe type. See the article Debugging with Multiple XDS Debug Probes for help in setting up your debug environment. It will likely be easiest to use two instance of CCS—one for the main application and one for the CAN communication utility.

Following the steps described in Section 3.2.2.1, import the project called tidm_02012_cancom_util_<device>. Build the project, connect to the LaunchPad, and load the application. In the Expressions view, add the variables speedSet_Hz, flagEnableCmd, flagCmdRun, and canComVars, or import the tidm_02012_cancom_util.txt file.

Add support for the CAN command interface in the main tidm_02012_ecompressor project by adding the predefined symbol CMD_CAN_EN in the compiler settings of the project as described in Section 3.2.2.1. Build and load the project and add the canComVars and motorVars_M1.cmdCAN variables to your Expressions view or import the set of variables found in tidm_02012_can.txt.

Run both applications. If the CAN FD communication is working you should be able to see the canComVars.txMsgCount and canComVars.rxMsgCount incrementing in both devices' debug sessions. In the LaunchPad CAN utility debug session, try updating speedSet_Hz. You should see the update reflected in motorVars_M1.speedRef_Hz in the main application. It it's not updated, check that there aren't any motor fault flags set.

To send a command to run the motor, set flagCmdRun in the LaunchPad debug session. This will set motorVars_M1.flagEnableRunAndIdentify in the main application. In the LaunchPad debug session, you should see the canComVars updated with status information sent from the main application as shown in Figure 3-17.

GUID-20221101-SS0I-PHXJ-TCHM-SXW7WHZ5BWBH-low.png Figure 3-17 CAN FD Command Utility Variables in the Expressions View