SPRAD20 March   2022 AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1

 

  1.   Trademarks
  2. 1Introduction
  3. 2A Step-by-Step Guide to Running a Traction Inverter
    1. 2.1 Create Real Time Debug Interface
      1. 2.1.1 Confirm CCS Features
      2. 2.1.2 Create Target Configuration File
      3. 2.1.3 Add Serial Command Monitor Software
      4. 2.1.4 Launch Real Time Debug
    2. 2.2 Configure Control Peripheral and ADC Interrupt With Sysconfig
      1. 2.2.1 Generate PWM for Time Reference
      2. 2.2.2 Synchronize ADC Sampling and Interrupt Service Routine
      3. 2.2.3 Configure DMA for Resolver Excitation via DAC
    3. 2.3 Configure Gate Driver Interface With MSPI
      1. 2.3.1 Confirm Control Card Hardware Configuration for Gate Drivers
      2. 2.3.2 Configure MCSPI for UCC5870 Gate Drivers
      3. 2.3.3 Initialize UCC5870 Gate Drivers
    4. 2.4 Get Samples From ADC and Read Samples Via CCS
      1. 2.4.1 Register and Enable Interrupt
      2. 2.4.2 Add Log Code to Read Samples in Graph at Fixed Rate
      3. 2.4.3 Read ADC Samples in Expression and Graph Windows
    5. 2.5 Generate Space Vector PWM and Drive Motor in Open Loop
      1. 2.5.1 Setup SVPWM Generator Inputs
      2. 2.5.2 Read SVPWM Duty Cycles in Graph Window
      3. 2.5.3 Power Up Inverter and Spin Motor in Open Loop
    6. 2.6 Close Current Loop With Mock Speed
      1. 2.6.1 Add Transformations and Read Id-Iq in Open Loop
      2. 2.6.2 Add Controllers to Close Current Loop
      3. 2.6.3 Read Id-Iq to Close Current Loop
    7. 2.7 Add Software Resolver to Digital Converter
      1. 2.7.1 Generate Excitation for Resolver Hardware
      2. 2.7.2 Add Resolver Software
      3. 2.7.3 Read Resolver Software Outputs
    8. 2.8 Close Speed Loop With Rotor Speed
      1. 2.8.1 Add Speed Loop Controllers
      2. 2.8.2 Add Speed Loop Demo Program
      3. 2.8.3 Read Motor Speed from Graph Window
  4. 3A Brief Guide to Code Migration
    1. 3.1 SoC Architecture Overview
    2. 3.2 SDK Resources Overview
    3. 3.3 Code Migration From AM24
    4. 3.4 Code Migration From C28
  5. 4Summary
  6. 5References

Generate PWM for Time Reference

The PWM module of AM263x inherited features from TI classic C28 controllers. With a unique XBAR architecture of AM263x, its ADC SOC triggers are able to trigger not only ADC events but also various of other events like DMA. This part will give some details on how to synchronize PWM modules and how to configure PWM modules to trigger ADC and DMA. More details can be found in Technical Reference Manual.

Figure 2-18 presents a summary of ePWM7, which is used to trigger DMA for resolver excitation signal updating at 200 kHz via DAC. There are couple tabs available for configuration. But, for the DMA trigger purpose, there are only three tabs to be updated.

  • EPWM Time Base
  • EPWM Action Qualifier
  • EPWM Event-Trigger
GUID-20220304-SS0I-D4PK-PV6H-WFSVLDGW3HHM-low.png Figure 2-18 A Summary of EPWM7 Configuration

Figure 2-19 shows details on Time Base. EPWM7 is configured as 200 kHz, Up-Count, and following Sync Out Pulse from ePWM0. It is worth attention that peripherals are operated at 200 MHz while R5F cores are running at 400 MHz.

GUID-20220304-SS0I-M0DW-VRS7-W5XRLDCTSWF2-low.png Figure 2-19 EPWM7 Time Base Configuration

Figure 2-20 shows details on Event Trigger. The key contents are listed below. ePWM7 is to generate two triggers, ADC SOCA and SOCB. The two triggers are from different source events The one related to CMPA is configured in the Counter Compare tab as shown in Figure 2-21.

GUID-20220304-SS0I-BCBR-46JP-6D2G4MVRCRK4-low.png Figure 2-20 EPWM7 Event Trigger Configuration
GUID-20220304-SS0I-MX4F-KV50-3QRWFRTTXGDP-low.png Figure 2-21 EPWM7 Counter Compare Configuration

EPWM0 is used as Phase A of traction inverter. All EPWM channels are synchronized to EPWM0. It is configured as 10 kHz, Up-Down Count, No Sync In, Sync Out and ADC SOC trigger at counter zero as shown by Figure 2-22 and Figure 2-23.

GUID-20220304-SS0I-SQV6-CMMZ-N90PMKWS26Z9-low.png Figure 2-22 EPWM0 Time Base Configuration
GUID-20220304-SS0I-SCKT-BZF8-HSSWZGF0B9DT-low.png Figure 2-23 EPWM0 Event Trigger Configuration

Dead-Band of EPWM0 is configured as Figure 2-24. Delay value of 200 indicates 1000 ns because of the 200 MHz peripherals clock.

GUID-20220304-SS0I-SHBP-5V6L-1CNVK3RJH2G1-low.png Figure 2-24 EPWM0 Dead-Band Configuration