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.

TMS320F28075: How to fine tune the ePWM duty in AQ module from T1 event ?

Part Number: TMS320F28075
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG

Hello All,

In our design, the EPWMCLK is 60MHz, and We have 100KHz EPWM frequence output.
I'll like to use the T1 event to reduce the ePWM duty in AQ module. The T1 event is from CMPSS → CTRIPH → X-bar → ePWM DC module → DCAEVT1.

I have disabled the sync mode.
I can reduce the ePWM duty, but I always got a 16ns step to reduce the duty.
For example, I have reduced the the PWM duty with a 100ns plus width , then I move the T1 signal 4ns ahead, and I still get a 100ns plus width. It can not be reduce to 96ns plus width.
If I move the compare signal 16ns ahead, I can get a PWM+ with 84ns. Is it possible to improve it ?

  • Hi Ryan,

    I believe this question was also asked on another thread: https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1295150/tms320f28075-cmpss---latched-filter-output-drives-ctrip\. I will go ahead and close the older thread and continue support here. Please take a look at the response there, though, and let me know if you have anything to follow up. Are you able to share the EPWM or HRPWM configurations?

    Best Regards,

    Allison

  • Dear Allison,

    Please check the configurations below.

    I add HRPWM5 and connect it to CMPIN4P. Then I can get a T1 event and the path is CMPSS → CTRIPH(ASYNC) → X-bar → ePWM DC module → DCAEVT1(not synced with TBCLK).
    I set CMPAHR to 0xF000 to get a PWM output with 100ns plus width. then I set CMPAHR to 0xD000 to move the T1 high 4ns ahead. But the PWM+ is still 100ns plus width.

    /**
     * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
     * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
     * @cliArgs --device "F2807x" --package "F2807x_176PTP" --part "F2807x_176PTP" --product "C2000WARE@4.01.00.00"
     * @versions {"tool":"1.18.0+3266"}
     */
    
    /**
     * Import the modules used in this configuration.
     */
    const cmpss       = scripting.addModule("/driverlib/cmpss.js", {}, false);
    const cmpss1      = cmpss.addInstance();
    const cputimer    = scripting.addModule("/driverlib/cputimer.js", {}, false);
    const cputimer1   = cputimer.addInstance();
    const epwm        = scripting.addModule("/driverlib/epwm.js");
    const epwm1       = epwm.addInstance();
    const epwm2       = epwm.addInstance();
    const epwm3       = epwm.addInstance();
    const epwm4       = epwm.addInstance();
    const epwmxbar    = scripting.addModule("/driverlib/epwmxbar.js", {}, false);
    const epwmxbar1   = epwmxbar.addInstance();
    const epwmxbar2   = epwmxbar.addInstance();
    const gpio        = scripting.addModule("/driverlib/gpio.js", {}, false);
    const gpio1       = gpio.addInstance();
    const gpio2       = gpio.addInstance();
    const gpio3       = gpio.addInstance();
    const gpio4       = gpio.addInstance();
    const gpio5       = gpio.addInstance();
    const gpio6       = gpio.addInstance();
    const gpio7       = gpio.addInstance();
    const gpio8       = gpio.addInstance();
    const gpio9       = gpio.addInstance();
    const gpio10      = gpio.addInstance();
    const gpio11      = gpio.addInstance();
    const gpio12      = gpio.addInstance();
    const gpio13      = gpio.addInstance();
    const gpio14      = gpio.addInstance();
    const gpio15      = gpio.addInstance();
    const gpio16      = gpio.addInstance();
    const gpio17      = gpio.addInstance();
    const gpio18      = gpio.addInstance();
    const gpio19      = gpio.addInstance();
    const gpio20      = gpio.addInstance();
    const gpio21      = gpio.addInstance();
    const gpio22      = gpio.addInstance();
    const gpio23      = gpio.addInstance();
    const gpio24      = gpio.addInstance();
    const gpio25      = gpio.addInstance();
    const gpio26      = gpio.addInstance();
    const gpio27      = gpio.addInstance();
    const gpio28      = gpio.addInstance();
    const gpio29      = gpio.addInstance();
    const gpio30      = gpio.addInstance();
    const gpio31      = gpio.addInstance();
    const gpio32      = gpio.addInstance();
    const gpio33      = gpio.addInstance();
    const gpio34      = gpio.addInstance();
    const gpio35      = gpio.addInstance();
    const gpio36      = gpio.addInstance();
    const gpio37      = gpio.addInstance();
    const gpio38      = gpio.addInstance();
    const gpio39      = gpio.addInstance();
    const gpio40      = gpio.addInstance();
    const gpio41      = gpio.addInstance();
    const gpio42      = gpio.addInstance();
    const gpio43      = gpio.addInstance();
    const gpio44      = gpio.addInstance();
    const outputxbar  = scripting.addModule("/driverlib/outputxbar.js", {}, false);
    const outputxbar1 = outputxbar.addInstance();
    const outputxbar2 = outputxbar.addInstance();
    const sync        = scripting.addModule("/driverlib/sync.js");
    
    /**
     * Write custom configuration values to the imported modules.
     */
    cmpss1.$name          = "DCHG_CS1_CMPSS4P";
    cmpss1.cmpssBase      = "CMPSS4_BASE";
    cmpss1.hysteresisVal  = "1";
    cmpss1.dacValLoad     = "CMPSS_DACVAL_PWMSYNC";
    cmpss1.enableModule   = true;
    cmpss1.dacValLow      = 124;
    cmpss1.dacValHigh     = 2019;
    cmpss1.latchResetHigh = true;
    
    cputimer1.$name                    = "myCPUTIMER0";
    cputimer1.enableInterrupt          = true;
    cputimer1.startTimer               = true;
    cputimer1.registerInterrupts       = true;
    cputimer1.timerPeriod              = 120000;
    cputimer1.timerInt.enableInterrupt = true;
    
    epwm1.epwmCounterCompare_cmpC                                       = 181;
    epwm1.epwmCounterCompare_cmpD                                       = 300;
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_shadowMode               = true;
    epwm1.epwmDigitalCompare_EPWM_DC_TYPE_DCBL                          = "EPWM_DC_TRIP_TRIPIN4";
    epwm1.epwmDeadband_outputSwapOutA                                   = true;
    epwm1.epwmDeadband_outputSwapOutB                                   = true;
    epwm1.epwmDeadband_controlShadowMode                                = true;
    epwm1.epwmEventTrigger_enableInterrupt                              = true;
    epwm1.epwmEventTrigger_EPWM_SOC_A_triggerSource                     = "EPWM_SOC_TBCTR_U_CMPC";
    epwm1.epwmTimebase_emulationMode                                    = "EPWM_EMULATION_FREE_RUN";
    epwm1.epwmTimebase_hsClockDiv                                       = "EPWM_HSCLOCK_DIVIDER_1";
    epwm1.epwmTimebase_counterMode                                      = "EPWM_COUNTER_MODE_UP";
    epwm1.epwmTimebase_syncOutPulseMode                                 = "EPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_shadowMode               = true;
    epwm1.epwmDeadband_polarityFED                                      = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm1.epwmDeadband_enableRED                                        = true;
    epwm1.epwmDeadband_enableFED                                        = true;
    epwm1.epwmDeadband_redShadowMode                                    = true;
    epwm1.epwmDeadband_fedShadowMode                                    = true;
    epwm1.$name                                                         = "myEPWM6";
    epwm1.useInterfacePins                                              = ["EPWM#A"];
    epwm1.copyUse                                                       = true;
    epwm1.copyFrom                                                      = "myEPWM7";
    epwm1.epwmEventTrigger_EPWM_SOC_A_triggerEnable                     = true;
    epwm1.epwmEventTrigger_EPWM_SOC_A_triggerEventPrescalar             = "1";
    epwm1.epwmEventTrigger_interruptSource                              = "EPWM_INT_TBCTR_U_CMPD";
    epwm1.epwmEventTrigger_interruptEventCount                          = "1";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_usedEvents               = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_usedEvents               = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO         = "EPWM_AQ_OUTPUT_HIGH";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA      = "EPWM_AQ_OUTPUT_LOW";
    epwm1.epwmDigitalCompare_EPWM_DC_TYPE_DCAH                          = "EPWM_DC_TRIP_TRIPIN9";
    epwm1.epwmDigitalCompare_EPWM_DC_TYPE_DCAL                          = "EPWM_DC_TRIP_TRIPIN4";
    epwm1.epwmDigitalCompare_EPWM_DC_TYPE_DCBH                          = "EPWM_DC_TRIP_TRIPIN9";
    epwm1.epwmCounterCompare_cmpB                                       = 599;
    epwm1.epwmDeadband_delayFED                                         = 600;
    epwm1.epwmDeadband_delayRED                                         = 18;
    epwm1.epwmTimebase_period                                           = 599;
    epwm1.hrpwm_edgeModeA                                               = "HRPWM_MEP_CTRL_RISING_EDGE";
    epwm1.hrpwm_edgeModeB                                               = "HRPWM_MEP_CTRL_FALLING_EDGE";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_gld                      = true;
    epwm1.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_1_eventSync = "EPWM_DC_EVENT_INPUT_NOT_SYNCED";
    epwm1.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_2_eventSync = "EPWM_DC_EVENT_INPUT_NOT_SYNCED";
    epwm1.hrpwm_enable                                                  = true;
    epwm1.epwmDigitalCompare_dcFilterInput                              = "EPWM_DC_WINDOW_SOURCE_DCAEVT2";
    epwm1.epwmDigitalCompare_EPWM_TZ_DC_OUTPUT_A1                       = "EPWM_TZ_EVENT_DCXH_HIGH";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_T1_COUNT_UP           = "EPWM_AQ_OUTPUT_LOW";
    epwm1.epwmDigitalCompare_EPWM_DC_MODULE_B_EPWM_DC_EVENT_1_eventSync = "EPWM_DC_EVENT_INPUT_NOT_SYNCED";
    epwm1.epwmDigitalCompare_EPWM_DC_MODULE_B_EPWM_DC_EVENT_2_eventSync = "EPWM_DC_EVENT_INPUT_NOT_SYNCED";
    epwm1.epwmCounterCompare_cmpA                                       = 30;
    epwm1.epwm.$assign                                                  = "EPWM6";
    epwm1.epwm.epwmaPin.$assign                                         = "GPIO10";
    epwm1.epwm.epwmbPin.$assign                                         = "GPIO11";
    
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_LOW";
    epwm2.epwmTimebase_emulationMode                                      = "EPWM_EMULATION_FREE_RUN";
    epwm2.epwmTimebase_hsClockDiv                                         = "EPWM_HSCLOCK_DIVIDER_1";
    epwm2.epwmTimebase_counterMode                                        = "EPWM_COUNTER_MODE_UP";
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_shadowMode                 = true;
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_shadowMode                 = true;
    epwm2.useInterfacePins                                                = ["EPWM#A"];
    epwm2.$name                                                           = "myEPWM7";
    epwm2.epwmCounterCompare_cmpC                                         = 181;
    epwm2.epwmDeadband_controlShadowMode                                  = true;
    epwm2.epwmCounterCompare_cmpD                                         = 300;
    epwm2.epwmDeadband_polarityFED                                        = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm2.epwmDeadband_enableRED                                          = true;
    epwm2.epwmDeadband_enableFED                                          = true;
    epwm2.epwmDigitalCompare_dcFilterInput                                = "EPWM_DC_WINDOW_SOURCE_DCAEVT2";
    epwm2.epwmDeadband_outputSwapOutB                                     = true;
    epwm2.epwmDeadband_outputSwapOutA                                     = true;
    epwm2.epwmTripZone_cbcSource                                          = ["EPWM_TZ_SIGNAL_DCAEVT2"];
    epwm2.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm2.epwmDigitalCompare_useBlankingWindow                            = true;
    epwm2.epwmDigitalCompare_blankingWindowEvent                          = "EPWM_DC_WINDOW_START_TBCTR_ZERO";
    epwm2.epwmDigitalCompare_blankingWindowOffset                         = 576;
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZA                           = "EPWM_TZ_ACTION_LOW";
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZB                           = "EPWM_TZ_ACTION_LOW";
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm2.epwmDigitalCompare_blankingWindowLength                         = 84;
    epwm2.epwmTimebase_syncOutPulseMode                                   = "EPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO";
    epwm2.epwmDeadband_fedShadowMode                                      = true;
    epwm2.epwmDeadband_redShadowMode                                      = true;
    epwm2.copyUse                                                         = true;
    epwm2.copyFrom                                                        = "myEPWM6";
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_LOW";
    epwm2.epwmDigitalCompare_EPWM_DC_TYPE_DCAL                            = "EPWM_DC_TRIP_TRIPIN5";
    epwm2.epwmDigitalCompare_EPWM_DC_TYPE_DCBL                            = "EPWM_DC_TRIP_TRIPIN5";
    epwm2.epwmDigitalCompare_EPWM_DC_MODULE_B_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm2.epwmDigitalCompare_EPWM_DC_TYPE_DCAH                            = "EPWM_DC_TRIP_TRIPIN10";
    epwm2.epwmDigitalCompare_EPWM_DC_TYPE_DCBH                            = "EPWM_DC_TRIP_TRIPIN10";
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_HIGH";
    epwm2.epwmCounterCompare_cmpB                                         = 599;
    epwm2.epwmDeadband_delayFED                                           = 600;
    epwm2.epwmDeadband_delayRED                                           = 18;
    epwm2.epwmTimebase_period                                             = 599;
    epwm2.hrpwm_edgeModeA                                                 = "HRPWM_MEP_CTRL_RISING_EDGE";
    epwm2.hrpwm_edgeModeB                                                 = "HRPWM_MEP_CTRL_FALLING_EDGE";
    epwm2.epwmCounterCompare_cmpALink                                     = "EPWM_LINK_WITH_EPWM_6";
    epwm2.epwmCounterCompare_cmpBLink                                     = "EPWM_LINK_WITH_EPWM_6";
    epwm2.epwmTimebase_phaseEnable                                        = true;
    epwm2.epwmTimebase_phaseShift                                         = 100;
    epwm2.epwm.$assign                                                    = "EPWM7";
    epwm2.epwm.epwmaPin.$assign                                           = "GPIO12";
    epwm2.epwm.epwmbPin.$assign                                           = "GPIO13";
    
    epwm3.$name                                                           = "myEPWM1";
    epwm3.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZA                           = "EPWM_TZ_ACTION_LOW";
    epwm3.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZB                           = "EPWM_TZ_ACTION_LOW";
    epwm3.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm3.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm3.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm3.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm3.epwmTimebase_counterMode                                        = "EPWM_COUNTER_MODE_UP";
    epwm3.epwmTimebase_syncOutPulseMode                                   = "EPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO";
    epwm3.epwmTimebase_hsClockDiv                                         = "EPWM_HSCLOCK_DIVIDER_1";
    epwm3.epwmTimebase_emulationMode                                      = "EPWM_EMULATION_FREE_RUN";
    epwm3.epwmCounterCompare_cmpC                                         = 181;
    epwm3.epwmCounterCompare_cmpD                                         = 300;
    epwm3.copyUse                                                         = true;
    epwm3.copyFrom                                                        = "myEPWM6";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_A_shadowMode                 = true;
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_A_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_B_shadowMode                 = true;
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_B_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm3.epwmTripZone_cbcSource                                          = ["EPWM_TZ_SIGNAL_DCAEVT2"];
    epwm3.epwmDigitalCompare_EPWM_DC_TYPE_DCAH                            = "EPWM_DC_TRIP_TRIPIN9";
    epwm3.epwmDigitalCompare_EPWM_DC_TYPE_DCAL                            = "EPWM_DC_TRIP_TRIPIN4";
    epwm3.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm3.epwmDigitalCompare_EPWM_DC_TYPE_DCBH                            = "EPWM_DC_TRIP_TRIPIN9";
    epwm3.epwmDigitalCompare_EPWM_DC_TYPE_DCBL                            = "EPWM_DC_TRIP_TRIPIN4";
    epwm3.epwmDigitalCompare_EPWM_DC_MODULE_B_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm3.epwmDigitalCompare_dcFilterInput                                = "EPWM_DC_WINDOW_SOURCE_DCAEVT2";
    epwm3.epwmDigitalCompare_useBlankingWindow                            = true;
    epwm3.epwmDigitalCompare_blankingWindowEvent                          = "EPWM_DC_WINDOW_START_TBCTR_ZERO";
    epwm3.epwmDigitalCompare_blankingWindowLength                         = 84;
    epwm3.epwmDeadband_polarityFED                                        = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm3.epwmDeadband_enableRED                                          = true;
    epwm3.epwmDeadband_delayRED                                           = 18;
    epwm3.epwmDeadband_enableFED                                          = true;
    epwm3.epwmDeadband_outputSwapOutA                                     = true;
    epwm3.epwmDeadband_controlShadowMode                                  = true;
    epwm3.epwmDeadband_redShadowMode                                      = true;
    epwm3.epwmDeadband_fedShadowMode                                      = true;
    epwm3.hrpwm_enable                                                    = true;
    epwm3.hrpwm_enableCalculator                                          = true;
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_HIGH";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_LOW";
    epwm3.epwmTimebase_period                                             = 599;
    epwm3.useInterfacePins                                                = ["EPWM#A","EPWM#B"];
    epwm3.epwmCounterCompare_cmpA                                         = 300;
    epwm3.hrpwm_DBredHR                                                   = 12;
    epwm3.hrpwm_DBfedHR                                                   = 12;
    epwm3.hrpwm_edgeModeA                                                 = "HRPWM_MEP_CTRL_RISING_EDGE";
    epwm3.hrpwm_edgeModeB                                                 = "HRPWM_MEP_CTRL_FALLING_EDGE";
    epwm3.hrpwm_epwmclk                                                   = 60;
    epwm3.epwmDeadband_deadbandCounterClockRate                           = "EPWM_DB_COUNTER_CLOCK_HALF_CYCLE";
    epwm3.epwmCounterCompare_cmpB                                         = 599;
    epwm3.epwmDeadband_delayFED                                           = 30;
    epwm3.epwmDeadband_outputSwapOutB                                     = true;
    epwm3.epwmDigitalCompare_blankingWindowOffset                         = 57;
    epwm3.epwm.epwmaPin.$assign                                           = "GPIO0";
    epwm3.epwm.epwmbPin.$assign                                           = "GPIO1";
    
    epwm4.$name                                                           = "myEPWM5";
    epwm4.copyUse                                                         = true;
    epwm4.copyFrom                                                        = "myEPWM7";
    epwm4.epwmTimebase_emulationMode                                      = "EPWM_EMULATION_FREE_RUN";
    epwm4.epwmTimebase_hsClockDiv                                         = "EPWM_HSCLOCK_DIVIDER_1";
    epwm4.epwmTimebase_counterMode                                        = "EPWM_COUNTER_MODE_UP";
    epwm4.epwmCounterCompare_cmpB                                         = 599;
    epwm4.epwmCounterCompare_cmpC                                         = 181;
    epwm4.epwmCounterCompare_cmpD                                         = 300;
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_HIGH";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_LOW";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_LOW";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_B_shadowMode                 = true;
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_B_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_LOW";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPB        = "EPWM_AQ_OUTPUT_LOW";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_HIGH";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm4.epwmTripZone_cbcSource                                          = ["EPWM_TZ_SIGNAL_DCAEVT2"];
    epwm4.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm4.epwmDigitalCompare_EPWM_DC_MODULE_B_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm4.epwmDigitalCompare_dcFilterInput                                = "EPWM_DC_WINDOW_SOURCE_DCAEVT2";
    epwm4.epwmDeadband_polarityFED                                        = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm4.epwmDeadband_enableFED                                          = true;
    epwm4.epwmDeadband_delayFED                                           = 600;
    epwm4.epwmDeadband_outputSwapOutA                                     = true;
    epwm4.epwmDeadband_outputSwapOutB                                     = true;
    epwm4.epwmDeadband_redShadowMode                                      = true;
    epwm4.epwmDeadband_fedShadowMode                                      = true;
    epwm4.useInterfacePins                                                = ["EPWM#A"];
    epwm4.epwmDigitalCompare_EPWM_DC_TYPE_DCAH                            = "EPWM_DC_TRIP_TRIPIN12";
    epwm4.epwmDigitalCompare_EPWM_DC_TYPE_DCAL                            = "EPWM_DC_TRIP_TRIPIN8";
    epwm4.epwmDigitalCompare_EPWM_DC_TYPE_DCBH                            = "EPWM_DC_TRIP_TRIPIN12";
    epwm4.epwmDigitalCompare_EPWM_DC_TYPE_DCBL                            = "EPWM_DC_TRIP_TRIPIN8";
    epwm4.epwmTimebase_phaseEnable                                        = true;
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_shadowMode                 = true;
    epwm4.epwmDeadband_enableRED                                          = true;
    epwm4.epwmDeadband_delayRED                                           = 18;
    epwm4.epwmDeadband_controlShadowMode                                  = true;
    epwm4.epwmTimebase_period                                             = 599;
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZA                           = "EPWM_TZ_ACTION_LOW";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZB                           = "EPWM_TZ_ACTION_LOW";
    epwm4.epwmDigitalCompare_EPWM_TZ_DC_OUTPUT_A1                         = "EPWM_TZ_EVENT_DCXH_HIGH";
    epwm4.hrpwm_enable                                                    = true;
    epwm4.hrpwm_edgeModeA                                                 = "HRPWM_MEP_CTRL_RISING_AND_FALLING_EDGE";
    epwm4.hrpwm_edgeModeB                                                 = "HRPWM_MEP_CTRL_RISING_AND_FALLING_EDGE";
    epwm4.epwmTimebase_phaseShift                                         = 545;
    epwm4.epwmCounterCompare_cmpA                                         = 500;
    
    epwmxbar1.muxesUsed = ["XBAR_MUX07"];
    epwmxbar1.$name     = "DCHG_CS1_CMPSS4L_TRIP4";
    
    epwmxbar2.tripInput = "XBAR_TRIP9";
    epwmxbar2.muxesUsed = ["XBAR_MUX06"];
    epwmxbar2.$name     = "DCHG_CS1_CMPSS4H_TRIP9";
    
    gpio1.direction       = "GPIO_DIR_MODE_OUT";
    gpio1.$name           = "tFLASH_SPI_EN";
    gpio1.gpioPin.$assign = "GPIO99";
    
    gpio2.direction       = "GPIO_DIR_MODE_OUT";
    gpio2.$name           = "CFET_HOP";
    gpio2.gpioPin.$assign = "GPIO26";
    
    gpio3.direction       = "GPIO_DIR_MODE_OUT";
    gpio3.$name           = "DFET_HOP";
    gpio3.gpioPin.$assign = "GPIO27";
    
    gpio4.$name           = "MCU_SELF_TEST";
    gpio4.gpioPin.$assign = "GPIO30";
    
    gpio5.$name           = "FAN_PWR_LATCH";
    gpio5.gpioPin.$assign = "GPIO29";
    
    gpio6.$name           = "tAFE_ALARM1";
    gpio6.gpioPin.$assign = "GPIO31";
    
    gpio7.$name           = "tVPC_Check";
    gpio7.gpioPin.$assign = "GPIO32";
    
    gpio8.direction       = "GPIO_DIR_MODE_OUT";
    gpio8.$name           = "EE_WP";
    gpio8.gpioPin.$assign = "GPIO33";
    
    gpio9.$name           = "t2nd_DET";
    gpio9.gpioPin.$assign = "GPIO37";
    
    gpio10.$name           = "tCFuse_DET";
    gpio10.gpioPin.$assign = "GPIO38";
    
    gpio11.direction       = "GPIO_DIR_MODE_OUT";
    gpio11.$name           = "tFuse_Check_BATT";
    gpio11.gpioPin.$assign = "GPIO39";
    
    gpio12.$name           = "AFE_SHDN";
    gpio12.direction       = "GPIO_DIR_MODE_OUT";
    gpio12.gpioPin.$assign = "GPIO41";
    
    gpio13.$name           = "VPC_SW";
    gpio13.direction       = "GPIO_DIR_MODE_OUT";
    gpio13.gpioPin.$assign = "GPIO49";
    
    gpio14.$name           = "tPOR_LED";
    gpio14.direction       = "GPIO_DIR_MODE_OUT";
    gpio14.gpioPin.$assign = "GPIO50";
    
    gpio15.$name           = "TH_SW";
    gpio15.direction       = "GPIO_DIR_MODE_OUT";
    gpio15.gpioPin.$assign = "GPIO51";
    
    gpio16.$name           = "PF_FUSE";
    gpio16.direction       = "GPIO_DIR_MODE_OUT";
    gpio16.gpioPin.$assign = "GPIO53";
    
    gpio17.$name           = "FUSE_DET_BUS";
    gpio17.gpioPin.$assign = "GPIO54";
    
    gpio18.$name           = "Protect_HIP";
    gpio18.gpioPin.$assign = "GPIO55";
    
    gpio19.$name           = "BMS_OVP_HIP";
    gpio19.gpioPin.$assign = "GPIO56";
    
    gpio20.$name           = "BMS_UVP_HIP";
    gpio20.gpioPin.$assign = "GPIO57";
    
    gpio21.$name           = "BMS_OCP_HIP";
    gpio21.gpioPin.$assign = "GPIO58";
    
    gpio22.$name           = "BMS_SCP_HIP";
    gpio22.gpioPin.$assign = "GPIO59";
    
    gpio23.$name           = "BUS_OVP_HIP";
    gpio23.gpioPin.$assign = "GPIO60";
    
    gpio24.$name           = "BUS_UVP_HIP";
    gpio24.gpioPin.$assign = "GPIO61";
    
    gpio25.$name           = "BUS_OCP_HIP";
    gpio25.gpioPin.$assign = "GPIO64";
    
    gpio26.$name           = "BUS_SCP_HIP";
    gpio26.gpioPin.$assign = "GPIO65";
    
    gpio27.direction       = "GPIO_DIR_MODE_OUT";
    gpio27.$name           = "UNLOCK_UVP_HOP";
    gpio27.gpioPin.$assign = "GPIO66";
    
    gpio28.$name           = "UNLOCK_SYS_HOP";
    gpio28.direction       = "GPIO_DIR_MODE_OUT";
    gpio28.gpioPin.$assign = "GPIO44";
    
    gpio29.$name             = "PWM_EN_LOP";
    gpio29.direction         = "GPIO_DIR_MODE_OUT";
    gpio29.writeInitialValue = true;
    gpio29.initialValue      = 1;
    gpio29.gpioPin.$assign   = "GPIO45";
    
    gpio30.direction       = "GPIO_DIR_MODE_OUT";
    gpio30.$name           = "SYS_DCDC_EN";
    gpio30.gpioPin.$assign = "GPIO133";
    
    gpio31.$name           = "tRTC_INT";
    gpio31.gpioPin.$assign = "GPIO46";
    
    gpio32.$name           = "MCU_Boot_1_Reserved";
    gpio32.gpioPin.$assign = "GPIO72";
    
    gpio33.$name           = "tShortpin_DET";
    gpio33.gpioPin.$assign = "GPIO80";
    
    gpio34.$name           = "MCU_Boot_0_Reserved";
    gpio34.gpioPin.$assign = "GPIO84";
    
    gpio35.direction       = "GPIO_DIR_MODE_OUT";
    gpio35.$name           = "BKPWM_EN_HOP";
    gpio35.masterCore      = "GPIO_CORE_CPU1_CLA1";
    gpio35.gpioPin.$assign = "GPIO85";
    
    gpio36.direction         = "GPIO_DIR_MODE_OUT";
    gpio36.writeInitialValue = true;
    gpio36.masterCore        = "GPIO_CORE_CPU1_CLA1";
    gpio36.$name             = "C2000_Update_Ready";
    gpio36.gpioPin.$assign   = "GPIO88";
    
    gpio37.direction       = "GPIO_DIR_MODE_OUT";
    gpio37.$name           = "C2000_PRE";
    gpio37.gpioPin.$assign = "GPIO89";
    
    gpio38.direction       = "GPIO_DIR_MODE_OUT";
    gpio38.$name           = "C2000_SW";
    gpio38.gpioPin.$assign = "GPIO90";
    
    gpio39.$name             = "PRE_CHG_HOP";
    gpio39.direction         = "GPIO_DIR_MODE_OUT";
    gpio39.writeInitialValue = true;
    gpio39.gpioPin.$assign   = "GPIO21";
    
    gpio40.$name           = "AUX_LATCH_HOP";
    gpio40.direction       = "GPIO_DIR_MODE_OUT";
    gpio40.gpioPin.$assign = "GPIO28";
    
    gpio41.$name           = "IDLE_or_RUN";
    gpio41.gpioPin.$assign = "GPIO7";
    
    gpio42.$name           = "Buck_or_Boost";
    gpio42.gpioPin.$assign = "GPIO92";
    
    gpio43.direction       = "GPIO_DIR_MODE_OUT";
    gpio43.$name           = "debug_pin";
    gpio43.gpioPin.$assign = "GPIO93";
    
    gpio44.$name           = "debug_pin_164";
    gpio44.direction       = "GPIO_DIR_MODE_OUT";
    gpio44.masterCore      = "GPIO_CORE_CPU1_CLA1";
    gpio44.gpioPin.$assign = "GPIO4";
    
    outputxbar1.$name                            = "myOUTPUTXBAR0";
    outputxbar1.muxesUsed                        = ["XBAR_MUX06"];
    outputxbar1.outputxbar.$assign               = "OUTPUTXBAR1";
    outputxbar1.outputxbar.outputxbarPin.$assign = "GPIO24";
    
    outputxbar2.$name                            = "myOUTPUTXBAR1";
    outputxbar2.muxesUsed                        = ["XBAR_MUX07"];
    outputxbar2.outputxbar.$assign               = "OUTPUTXBAR2";
    outputxbar2.outputxbar.outputxbarPin.$assign = "GPIO25";
    
    sync.syncOutLock       = true;
    sync.epwm7SyncInSource = "SYSCTL_SYNC_IN_SRC_EPWM4SYNCOUT";
    
    /**
     * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
     * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
     * re-solve from scratch.
     */
    epwm3.epwm.$suggestSolution          = "EPWM1";
    epwm4.epwm.$suggestSolution          = "EPWM2";
    epwm4.epwm.epwmaPin.$suggestSolution = "GPIO2";
    epwm4.epwm.epwmbPin.$suggestSolution = "GPIO3";
    

  • Hi Ryan,

    Thank you kindly for sharing your configurations. A few clarification questions for you: Could you please clarify which EPWM in particular you are referring to in your scope shots and having the issue with? (epwm1, epwm2, epwm3, or epwm4?). And is the "T1" being mapped to TRIPIN9? Also, where have you tried setting the signals as asynchronous vs synchronous? There are several different locations along the signal path that you can synchronize/not synchronize the signal (it looks like only epwm1 DC events 1 and 2 were designated as not synced). 

    One note to keep in mind is that the DCAEVTx.force signal will not latch for 3TBLCK cycles as noted in the device TRM section 14.11.4.1 Digital Compare Events (with a 60MHz EPWMCLK, each TBCLK cycle should be 16ns long). 

    Also, I am perhaps misunderstanding how CMPAHR is playing a role in this - I thought the trip input signal was occurring 4ns earlier to try to have the EPWM signal go low earlier, thus making the duty of that cycle 4ns shorter. Instead, are you trying to change the CMPA value and use CMPAHR to shorten the duty cycle of the entire PWM and not just one cycle? Or could you perhaps explain a bit more what the application is? Sorry for all the questions - just want to make sure I'm understanding the situation fully.

    Best Regards,

    Allison

  • Dear Allison,

    1. PWM is PWM6.

    2. T1 event is from HRPWM5 A → CMPIN4P → CTRIPH(ASYNC) → X-bar → TRIPIN9 → ePWM DC module → DCAEVT1. 

    3. The setting the signals as asynchronous are COMPCTL[CTRIPHSEL]=0, DCACTL[EVT1FRCSYNCSEL] =1 , DCACTL[EVT2FRCSYNCSEL] = 1,DCBCTL[EVT1FRCSYNCSEL]=1, DCBCTL[EVT2FRCSYNCSEL] = 1.

    4. DCAEVTx.force signal is more than 3TBLCK cycles. Please check the Counter Compare A (CMPA) of PWM5 is 500. 

    In our design, The input signal to CMPIN4P is a over current signal, If it's too high, we need to reduce the PWM duty. In my configurations, The HRPWM5 is used for simulation of the over current signal. and I can adjust the CMPAHR register of PWM5 to move 4ns ahead.

    I know I can set the CMPAHR register of PWM6 to change the PWM duty.  But we'll like to trigger the PWM duty reduction by HW.  So if T1 turn to high we want to reduce the PWM duty from AQ module.  

    I am sure the T1 is a asynchronous signal. So I want to know if we can have more resolutions to reduce the PWM duty not 16.67ns per step.

     

     

  • Hi Ryan,

    Thank you much for the explanation- it is very helpful in understanding your setup. 

    So right now you are using DCAEVT1 as a T1 source to trigger an Action Qualifier. I might instead suggest the following: In the Digital Compare submodule, you could use DCxH high as the condition for Digital Compare output 2A (instead of 1A as you have now). Then, in the Trip Zone submodule you can use DCEVT2 as the source for a cycle-by-cycle (CBC) trip and set the TZA event to be a 'low voltage' state. This would be a shorter signal path than the Action Qualifier you have currently. Would this work for your application?

    Best regards,

    Allison

  • Dear Allison,

    Thanks for your reply.

    Yes, it's working, but we will have a new problem in TZ model. Let me explain it in more detail.

    In the current design, TZA and TZA are both set to 0x10. (10: Force EPWMxA/B to a low state).

    If an urgent event occurs, a One-Shot (OSHT) Trip Event will be triggered and the output of PWM6 A/B can be turned off immediately.

    In this case, if we follow your solution to setup it. we will get a waveform like this. There is no output from PWM6A. This does not meet our design. That's why I want to know if we can fine-tune the PWM duty from the AQ module. or you can share other solution to fix the new problem ?

  • Hi Ryan, 

    Are you trying to only shorten the duty of the EPWM for a single cycle and then have the original EPWM signal/duty return after? Or trying to update the duty cycle to be shorter permanently in response to T1? I see you mentioned using the one-shot trip, did try to use cycle-by-cycle as well?

    Best Regards,

    Allison

  • Dear Allison,

    I'll like to update the duty cycle to be shorter in response to T1 CBC.

    As your suggestion , DCEVT2 as the source for a cycle-by-cycle (CBC) trip and set the TZA event to be a 'low voltage' state. It's workiong to shorten the duty of the EPWM6B.  

    But we still have some problems.

    Problem 1, if I set TZB to 0x10. TZA to 0x11.  It's only working for PWM6B.  

    Problem 2, if I set TZB to 0x10. TZA to 0x01. We can shorten the duty immediately but the deadband is lost.  

    Problem 3, We have other event to trigger one-shot trip to turn off PWMA/B permanently, so the we need to set TZA and TZB  to 0x10. 

     

    Please check 2 snapshots below. 1st is the normal PWM signal.  2nd is the snapshot for problem 2.

     

      

    Best Regards,

    Ryan Hung

     

  • Hi Ryan,

    Problem 1, if I set TZB to 0x10. TZA to 0x11.  It's only working for PWM6B.  

    In this case, your TZA is set to 0x11 which means "do nothing" when T1 occurs. TZA controls the actions on EPWMxA, so that is why no action occurs on A if it is set as such (EPWM6B still goes low because your TZB is set to 0x10 which means "go low" when T1 occurs).

    Problem 2, if I set TZB to 0x10. TZA to 0x01. We can shorten the duty immediately but the deadband is lost

    The issue here is that the deadband submodule comes before the trip zone submodule within the EPWM module. So in the signal path, deadband is applied first, but any actions in the trip zone will override the deadband that was applied. So you are losing part of the EPWM6A deadband because it is cut off by the actions of the trip zone. 

    We have other event to trigger one-shot trip to turn off PWMA/B permanently, so the we need to set TZA and TZB  to 0x10.

    What is the other circumstance that requires a one-shot trip using TZA? Is there another method besides the trip zone that you are able to use to turn off the EPWMA/B permanently so that we do not need TZA set to 0x10? Perhaps this could be an action qualifier software force or even using GPIO mux to disable the EPWM.

    One avenue to look into would be the valley switching function located in the digital compare submodule (see device TRM section 14.11.4.3 Valley Switching for descriptions) which can delay EPWM switching. There is also a C2000Ware software example on this called epwm_ex6_valley_switching. You wouldn't be able to use TZA here still since valley switching is in the digital compare submodule, which still comes before the trip zone, but this could be worth you looking into for your application.

    Another possible alternative would be to leave TZA as 0x11 ("do nothing" on T1), but have T1 issue an update to the CMPA value for EPWM6A to then shorten the duty cycle. This way, EPWM6A deadband is still implemented and not cut off by the trip zone, but the duty cycle would be shortened after. But this would only make sense for certain circumstances (i.e. in your future application, will you know when your T1 occurs and/or is there a precise duty cycle you wish to implement after T1? Or is this completely time-dependent on a random occurrence of T1? There may also be some delay in implementation here we would have to check). 

    I'll let you know if I think of other ways to work around the problem 2, but let me know if any of these are possibilities for you. 

    Best Regards,

    Allison

  • Dear Allison,

    Another event is overcurrent protection. When the system is overloaded (CMPINxP > DACLVALA, and CTRIPL is high), the PWM6A/B can be turned off immediately by the TZ module. In this case, TZA and TZB should be set to 0x10.

    There are also other protections, such as overvoltage and overtemperature, triggered by software. In this case, we can set TZA and TZB to 0x10 before a One-Shot (OSHT) Trip Event to turn off the PWM6A/B.

    This is why the question arises: how to fine-tune the ePWM duty in the AQ module from the T1 event. If this is possible, we can incorporate the dead band and OSHT TZ functions as well.

    Best Regards,

    Ryan Hung

  • Hi Ryan,

    TZA and TZB should be set to 0x10

    Ok I understand, so we cannot use the Trip Zone for the duty cycle shortening if TZA and TZB must be set to go low for other trip actions. If we go back to using the AQ module as you did before, have you tried increasing your EPWMCLK frequency to decrease the clock period and see if that alters the resolution of your duty cycle adjustment with T1? e.g. if you used 100MHz EPWM freq instead of 60MHz. 

    Also, are you implementing HRPWM capability for the EPWM? I see that you have enabled HR and MEP control of a single edge for EPWM6A/B, but don't see any implementation of other HR settings for EPWM6 and want to confirm this. 

    I know you are just simulating a fault event T1 by using HRPWM5 - are you expecting the non-simulated T1 to occur at a regular frequency in your application? If you are trying to adjust the duty cycle after T1, could you update a CMPA action qualifier in response to T1 to shorten the duty? Or is that not what you are targeting at all, and you want a time-dependent response of EPWM6A/B caused by T1?

    I will try to test out a few cases on my end tomorrow as well and let you know of any findings. 

    Best Regards,

    Allison

  • Hi Ryan, 

    Still setting up my test, so please allow until end of tomorrow for another update from me.

    Best Regards,

    Allison

  • Hi Ryan, 

    Are the SysConfig settings that you attached earlier the only code needed to generate your PWMs for me to see the AQ issue? Or would you perhaps be able to attach your project for me to look at as well? I'm trying to recreate your setup as closely as possible. 

    Best Regards,

    Allison

  • Dear Allison,

    Yes,  the SysConfig settings that I shared 2 weeks age is for you to see the AQ issue. It's the same way I checked here. 

    Please check the SysConfig for project below.

    /**
     * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
     * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
     * @cliArgs --device "F2807x" --package "F2807x_176PTP" --part "F2807x_176PTP" --product "C2000WARE@4.01.00.00"
     * @versions {"tool":"1.17.0+3128"}
     */
    
    /**
     * Import the modules used in this configuration.
     */
    const adc       = scripting.addModule("/driverlib/adc.js", {}, false);
    const adc1      = adc.addInstance();
    const adc2      = adc.addInstance();
    const adc3      = adc.addInstance();
    const can       = scripting.addModule("/driverlib/can.js", {}, false);
    const can1      = can.addInstance();
    const cmpss     = scripting.addModule("/driverlib/cmpss.js", {}, false);
    const cmpss1    = cmpss.addInstance();
    const cmpss2    = cmpss.addInstance();
    const cmpss3    = cmpss.addInstance();
    const cmpss4    = cmpss.addInstance();
    const cputimer  = scripting.addModule("/driverlib/cputimer.js", {}, false);
    const cputimer1 = cputimer.addInstance();
    const cputimer2 = cputimer.addInstance();
    const epwm      = scripting.addModule("/driverlib/epwm.js");
    const epwm1     = epwm.addInstance();
    const epwm2     = epwm.addInstance();
    const epwm3     = epwm.addInstance();
    const epwm4     = epwm.addInstance();
    const epwm5     = epwm.addInstance();
    const epwm6     = epwm.addInstance();
    const epwm7     = epwm.addInstance();
    const epwmxbar  = scripting.addModule("/driverlib/epwmxbar.js", {}, false);
    const epwmxbar1 = epwmxbar.addInstance();
    const epwmxbar2 = epwmxbar.addInstance();
    const epwmxbar3 = epwmxbar.addInstance();
    const epwmxbar4 = epwmxbar.addInstance();
    const epwmxbar5 = epwmxbar.addInstance();
    const epwmxbar6 = epwmxbar.addInstance();
    const epwmxbar7 = epwmxbar.addInstance();
    const epwmxbar8 = epwmxbar.addInstance();
    const gpio      = scripting.addModule("/driverlib/gpio.js", {}, false);
    const gpio1     = gpio.addInstance();
    const gpio2     = gpio.addInstance();
    const gpio3     = gpio.addInstance();
    const gpio4     = gpio.addInstance();
    const gpio5     = gpio.addInstance();
    const gpio6     = gpio.addInstance();
    const gpio7     = gpio.addInstance();
    const gpio8     = gpio.addInstance();
    const gpio9     = gpio.addInstance();
    const gpio10    = gpio.addInstance();
    const gpio11    = gpio.addInstance();
    const gpio12    = gpio.addInstance();
    const gpio13    = gpio.addInstance();
    const gpio14    = gpio.addInstance();
    const gpio15    = gpio.addInstance();
    const gpio16    = gpio.addInstance();
    const gpio17    = gpio.addInstance();
    const gpio18    = gpio.addInstance();
    const gpio19    = gpio.addInstance();
    const gpio20    = gpio.addInstance();
    const gpio21    = gpio.addInstance();
    const gpio22    = gpio.addInstance();
    const gpio23    = gpio.addInstance();
    const gpio24    = gpio.addInstance();
    const gpio25    = gpio.addInstance();
    const gpio26    = gpio.addInstance();
    const gpio27    = gpio.addInstance();
    const gpio28    = gpio.addInstance();
    const gpio29    = gpio.addInstance();
    const gpio30    = gpio.addInstance();
    const gpio31    = gpio.addInstance();
    const gpio32    = gpio.addInstance();
    const gpio33    = gpio.addInstance();
    const gpio34    = gpio.addInstance();
    const gpio35    = gpio.addInstance();
    const gpio36    = gpio.addInstance();
    const gpio37    = gpio.addInstance();
    const gpio38    = gpio.addInstance();
    const gpio39    = gpio.addInstance();
    const gpio40    = gpio.addInstance();
    const gpio41    = gpio.addInstance();
    const gpio42    = gpio.addInstance();
    const i2c       = scripting.addModule("/driverlib/i2c.js", {}, false);
    const i2c1      = i2c.addInstance();
    const i2c2      = i2c.addInstance();
    const sci       = scripting.addModule("/driverlib/sci.js", {}, false);
    const sci1      = sci.addInstance();
    const spi       = scripting.addModule("/driverlib/spi.js", {}, false);
    const spi1      = spi.addInstance();
    const sync      = scripting.addModule("/driverlib/sync.js");
    
    /**
     * Write custom configuration values to the imported modules.
     */
    adc1.$name               = "myADC0";
    adc1.soc5Channel         = "ADC_CH_ADCIN3";
    adc1.interruptPulseMode  = "ADC_PULSE_END_OF_CONV";
    adc1.registerInterrupts  = ["1"];
    adc1.useInterrupts       = false;
    adc1.adcClockPrescaler   = "ADC_CLK_DIV_2_0";
    adc1.soc0SampleWindow    = 36;
    adc1.soc1SampleWindow    = 36;
    adc1.soc2SampleWindow    = 36;
    adc1.soc3Channel         = "ADC_CH_ADCIN5";
    adc1.soc3SampleWindow    = 36;
    adc1.soc4Channel         = "ADC_CH_ADCIN2";
    adc1.soc4SampleWindow    = 36;
    adc1.soc5SampleWindow    = 36;
    adc1.soc6Channel         = "ADC_CH_ADCIN4";
    adc1.soc6SampleWindow    = 36;
    adc1.soc7SampleWindow    = 36;
    adc1.soc8SampleWindow    = 36;
    adc1.soc9SampleWindow    = 36;
    adc1.socHighPriorityMode = "ADC_PRI_THRU_SOC7_HIPRI";
    adc1.enabledSOCs         = ["ADC_SOC_NUMBER0","ADC_SOC_NUMBER1","ADC_SOC_NUMBER10","ADC_SOC_NUMBER11","ADC_SOC_NUMBER2","ADC_SOC_NUMBER3","ADC_SOC_NUMBER4","ADC_SOC_NUMBER5","ADC_SOC_NUMBER6","ADC_SOC_NUMBER7","ADC_SOC_NUMBER8","ADC_SOC_NUMBER9"];
    adc1.soc0Channel         = "ADC_CH_ADCIN4";
    adc1.soc0Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc1.soc1Channel         = "ADC_CH_ADCIN1";
    adc1.soc1Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc1.soc2Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc1.soc3Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc1.soc4Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc1.soc5Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc1.soc6Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc1.soc7Channel         = "ADC_CH_ADCIN1";
    adc1.soc7Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc1.soc8Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc1.soc9Channel         = "ADC_CH_ADCIN5";
    adc1.soc9Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc1.soc10Channel        = "ADC_CH_ADCIN2";
    adc1.soc10Trigger        = "ADC_TRIGGER_EPWM8_SOCA";
    adc1.soc10SampleWindow   = 36;
    adc1.soc11Channel        = "ADC_CH_ADCIN3";
    adc1.soc11Trigger        = "ADC_TRIGGER_EPWM8_SOCA";
    adc1.soc11SampleWindow   = 36;
    
    adc2.$name               = "myADC1";
    adc2.adcBase             = "ADCB_BASE";
    adc2.adcClockPrescaler   = "ADC_CLK_DIV_2_0";
    adc2.soc0SampleWindow    = 36;
    adc2.soc1SampleWindow    = 36;
    adc2.soc2SampleWindow    = 36;
    adc2.soc3SampleWindow    = 36;
    adc2.soc4Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc2.soc4SampleWindow    = 36;
    adc2.soc5SampleWindow    = 36;
    adc2.soc6Channel         = "ADC_CH_ADCIN3";
    adc2.soc5Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc2.soc6SampleWindow    = 36;
    adc2.socHighPriorityMode = "ADC_PRI_THRU_SOC3_HIPRI";
    adc2.useInterrupts       = false;
    adc2.soc0Channel         = "ADC_CH_ADCIN3";
    adc2.soc1Channel         = "ADC_CH_ADCIN1";
    adc2.soc0Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc2.soc1Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc2.soc2Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc2.soc3Channel         = "ADC_CH_ADCIN2";
    adc2.soc3Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc2.soc4Channel         = "ADC_CH_ADCIN14";
    adc2.soc5Channel         = "ADC_CH_ADCIN15";
    adc2.soc6Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc2.enabledSOCs         = ["ADC_SOC_NUMBER0","ADC_SOC_NUMBER1","ADC_SOC_NUMBER10","ADC_SOC_NUMBER11","ADC_SOC_NUMBER2","ADC_SOC_NUMBER3","ADC_SOC_NUMBER4","ADC_SOC_NUMBER5","ADC_SOC_NUMBER6","ADC_SOC_NUMBER7","ADC_SOC_NUMBER8","ADC_SOC_NUMBER9"];
    adc2.soc7Channel         = "ADC_CH_ADCIN1";
    adc2.soc7Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc2.soc7SampleWindow    = 36;
    adc2.soc8Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc2.soc8SampleWindow    = 36;
    adc2.soc9Channel         = "ADC_CH_ADCIN2";
    adc2.soc9Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc2.soc9SampleWindow    = 36;
    adc2.soc10Channel        = "ADC_CH_ADCIN14";
    adc2.soc10Trigger        = "ADC_TRIGGER_EPWM8_SOCA";
    adc2.soc10SampleWindow   = 36;
    adc2.soc11Channel        = "ADC_CH_ADCIN15";
    adc2.soc11SampleWindow   = 36;
    adc2.soc11Trigger        = "ADC_TRIGGER_EPWM8_SOCA";
    
    adc3.$name               = "myADC2";
    adc3.adcBase             = "ADCD_BASE";
    adc3.soc0Channel         = "ADC_CH_ADCIN1";
    adc3.soc0SampleWindow    = 36;
    adc3.soc1SampleWindow    = 36;
    adc3.soc2SampleWindow    = 36;
    adc3.soc3SampleWindow    = 36;
    adc3.soc4SampleWindow    = 36;
    adc3.soc5SampleWindow    = 36;
    adc3.soc6SampleWindow    = 36;
    adc3.soc7SampleWindow    = 36;
    adc3.adcClockPrescaler   = "ADC_CLK_DIV_2_0";
    adc3.soc4Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc3.useInterrupts       = false;
    adc3.soc0Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc3.soc1Channel         = "ADC_CH_ADCIN2";
    adc3.soc1Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc3.soc2Channel         = "ADC_CH_ADCIN4";
    adc3.soc2Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc3.soc3Channel         = "ADC_CH_ADCIN1";
    adc3.soc3Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc3.soc4Channel         = "ADC_CH_ADCIN3";
    adc3.soc5Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc3.soc6Channel         = "ADC_CH_ADCIN2";
    adc3.soc6Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc3.soc7Channel         = "ADC_CH_ADCIN4";
    adc3.soc7Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc3.enabledSOCs         = ["ADC_SOC_NUMBER0","ADC_SOC_NUMBER1","ADC_SOC_NUMBER2","ADC_SOC_NUMBER3","ADC_SOC_NUMBER4","ADC_SOC_NUMBER5","ADC_SOC_NUMBER6","ADC_SOC_NUMBER7","ADC_SOC_NUMBER8","ADC_SOC_NUMBER9"];
    adc3.socHighPriorityMode = "ADC_PRI_THRU_SOC9_HIPRI";
    adc3.soc8Channel         = "ADC_CH_ADCIN1";
    adc3.soc8Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc3.soc8SampleWindow    = 36;
    adc3.soc9Channel         = "ADC_CH_ADCIN3";
    adc3.soc9SampleWindow    = 36;
    adc3.soc9Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    
    can1.$name                    = "myCAN0";
    can1.enableInterrupt          = true;
    can1.registerInterrupts       = true;
    can1.interruptLine            = ["CAN_GLOBAL_INT_CANINT0"];
    can1.interruptFlags           = ["CAN_INT_ERROR","CAN_INT_IE0","CAN_INT_STATUS"];
    can1.can.$assign              = "CANA";
    can1.can.canrxPin.$assign     = "GPIO62";
    can1.can.cantxPin.$assign     = "GPIO63";
    can1.can0Int.interruptHandler = "CAN_RxISR";
    can1.can0Int.enableInterrupt  = true;
    can1.can1Int.interruptHandler = "CAN_TxISR";
    
    cmpss1.$name          = "DCHG_CS1_CMPSS4P";
    cmpss1.cmpssBase      = "CMPSS4_BASE";
    cmpss1.hysteresisVal  = "1";
    cmpss1.dacValLoad     = "CMPSS_DACVAL_PWMSYNC";
    cmpss1.dacValLow      = 124;
    cmpss1.lowCTRIP       = "CMPSS_TRIP_SYNC_COMP";
    cmpss1.lowCompAsynch  = true;
    cmpss1.lowCompInvert  = true;
    cmpss1.highCompAsynch = true;
    cmpss1.highCTRIP      = "CMPSS_TRIP_SYNC_COMP";
    cmpss1.dacValHigh     = 1000;
    
    cmpss2.$name          = "DCHG_CS2_CMPSS3P";
    cmpss2.cmpssBase      = "CMPSS3_BASE";
    cmpss2.highCompAsynch = true;
    cmpss2.dacValHigh     = 1000;
    cmpss2.lowCompInvert  = true;
    cmpss2.lowCompAsynch  = true;
    cmpss2.dacValLow      = 124;
    cmpss2.hysteresisVal  = "1";
    
    cmpss3.cmpssBase      = "CMPSS5_BASE";
    cmpss3.$name          = "DCHG_CS3_CMPSS5P";
    cmpss3.highCompAsynch = true;
    cmpss3.dacValHigh     = 1000;
    cmpss3.lowCompInvert  = true;
    cmpss3.lowCompAsynch  = true;
    cmpss3.dacValLow      = 124;
    cmpss3.hysteresisVal  = "1";
    
    cmpss4.cmpssBase      = "CMPSS6_BASE";
    cmpss4.$name          = "DCHG_CH4_CMPSS6P";
    cmpss4.highCompAsynch = true;
    cmpss4.dacValHigh     = 1000;
    cmpss4.lowCompInvert  = true;
    cmpss4.lowCompAsynch  = true;
    cmpss4.dacValLow      = 124;
    cmpss4.hysteresisVal  = "1";
    
    cputimer1.$name                    = "myCPUTIMER0";
    cputimer1.enableInterrupt          = true;
    cputimer1.startTimer               = true;
    cputimer1.registerInterrupts       = true;
    cputimer1.timerPeriod              = 120000;
    cputimer1.timerInt.enableInterrupt = true;
    
    cputimer2.$name                    = "myCPUTIMER1";
    cputimer2.startTimer               = true;
    cputimer2.registerInterrupts       = true;
    cputimer2.enableInterrupt          = true;
    cputimer2.cputimerBase             = "CPUTIMER1_BASE";
    cputimer2.timerPeriod              = 1200;
    cputimer2.timerInt.enableInterrupt = true;
    
    epwm1.epwmTimebase_period                                             = 600;
    epwm1.epwmCounterCompare_cmpC                                         = 181;
    epwm1.epwmCounterCompare_cmpD                                         = 300;
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_shadowMode                 = true;
    epwm1.epwmTripZone_cbcSource                                          = ["EPWM_TZ_SIGNAL_DCAEVT2"];
    epwm1.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm1.epwmDigitalCompare_EPWM_DC_TYPE_DCBL                            = "EPWM_DC_TRIP_TRIPIN4";
    epwm1.epwmDigitalCompare_dcFilterInput                                = "EPWM_DC_WINDOW_SOURCE_DCAEVT2";
    epwm1.epwmDigitalCompare_useBlankingWindow                            = true;
    epwm1.epwmDeadband_outputSwapOutA                                     = true;
    epwm1.epwmDeadband_outputSwapOutB                                     = true;
    epwm1.epwmDeadband_controlShadowMode                                  = true;
    epwm1.epwmEventTrigger_enableInterrupt                                = true;
    epwm1.epwmEventTrigger_EPWM_SOC_A_triggerSource                       = "EPWM_SOC_TBCTR_U_CMPC";
    epwm1.epwmTimebase_emulationMode                                      = "EPWM_EMULATION_FREE_RUN";
    epwm1.epwmTimebase_hsClockDiv                                         = "EPWM_HSCLOCK_DIVIDER_1";
    epwm1.epwmTimebase_counterMode                                        = "EPWM_COUNTER_MODE_UP";
    epwm1.epwmTimebase_syncOutPulseMode                                   = "EPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_shadowMode                 = true;
    epwm1.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZA                           = "EPWM_TZ_ACTION_LOW";
    epwm1.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZB                           = "EPWM_TZ_ACTION_LOW";
    epwm1.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm1.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm1.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm1.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm1.epwmDeadband_polarityFED                                        = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm1.epwmDeadband_enableRED                                          = true;
    epwm1.epwmDeadband_delayRED                                           = 12;
    epwm1.epwmDeadband_enableFED                                          = true;
    epwm1.epwmDeadband_delayFED                                           = 12;
    epwm1.epwmDeadband_redShadowMode                                      = true;
    epwm1.epwmDeadband_fedShadowMode                                      = true;
    epwm1.$name                                                           = "myEPWM6";
    epwm1.useInterfacePins                                                = ["EPWM#A"];
    epwm1.copyUse                                                         = true;
    epwm1.copyFrom                                                        = "myEPWM7";
    epwm1.epwmEventTrigger_EPWM_SOC_A_triggerEnable                       = true;
    epwm1.epwmEventTrigger_EPWM_SOC_A_triggerEventPrescalar               = "1";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_LOW";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_HIGH";
    epwm1.epwmEventTrigger_interruptSource                                = "EPWM_INT_TBCTR_U_CMPD";
    epwm1.epwmEventTrigger_interruptEventCount                            = "1";
    epwm1.epwmDigitalCompare_blankingWindowOffset                         = 576;
    epwm1.epwmDigitalCompare_blankingWindowLength                         = 84;
    epwm1.epwmDigitalCompare_blankingWindowEvent                          = "EPWM_DC_WINDOW_START_TBCTR_ZERO";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_HIGH";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_LOW";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_LOW";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_HIGH";
    epwm1.epwmDigitalCompare_EPWM_DC_TYPE_DCAH                            = "EPWM_DC_TRIP_TRIPIN9";
    epwm1.epwmDigitalCompare_EPWM_DC_TYPE_DCAL                            = "EPWM_DC_TRIP_TRIPIN4";
    epwm1.epwmDigitalCompare_EPWM_DC_TYPE_DCBH                            = "EPWM_DC_TRIP_TRIPIN9";
    epwm1.epwmDigitalCompare_EPWM_DC_MODULE_B_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm1.epwmTimebase_phaseEnable                                        = true;
    epwm1.epwmCounterCompare_cmpA                                         = 360;
    epwm1.epwm.$assign                                                    = "EPWM6";
    epwm1.epwm.epwmaPin.$assign                                           = "GPIO10";
    epwm1.epwm.epwmbPin.$assign                                           = "GPIO11";
    
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_LOW";
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_HIGH";
    epwm2.epwmTimebase_emulationMode                                      = "EPWM_EMULATION_FREE_RUN";
    epwm2.epwmTimebase_hsClockDiv                                         = "EPWM_HSCLOCK_DIVIDER_1";
    epwm2.epwmTimebase_period                                             = 600;
    epwm2.epwmTimebase_counterMode                                        = "EPWM_COUNTER_MODE_UP";
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_shadowMode                 = true;
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_shadowMode                 = true;
    epwm2.useInterfacePins                                                = ["EPWM#A"];
    epwm2.$name                                                           = "myEPWM7";
    epwm2.epwmCounterCompare_cmpC                                         = 181;
    epwm2.epwmDeadband_controlShadowMode                                  = true;
    epwm2.epwmCounterCompare_cmpD                                         = 300;
    epwm2.epwmDeadband_polarityFED                                        = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm2.epwmDeadband_enableRED                                          = true;
    epwm2.epwmDeadband_enableFED                                          = true;
    epwm2.epwmDigitalCompare_dcFilterInput                                = "EPWM_DC_WINDOW_SOURCE_DCAEVT2";
    epwm2.epwmDeadband_outputSwapOutB                                     = true;
    epwm2.epwmDeadband_outputSwapOutA                                     = true;
    epwm2.epwmTripZone_cbcSource                                          = ["EPWM_TZ_SIGNAL_DCAEVT2"];
    epwm2.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm2.epwmDigitalCompare_useBlankingWindow                            = true;
    epwm2.epwmDigitalCompare_blankingWindowEvent                          = "EPWM_DC_WINDOW_START_TBCTR_ZERO";
    epwm2.epwmDigitalCompare_blankingWindowOffset                         = 576;
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZA                           = "EPWM_TZ_ACTION_LOW";
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZB                           = "EPWM_TZ_ACTION_LOW";
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm2.epwmDigitalCompare_blankingWindowLength                         = 84;
    epwm2.epwmTimebase_syncOutPulseMode                                   = "EPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO";
    epwm2.epwmDeadband_delayRED                                           = 12;
    epwm2.epwmDeadband_delayFED                                           = 12;
    epwm2.epwmDeadband_fedShadowMode                                      = true;
    epwm2.epwmDeadband_redShadowMode                                      = true;
    epwm2.copyUse                                                         = true;
    epwm2.copyFrom                                                        = "myEPWM6";
    epwm2.epwmTimebase_phaseEnable                                        = true;
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm2.epwmTimebase_phaseShift                                         = 150;
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_LOW";
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_HIGH";
    epwm2.epwmDigitalCompare_EPWM_DC_TYPE_DCAL                            = "EPWM_DC_TRIP_TRIPIN5";
    epwm2.epwmDigitalCompare_EPWM_DC_TYPE_DCBL                            = "EPWM_DC_TRIP_TRIPIN5";
    epwm2.epwmDigitalCompare_EPWM_DC_MODULE_B_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm2.epwmDigitalCompare_EPWM_DC_TYPE_DCAH                            = "EPWM_DC_TRIP_TRIPIN10";
    epwm2.epwmDigitalCompare_EPWM_DC_TYPE_DCBH                            = "EPWM_DC_TRIP_TRIPIN10";
    epwm2.epwmCounterCompare_cmpA                                         = 360;
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_HIGH";
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_LOW";
    epwm2.epwmCounterCompare_cmpALink                                     = "EPWM_LINK_WITH_EPWM_6";
    epwm2.epwm.$assign                                                    = "EPWM7";
    epwm2.epwm.epwmaPin.$assign                                           = "GPIO12";
    epwm2.epwm.epwmbPin.$assign                                           = "GPIO13";
    
    epwm3.epwmTimebase_emulationMode                               = "EPWM_EMULATION_FREE_RUN";
    epwm3.epwmTimebase_hsClockDiv                                  = "EPWM_HSCLOCK_DIVIDER_1";
    epwm3.epwmTimebase_counterMode                                 = "EPWM_COUNTER_MODE_UP";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_A_shadowMode          = true;
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO    = "EPWM_AQ_OUTPUT_HIGH";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA = "EPWM_AQ_OUTPUT_LOW";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_B_shadowMode          = true;
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO    = "EPWM_AQ_OUTPUT_LOW";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPA = "EPWM_AQ_OUTPUT_HIGH";
    epwm3.useInterfacePins                                         = ["EPWM#A"];
    epwm3.$name                                                    = "myEPWM11";
    epwm3.copyFrom                                                 = "myEPWM7";
    epwm3.epwmTimebase_period                                      = 2400;
    epwm3.epwmCounterCompare_cmpA                                  = 1200;
    epwm3.useCase                                                  = "CUSTOM";
    epwm3.epwm.$assign                                             = "EPWM11";
    epwm3.epwm.epwmaPin.$assign                                    = "GPIO20";
    
    epwm4.epwmTimebase_phaseEnable                                        = true;
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_LOW";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_HIGH";
    epwm4.epwmDeadband_controlShadowMode                                  = true;
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZA                           = "EPWM_TZ_ACTION_LOW";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZB                           = "EPWM_TZ_ACTION_LOW";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm4.epwmDeadband_polarityFED                                        = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm4.epwmDeadband_enableRED                                          = true;
    epwm4.epwmDeadband_enableFED                                          = true;
    epwm4.useInterfacePins                                                = ["EPWM#A"];
    epwm4.epwmTimebase_hsClockDiv                                         = "EPWM_HSCLOCK_DIVIDER_1";
    epwm4.epwmTimebase_period                                             = 600;
    epwm4.epwmTimebase_counterMode                                        = "EPWM_COUNTER_MODE_UP";
    epwm4.epwmTimebase_emulationMode                                      = "EPWM_EMULATION_FREE_RUN";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_shadowMode                 = true;
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_B_shadowMode                 = true;
    epwm4.copyUse                                                         = true;
    epwm4.copyFrom                                                        = "myEPWM7";
    epwm4.epwmCounterCompare_cmpC                                         = 181;
    epwm4.epwmCounterCompare_cmpD                                         = 300;
    epwm4.epwmDeadband_outputSwapOutA                                     = true;
    epwm4.epwmDeadband_outputSwapOutB                                     = true;
    epwm4.epwmTripZone_cbcSource                                          = ["EPWM_TZ_SIGNAL_DCAEVT2"];
    epwm4.epwmDigitalCompare_dcFilterInput                                = "EPWM_DC_WINDOW_SOURCE_DCAEVT2";
    epwm4.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm4.epwmDigitalCompare_useBlankingWindow                            = true;
    epwm4.epwmDigitalCompare_blankingWindowEvent                          = "EPWM_DC_WINDOW_START_TBCTR_ZERO";
    epwm4.epwmDigitalCompare_blankingWindowOffset                         = 576;
    epwm4.epwmDigitalCompare_blankingWindowLength                         = 84;
    epwm4.epwmTimebase_syncOutPulseMode                                   = "EPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO";
    epwm4.epwmDeadband_delayRED                                           = 12;
    epwm4.epwmDeadband_delayFED                                           = 12;
    epwm4.epwmDeadband_redShadowMode                                      = true;
    epwm4.epwmDeadband_fedShadowMode                                      = true;
    epwm4.$name                                                           = "myEPWM9";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_B_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm4.epwmTimebase_phaseShift                                         = 450;
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_LOW";
    epwm4.epwmDigitalCompare_EPWM_DC_TYPE_DCAL                            = "EPWM_DC_TRIP_TRIPIN8";
    epwm4.epwmDigitalCompare_EPWM_DC_TYPE_DCBL                            = "EPWM_DC_TRIP_TRIPIN8";
    epwm4.epwmDigitalCompare_EPWM_DC_MODULE_B_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm4.epwmDigitalCompare_EPWM_DC_TYPE_DCAH                            = "EPWM_DC_TRIP_TRIPIN12";
    epwm4.epwmDigitalCompare_EPWM_DC_TYPE_DCBH                            = "EPWM_DC_TRIP_TRIPIN12";
    epwm4.epwmCounterCompare_cmpA                                         = 360;
    epwm4.epwmCounterCompare_cmpALink                                     = "EPWM_LINK_WITH_EPWM_6";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_HIGH";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_LOW";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_HIGH";
    epwm4.epwm.$assign                                                    = "EPWM9";
    epwm4.epwm.epwmaPin.$assign                                           = "GPIO16";
    epwm4.epwm.epwmbPin.$assign                                           = "GPIO17";
    
    epwm5.$name                                                    = "myEPWM1";
    epwm5.useCase                                                  = "CUSTOM";
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO    = "EPWM_AQ_OUTPUT_HIGH";
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPA = "EPWM_AQ_OUTPUT_LOW";
    epwm5.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZA                    = "EPWM_TZ_ACTION_LOW";
    epwm5.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZB                    = "EPWM_TZ_ACTION_LOW";
    epwm5.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT1                = "EPWM_TZ_ACTION_DISABLE";
    epwm5.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT2                = "EPWM_TZ_ACTION_DISABLE";
    epwm5.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT1                = "EPWM_TZ_ACTION_DISABLE";
    epwm5.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT2                = "EPWM_TZ_ACTION_DISABLE";
    epwm5.epwmTimebase_counterMode                                 = "EPWM_COUNTER_MODE_UP";
    epwm5.epwmTimebase_syncOutPulseMode                            = "EPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO";
    epwm5.epwmTimebase_hsClockDiv                                  = "EPWM_HSCLOCK_DIVIDER_1";
    epwm5.epwmTimebase_emulationMode                               = "EPWM_EMULATION_FREE_RUN";
    epwm5.epwmTimebase_period                                      = 600;
    epwm5.epwmCounterCompare_cmpA                                  = 600;
    epwm5.epwmCounterCompare_cmpC                                  = 181;
    epwm5.epwmCounterCompare_cmpD                                  = 300;
    epwm5.useInterfacePins                                         = ["EPWM#A"];
    
    epwm6.epwmTimebase_emulationMode                                      = "EPWM_EMULATION_FREE_RUN";
    epwm6.epwmTimebase_hsClockDiv                                         = "EPWM_HSCLOCK_DIVIDER_1";
    epwm6.epwmTimebase_period                                             = 600;
    epwm6.epwmTimebase_counterMode                                        = "EPWM_COUNTER_MODE_UP";
    epwm6.epwmTimebase_syncOutPulseMode                                   = "EPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO";
    epwm6.epwmCounterCompare_cmpC                                         = 181;
    epwm6.epwmCounterCompare_cmpD                                         = 300;
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_A_shadowMode                 = true;
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_LOW";
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_B_shadowMode                 = true;
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_HIGH";
    epwm6.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZA                           = "EPWM_TZ_ACTION_LOW";
    epwm6.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZB                           = "EPWM_TZ_ACTION_LOW";
    epwm6.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm6.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm6.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm6.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm6.epwmTripZone_cbcSource                                          = ["EPWM_TZ_SIGNAL_DCAEVT2"];
    epwm6.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm6.epwmDigitalCompare_dcFilterInput                                = "EPWM_DC_WINDOW_SOURCE_DCAEVT2";
    epwm6.epwmDigitalCompare_useBlankingWindow                            = true;
    epwm6.epwmDigitalCompare_blankingWindowEvent                          = "EPWM_DC_WINDOW_START_TBCTR_ZERO";
    epwm6.epwmDigitalCompare_blankingWindowOffset                         = 576;
    epwm6.epwmDigitalCompare_blankingWindowLength                         = 84;
    epwm6.epwmDeadband_polarityFED                                        = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm6.epwmDeadband_enableRED                                          = true;
    epwm6.epwmDeadband_delayRED                                           = 12;
    epwm6.epwmDeadband_enableFED                                          = true;
    epwm6.epwmDeadband_delayFED                                           = 12;
    epwm6.epwmDeadband_outputSwapOutA                                     = true;
    epwm6.epwmDeadband_outputSwapOutB                                     = true;
    epwm6.epwmDeadband_controlShadowMode                                  = true;
    epwm6.epwmDeadband_redShadowMode                                      = true;
    epwm6.epwmDeadband_fedShadowMode                                      = true;
    epwm6.epwmEventTrigger_enableInterrupt                                = true;
    epwm6.epwmEventTrigger_interruptSource                                = "EPWM_INT_TBCTR_U_CMPD";
    epwm6.epwmEventTrigger_interruptEventCount                            = "1";
    epwm6.epwmEventTrigger_EPWM_SOC_A_triggerEnable                       = true;
    epwm6.epwmEventTrigger_EPWM_SOC_A_triggerSource                       = "EPWM_SOC_TBCTR_U_CMPC";
    epwm6.epwmEventTrigger_EPWM_SOC_A_triggerEventPrescalar               = "1";
    epwm6.useInterfacePins                                                = ["EPWM#A"];
    epwm6.copyUse                                                         = true;
    epwm6.copyFrom                                                        = "myEPWM6";
    epwm6.$name                                                           = "myEPWM8";
    epwm6.epwmTimebase_phaseEnable                                        = true;
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_A_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_B_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm6.epwmTimebase_phaseShift                                         = 300;
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_B_onetimeSwForceAction       = "EPWM_AQ_OUTPUT_HIGH";
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_LOW";
    epwm6.epwmDigitalCompare_EPWM_DC_TYPE_DCAL                            = "EPWM_DC_TRIP_TRIPIN7";
    epwm6.epwmDigitalCompare_EPWM_DC_TYPE_DCBL                            = "EPWM_DC_TRIP_TRIPIN7";
    epwm6.epwmDigitalCompare_EPWM_DC_MODULE_B_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm6.epwmDigitalCompare_EPWM_DC_TYPE_DCAH                            = "EPWM_DC_TRIP_TRIPIN11";
    epwm6.epwmDigitalCompare_EPWM_DC_TYPE_DCBH                            = "EPWM_DC_TRIP_TRIPIN11";
    epwm6.epwmCounterCompare_cmpA                                         = 360;
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_HIGH";
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_LOW";
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_HIGH";
    epwm6.epwmCounterCompare_cmpALink                                     = "EPWM_LINK_WITH_EPWM_6";
    epwm6.epwm.$assign                                                    = "EPWM8";
    epwm6.epwm.epwmaPin.$assign                                           = "GPIO14";
    epwm6.epwm.epwmbPin.$assign                                           = "GPIO15";
    
    epwm7.$name                    = "myEPWM2";
    epwm7.epwmTimebase_period      = 6000;
    epwm7.epwmTimebase_counterMode = "EPWM_COUNTER_MODE_UP";
    epwm7.epwmCounterCompare_cmpA  = 6000;
    epwm7.epwm.$assign             = "EPWM2";
    
    epwmxbar1.muxesUsed = ["XBAR_MUX07"];
    epwmxbar1.$name     = "DCHG_CS1_CMPSS4L_TRIP4";
    
    epwmxbar2.muxesUsed = ["XBAR_MUX05"];
    epwmxbar2.tripInput = "XBAR_TRIP5";
    epwmxbar2.$name     = "DCHG_CS2_CMPSS3L_TRIP5";
    
    epwmxbar3.muxesUsed = ["XBAR_MUX09"];
    epwmxbar3.tripInput = "XBAR_TRIP7";
    epwmxbar3.$name     = "DCHG_CS3_CMPSS5L_TRIP7";
    
    epwmxbar4.muxesUsed = ["XBAR_MUX11"];
    epwmxbar4.tripInput = "XBAR_TRIP8";
    epwmxbar4.$name     = "DCHG_CS4_CMPSS6L_TRIP8";
    
    epwmxbar5.tripInput = "XBAR_TRIP9";
    epwmxbar5.muxesUsed = ["XBAR_MUX06"];
    epwmxbar5.$name     = "DCHG_CS1_CMPSS4H_TRIP9";
    
    epwmxbar6.tripInput = "XBAR_TRIP10";
    epwmxbar6.$name     = "DCHG_CS2_CMPSS3H_TRIP10";
    epwmxbar6.muxesUsed = ["XBAR_MUX04"];
    
    epwmxbar7.tripInput = "XBAR_TRIP11";
    epwmxbar7.muxesUsed = ["XBAR_MUX08"];
    epwmxbar7.$name     = "DCHG_CS3_CMPSS5H_TRIP11";
    
    epwmxbar8.$name     = "DCHG_CS4_CMPSS6H_TRIP12";
    epwmxbar8.tripInput = "XBAR_TRIP12";
    epwmxbar8.muxesUsed = ["XBAR_MUX10"];
    
    gpio1.direction       = "GPIO_DIR_MODE_OUT";
    gpio1.$name           = "tFLASH_SPI_EN";
    gpio1.gpioPin.$assign = "GPIO99";
    
    gpio2.direction       = "GPIO_DIR_MODE_OUT";
    gpio2.$name           = "tFLASH_HOLD";
    gpio2.gpioPin.$assign = "GPIO8";
    
    gpio3.direction       = "GPIO_DIR_MODE_OUT";
    gpio3.$name           = "tFLASH_WP";
    gpio3.gpioPin.$assign = "GPIO9";
    
    gpio4.direction       = "GPIO_DIR_MODE_OUT";
    gpio4.$name           = "CFET_HOP";
    gpio4.gpioPin.$assign = "GPIO26";
    
    gpio5.direction       = "GPIO_DIR_MODE_OUT";
    gpio5.$name           = "DFET_HOP";
    gpio5.gpioPin.$assign = "GPIO27";
    
    gpio6.$name           = "MCU_SELF_TEST";
    gpio6.gpioPin.$assign = "GPIO30";
    
    gpio7.$name           = "FAN_PWR_LATCH";
    gpio7.gpioPin.$assign = "GPIO29";
    
    gpio8.$name           = "tAFE_ALARM1";
    gpio8.gpioPin.$assign = "GPIO31";
    
    gpio9.$name           = "tVPC_Check";
    gpio9.gpioPin.$assign = "GPIO32";
    
    gpio10.direction       = "GPIO_DIR_MODE_OUT";
    gpio10.$name           = "EE_WP";
    gpio10.gpioPin.$assign = "GPIO33";
    
    gpio11.$name           = "t2nd_DET";
    gpio11.gpioPin.$assign = "GPIO37";
    
    gpio12.$name           = "tCFuse_DET";
    gpio12.gpioPin.$assign = "GPIO38";
    
    gpio13.direction       = "GPIO_DIR_MODE_OUT";
    gpio13.$name           = "tFuse_Check_BATT";
    gpio13.gpioPin.$assign = "GPIO39";
    
    gpio14.$name           = "AFE_SHDN";
    gpio14.direction       = "GPIO_DIR_MODE_OUT";
    gpio14.gpioPin.$assign = "GPIO41";
    
    gpio15.$name           = "VPC_SW";
    gpio15.direction       = "GPIO_DIR_MODE_OUT";
    gpio15.gpioPin.$assign = "GPIO49";
    
    gpio16.$name           = "tPOR_LED";
    gpio16.direction       = "GPIO_DIR_MODE_OUT";
    gpio16.gpioPin.$assign = "GPIO50";
    
    gpio17.$name           = "TH_SW";
    gpio17.direction       = "GPIO_DIR_MODE_OUT";
    gpio17.gpioPin.$assign = "GPIO51";
    
    gpio18.$name           = "PF_FUSE";
    gpio18.direction       = "GPIO_DIR_MODE_OUT";
    gpio18.gpioPin.$assign = "GPIO53";
    
    gpio19.$name           = "FUSE_DET_BUS";
    gpio19.gpioPin.$assign = "GPIO54";
    
    gpio20.$name           = "Protect_HIP";
    gpio20.gpioPin.$assign = "GPIO55";
    
    gpio21.$name           = "BMS_OVP_HIP";
    gpio21.gpioPin.$assign = "GPIO56";
    
    gpio22.$name           = "BMS_UVP_HIP";
    gpio22.gpioPin.$assign = "GPIO57";
    
    gpio23.$name           = "BMS_OCP_HIP";
    gpio23.gpioPin.$assign = "GPIO58";
    
    gpio24.$name           = "BMS_SCP_HIP";
    gpio24.gpioPin.$assign = "GPIO59";
    
    gpio25.$name           = "BUS_OVP_HIP";
    gpio25.gpioPin.$assign = "GPIO60";
    
    gpio26.$name           = "BUS_UVP_HIP";
    gpio26.gpioPin.$assign = "GPIO61";
    
    gpio27.$name           = "BUS_OCP_HIP";
    gpio27.gpioPin.$assign = "GPIO64";
    
    gpio28.$name           = "BUS_SCP_HIP";
    gpio28.gpioPin.$assign = "GPIO65";
    
    gpio29.direction       = "GPIO_DIR_MODE_OUT";
    gpio29.$name           = "UNLOCK_UVP_HOP";
    gpio29.gpioPin.$assign = "GPIO66";
    
    gpio30.$name           = "UNLOCK_SYS_HOP";
    gpio30.direction       = "GPIO_DIR_MODE_OUT";
    gpio30.gpioPin.$assign = "GPIO44";
    
    gpio31.$name           = "PWM_EN_LOP";
    gpio31.gpioPin.$assign = "GPIO45";
    
    gpio32.direction       = "GPIO_DIR_MODE_OUT";
    gpio32.$name           = "SYS_DCDC_EN";
    gpio32.gpioPin.$assign = "GPIO133";
    
    gpio33.$name           = "tRTC_INT";
    gpio33.gpioPin.$assign = "GPIO46";
    
    gpio34.$name           = "MCU_Boot_1_Reserved";
    gpio34.gpioPin.$assign = "GPIO72";
    
    gpio35.$name           = "tShortpin_DET";
    gpio35.gpioPin.$assign = "GPIO80";
    
    gpio36.$name           = "MCU_Boot_0_Reserved";
    gpio36.gpioPin.$assign = "GPIO84";
    
    gpio37.direction       = "GPIO_DIR_MODE_OUT";
    gpio37.$name           = "BKPWM_EN_HOP";
    gpio37.gpioPin.$assign = "GPIO85";
    
    gpio38.direction         = "GPIO_DIR_MODE_OUT";
    gpio38.writeInitialValue = true;
    gpio38.masterCore        = "GPIO_CORE_CPU1_CLA1";
    gpio38.$name             = "C2000_Update_Ready";
    gpio38.gpioPin.$assign   = "GPIO88";
    
    gpio39.direction       = "GPIO_DIR_MODE_OUT";
    gpio39.$name           = "C2000_PRE";
    gpio39.gpioPin.$assign = "GPIO89";
    
    gpio40.direction       = "GPIO_DIR_MODE_OUT";
    gpio40.$name           = "C2000_SW";
    gpio40.gpioPin.$assign = "GPIO90";
    
    gpio41.$name           = "PRE_CHG_HOP";
    gpio41.gpioPin.$assign = "GPIO21";
    
    gpio42.$name           = "AUX_LATCH_HOP";
    gpio42.direction       = "GPIO_DIR_MODE_OUT";
    gpio42.gpioPin.$assign = "GPIO28";
    
    i2c1.$name              = "myI2C0";
    i2c1.i2c.$assign        = "I2CB";
    i2c1.i2c.sdaPin.$assign = "GPIO34";
    i2c1.i2c.sclPin.$assign = "GPIO35";
    
    i2c2.$name              = "myI2C1";
    i2c2.i2c.sdaPin.$assign = "GPIO42";
    i2c2.i2c.sclPin.$assign = "GPIO43";
    
    sci1.$name                    = "mySCI0";
    sci1.baudRates                = 19200;
    sci1.parity                   = "SCI_CONFIG_PAR_EVEN";
    sci1.registerInterrupts       = true;
    sci1.enabledErrorInterrupts   = ["SCI_INT_FE","SCI_INT_OE","SCI_INT_PE","SCI_INT_RXERR"];
    sci1.enabledFIFOInterrupts    = ["SCI_INT_RXFF","SCI_INT_TXFF"];
    sci1.txFifo                   = "SCI_FIFO_TX8";
    sci1.rxFifo                   = "SCI_FIFO_RX1";
    sci1.sci.$assign              = "SCIB";
    sci1.sci.scirxdPin.$assign    = "GPIO71";
    sci1.sci.scitxdPin.$assign    = "GPIO70";
    sci1.sciRXInt.enableInterrupt = true;
    sci1.sciTXInt.enableInterrupt = true;
    
    spi1.$name                  = "mySPI0";
    spi1.bitRate                = 1000000;
    spi1.mode                   = "SPI_MODE_MASTER";
    spi1.useInterrupts          = false;
    spi1.spi.$assign            = "SPIB";
    spi1.spi.spisimoPin.$assign = "GPIO24";
    spi1.spi.spisomiPin.$assign = "GPIO25";
    spi1.spi.spiclkPin.$assign  = "GPIO22";
    spi1.spi.spistePin.$assign  = "GPIO23";
    
    sync.syncOutLock = true;
    
    /**
     * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
     * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
     * re-solve from scratch.
     */
    epwm5.epwm.$suggestSolution          = "EPWM1";
    epwm5.epwm.epwmaPin.$suggestSolution = "GPIO0";
    epwm7.epwm.epwmaPin.$suggestSolution = "GPIO2";
    epwm7.epwm.epwmbPin.$suggestSolution = "GPIO3";
    i2c2.i2c.$suggestSolution            = "I2CA";
    

    Best Regards,

    Ryan Hung

  • Hi Ryan,

    Thanks for the response and patience here. My main confusion was the method of how you were routing in HRPWM5A since I didn't see any instances of using CMPIN4P or analog input in the older .syscfg you sent. The latest you sent gives more context, though, so thank you. I still want to clarify: are you using a jumper to route HRPWM5A directly into ADCIN14/CMPIN4P pin? 

    I would also like to ask what kind of topology you are trying to develop? Perhaps there are other reference designs related we can leverage here.

    Best Regards,

    Allison

  • are you using a jumper to route HRPWM5A directly into ADCIN14/CMPIN4P pin? 

    Yes, I am using a jumper to route HRPWM5A directly into ADCIN14/CMPIN4P pin.

    I would also like to ask what kind of topology you are trying to develop?

    It's buck-boost DC/DC converter.

  • Hi Ryan,

    Thanks for the clarification. I'm still working on producing a simplified version of this and need a bit more time to look at all the configurations for this to understand since a few things have changed from the first file you sent. It looks like you are not using HR settings in the .syscfg you attached most recently, is that correct? Asking because I saw some HR implementation for your HRPWM in the first one - is the HRPWM you are using to simulate supposed to be included still?

    Just to let you know my intent- I am trying to figure out why you are seeing greater than 3 TBCLK time when implementing the AQ change. It appears that the action qualifier module is only able to take actions according to EPWMCLK which would explain the 16ns resolution of edge you are seeing (16ns being the period of your 60MHz EPWMCLK). But let me also reach out to others for some advice on this matter.

    Best Regards,

    Allison

  • Dear Allison,

    Sorry for the confused, I disabled the HWPWM to do some tests few days age. Please check the latest version below.


    /**
     * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
     * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
     * @cliArgs --device "F2807x" --package "F2807x_176PTP" --part "F2807x_176PTP" --product "C2000WARE@4.01.00.00"
     * @versions {"tool":"1.18.0+3266"}
     */
    
    /**
     * Import the modules used in this configuration.
     */
    const adc         = scripting.addModule("/driverlib/adc.js", {}, false);
    const adc1        = adc.addInstance();
    const adc2        = adc.addInstance();
    const adc3        = adc.addInstance();
    const cmpss       = scripting.addModule("/driverlib/cmpss.js", {}, false);
    const cmpss1      = cmpss.addInstance();
    const cmpss2      = cmpss.addInstance();
    const cmpss3      = cmpss.addInstance();
    const cmpss4      = cmpss.addInstance();
    const cputimer    = scripting.addModule("/driverlib/cputimer.js", {}, false);
    const cputimer1   = cputimer.addInstance();
    const epwm        = scripting.addModule("/driverlib/epwm.js");
    const epwm1       = epwm.addInstance();
    const epwm2       = epwm.addInstance();
    const epwm3       = epwm.addInstance();
    const epwm4       = epwm.addInstance();
    const epwm5       = epwm.addInstance();
    const epwm6       = epwm.addInstance();
    const epwm7       = epwm.addInstance();
    const epwmxbar    = scripting.addModule("/driverlib/epwmxbar.js", {}, false);
    const epwmxbar1   = epwmxbar.addInstance();
    const epwmxbar2   = epwmxbar.addInstance();
    const epwmxbar3   = epwmxbar.addInstance();
    const epwmxbar4   = epwmxbar.addInstance();
    const epwmxbar5   = epwmxbar.addInstance();
    const epwmxbar6   = epwmxbar.addInstance();
    const epwmxbar7   = epwmxbar.addInstance();
    const epwmxbar8   = epwmxbar.addInstance();
    const gpio        = scripting.addModule("/driverlib/gpio.js", {}, false);
    const gpio1       = gpio.addInstance();
    const gpio2       = gpio.addInstance();
    const gpio3       = gpio.addInstance();
    const gpio4       = gpio.addInstance();
    const gpio5       = gpio.addInstance();
    const gpio6       = gpio.addInstance();
    const gpio7       = gpio.addInstance();
    const gpio8       = gpio.addInstance();
    const gpio9       = gpio.addInstance();
    const gpio10      = gpio.addInstance();
    const gpio11      = gpio.addInstance();
    const gpio12      = gpio.addInstance();
    const gpio13      = gpio.addInstance();
    const gpio14      = gpio.addInstance();
    const gpio15      = gpio.addInstance();
    const gpio16      = gpio.addInstance();
    const gpio17      = gpio.addInstance();
    const gpio18      = gpio.addInstance();
    const gpio19      = gpio.addInstance();
    const gpio20      = gpio.addInstance();
    const gpio21      = gpio.addInstance();
    const gpio22      = gpio.addInstance();
    const gpio23      = gpio.addInstance();
    const gpio24      = gpio.addInstance();
    const gpio25      = gpio.addInstance();
    const gpio26      = gpio.addInstance();
    const gpio27      = gpio.addInstance();
    const gpio28      = gpio.addInstance();
    const gpio29      = gpio.addInstance();
    const gpio30      = gpio.addInstance();
    const gpio31      = gpio.addInstance();
    const gpio32      = gpio.addInstance();
    const gpio33      = gpio.addInstance();
    const gpio34      = gpio.addInstance();
    const gpio35      = gpio.addInstance();
    const gpio36      = gpio.addInstance();
    const gpio37      = gpio.addInstance();
    const gpio38      = gpio.addInstance();
    const gpio39      = gpio.addInstance();
    const gpio40      = gpio.addInstance();
    const gpio41      = gpio.addInstance();
    const gpio42      = gpio.addInstance();
    const gpio43      = gpio.addInstance();
    const gpio44      = gpio.addInstance();
    const i2c         = scripting.addModule("/driverlib/i2c.js", {}, false);
    const i2c1        = i2c.addInstance();
    const i2c2        = i2c.addInstance();
    const outputxbar  = scripting.addModule("/driverlib/outputxbar.js", {}, false);
    const outputxbar1 = outputxbar.addInstance();
    const outputxbar2 = outputxbar.addInstance();
    const sci         = scripting.addModule("/driverlib/sci.js", {}, false);
    const sci1        = sci.addInstance();
    const sync        = scripting.addModule("/driverlib/sync.js");
    
    /**
     * Write custom configuration values to the imported modules.
     */
    adc1.$name               = "myADC0";
    adc1.soc5Channel         = "ADC_CH_ADCIN3";
    adc1.interruptPulseMode  = "ADC_PULSE_END_OF_CONV";
    adc1.registerInterrupts  = ["1"];
    adc1.useInterrupts       = false;
    adc1.adcClockPrescaler   = "ADC_CLK_DIV_2_0";
    adc1.soc0SampleWindow    = 36;
    adc1.soc1SampleWindow    = 36;
    adc1.soc2SampleWindow    = 36;
    adc1.soc3Channel         = "ADC_CH_ADCIN5";
    adc1.soc3SampleWindow    = 36;
    adc1.soc4Channel         = "ADC_CH_ADCIN2";
    adc1.soc4SampleWindow    = 36;
    adc1.soc5SampleWindow    = 36;
    adc1.soc6Channel         = "ADC_CH_ADCIN4";
    adc1.soc6SampleWindow    = 36;
    adc1.soc7SampleWindow    = 36;
    adc1.soc8SampleWindow    = 36;
    adc1.soc9SampleWindow    = 36;
    adc1.socHighPriorityMode = "ADC_PRI_THRU_SOC7_HIPRI";
    adc1.soc0Channel         = "ADC_CH_ADCIN4";
    adc1.soc0Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc1.soc1Channel         = "ADC_CH_ADCIN1";
    adc1.soc1Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc1.soc2Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc1.soc3Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc1.soc4Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc1.soc5Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc1.soc6Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc1.soc7Channel         = "ADC_CH_ADCIN1";
    adc1.soc7Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc1.soc8Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc1.soc9Channel         = "ADC_CH_ADCIN5";
    adc1.soc9Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc1.soc10Channel        = "ADC_CH_ADCIN2";
    adc1.soc10Trigger        = "ADC_TRIGGER_EPWM8_SOCA";
    adc1.soc10SampleWindow   = 36;
    adc1.soc11Channel        = "ADC_CH_ADCIN3";
    adc1.soc11Trigger        = "ADC_TRIGGER_EPWM8_SOCA";
    adc1.soc11SampleWindow   = 36;
    adc1.enabledSOCs         = ["ADC_SOC_NUMBER0","ADC_SOC_NUMBER10","ADC_SOC_NUMBER11","ADC_SOC_NUMBER3","ADC_SOC_NUMBER4","ADC_SOC_NUMBER5","ADC_SOC_NUMBER6","ADC_SOC_NUMBER9"];
    
    adc2.$name               = "myADC1";
    adc2.adcBase             = "ADCB_BASE";
    adc2.adcClockPrescaler   = "ADC_CLK_DIV_2_0";
    adc2.soc0SampleWindow    = 36;
    adc2.soc1SampleWindow    = 36;
    adc2.soc2SampleWindow    = 36;
    adc2.soc3SampleWindow    = 36;
    adc2.soc4Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc2.soc4SampleWindow    = 36;
    adc2.soc5SampleWindow    = 36;
    adc2.soc6Channel         = "ADC_CH_ADCIN3";
    adc2.soc5Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc2.soc6SampleWindow    = 36;
    adc2.socHighPriorityMode = "ADC_PRI_THRU_SOC3_HIPRI";
    adc2.useInterrupts       = false;
    adc2.soc0Channel         = "ADC_CH_ADCIN3";
    adc2.soc1Channel         = "ADC_CH_ADCIN1";
    adc2.soc0Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc2.soc1Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc2.soc2Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc2.soc3Channel         = "ADC_CH_ADCIN2";
    adc2.soc3Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc2.soc4Channel         = "ADC_CH_ADCIN14";
    adc2.soc5Channel         = "ADC_CH_ADCIN15";
    adc2.soc6Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc2.soc7Channel         = "ADC_CH_ADCIN1";
    adc2.soc7Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc2.soc7SampleWindow    = 36;
    adc2.soc8Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc2.soc8SampleWindow    = 36;
    adc2.soc9Channel         = "ADC_CH_ADCIN2";
    adc2.soc9Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc2.soc9SampleWindow    = 36;
    adc2.soc10Channel        = "ADC_CH_ADCIN14";
    adc2.soc10Trigger        = "ADC_TRIGGER_EPWM8_SOCA";
    adc2.soc10SampleWindow   = 36;
    adc2.soc11Channel        = "ADC_CH_ADCIN15";
    adc2.soc11SampleWindow   = 36;
    adc2.soc11Trigger        = "ADC_TRIGGER_EPWM8_SOCA";
    adc2.enabledSOCs         = ["ADC_SOC_NUMBER0","ADC_SOC_NUMBER10","ADC_SOC_NUMBER11","ADC_SOC_NUMBER2","ADC_SOC_NUMBER3","ADC_SOC_NUMBER4","ADC_SOC_NUMBER5","ADC_SOC_NUMBER6","ADC_SOC_NUMBER8","ADC_SOC_NUMBER9"];
    
    adc3.$name               = "myADC2";
    adc3.adcBase             = "ADCD_BASE";
    adc3.soc0Channel         = "ADC_CH_ADCIN1";
    adc3.soc0SampleWindow    = 36;
    adc3.soc1SampleWindow    = 36;
    adc3.soc2SampleWindow    = 36;
    adc3.soc3SampleWindow    = 36;
    adc3.soc4SampleWindow    = 36;
    adc3.soc5SampleWindow    = 36;
    adc3.soc6SampleWindow    = 36;
    adc3.soc7SampleWindow    = 36;
    adc3.adcClockPrescaler   = "ADC_CLK_DIV_2_0";
    adc3.soc4Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc3.useInterrupts       = false;
    adc3.soc0Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc3.soc1Channel         = "ADC_CH_ADCIN2";
    adc3.soc1Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc3.soc2Channel         = "ADC_CH_ADCIN4";
    adc3.soc2Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc3.soc3Channel         = "ADC_CH_ADCIN1";
    adc3.soc3Trigger         = "ADC_TRIGGER_EPWM6_SOCA";
    adc3.soc4Channel         = "ADC_CH_ADCIN3";
    adc3.soc5Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc3.soc6Channel         = "ADC_CH_ADCIN2";
    adc3.soc6Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc3.soc7Channel         = "ADC_CH_ADCIN4";
    adc3.soc7Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc3.enabledSOCs         = ["ADC_SOC_NUMBER0","ADC_SOC_NUMBER1","ADC_SOC_NUMBER2","ADC_SOC_NUMBER3","ADC_SOC_NUMBER4","ADC_SOC_NUMBER5","ADC_SOC_NUMBER6","ADC_SOC_NUMBER7","ADC_SOC_NUMBER8","ADC_SOC_NUMBER9"];
    adc3.socHighPriorityMode = "ADC_PRI_THRU_SOC9_HIPRI";
    adc3.soc8Channel         = "ADC_CH_ADCIN1";
    adc3.soc8Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    adc3.soc8SampleWindow    = 36;
    adc3.soc9Channel         = "ADC_CH_ADCIN3";
    adc3.soc9SampleWindow    = 36;
    adc3.soc9Trigger         = "ADC_TRIGGER_EPWM8_SOCA";
    
    cmpss1.$name          = "DCHG_CS1_CMPSS4P";
    cmpss1.cmpssBase      = "CMPSS4_BASE";
    cmpss1.hysteresisVal  = "1";
    cmpss1.dacValLoad     = "CMPSS_DACVAL_PWMSYNC";
    cmpss1.enableModule   = true;
    cmpss1.dacValLow      = 124;
    cmpss1.dacValHigh     = 2019;
    cmpss1.latchResetHigh = true;
    
    cmpss2.$name         = "DCHG_CS2_CMPSS3P";
    cmpss2.cmpssBase     = "CMPSS3_BASE";
    cmpss2.lowCompInvert = true;
    cmpss2.hysteresisVal = "1";
    cmpss2.enableModule  = true;
    cmpss2.dacValLoad    = "CMPSS_DACVAL_PWMSYNC";
    cmpss2.highCTRIP     = "CMPSS_TRIP_SYNC_COMP";
    cmpss2.lowCTRIP      = "CMPSS_TRIP_SYNC_COMP";
    cmpss2.dacValLow     = 124;
    cmpss2.dacValHigh    = 2019;
    
    cmpss3.cmpssBase     = "CMPSS5_BASE";
    cmpss3.$name         = "DCHG_CS3_CMPSS5P";
    cmpss3.lowCompInvert = true;
    cmpss3.hysteresisVal = "1";
    cmpss3.enableModule  = true;
    cmpss3.dacValLoad    = "CMPSS_DACVAL_PWMSYNC";
    cmpss3.highCTRIP     = "CMPSS_TRIP_SYNC_COMP";
    cmpss3.lowCTRIP      = "CMPSS_TRIP_SYNC_COMP";
    cmpss3.dacValLow     = 124;
    cmpss3.dacValHigh    = 2019;
    
    cmpss4.cmpssBase     = "CMPSS6_BASE";
    cmpss4.lowCompInvert = true;
    cmpss4.hysteresisVal = "1";
    cmpss4.enableModule  = true;
    cmpss4.dacValLoad    = "CMPSS_DACVAL_PWMSYNC";
    cmpss4.$name         = "DCHG_CS4_CMPSS6P";
    cmpss4.lowCTRIP      = "CMPSS_TRIP_SYNC_COMP";
    cmpss4.highCTRIP     = "CMPSS_TRIP_SYNC_COMP";
    cmpss4.dacValLow     = 124;
    cmpss4.dacValHigh    = 2019;
    
    cputimer1.$name                    = "myCPUTIMER0";
    cputimer1.enableInterrupt          = true;
    cputimer1.startTimer               = true;
    cputimer1.registerInterrupts       = true;
    cputimer1.timerPeriod              = 120000;
    cputimer1.timerInt.enableInterrupt = true;
    
    epwm1.epwmCounterCompare_cmpC                                         = 181;
    epwm1.epwmCounterCompare_cmpD                                         = 300;
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_shadowMode                 = true;
    epwm1.epwmDigitalCompare_EPWM_DC_TYPE_DCBL                            = "EPWM_DC_TRIP_TRIPIN4";
    epwm1.epwmDeadband_outputSwapOutA                                     = true;
    epwm1.epwmDeadband_outputSwapOutB                                     = true;
    epwm1.epwmDeadband_controlShadowMode                                  = true;
    epwm1.epwmEventTrigger_enableInterrupt                                = true;
    epwm1.epwmEventTrigger_EPWM_SOC_A_triggerSource                       = "EPWM_SOC_TBCTR_U_CMPC";
    epwm1.epwmTimebase_emulationMode                                      = "EPWM_EMULATION_FREE_RUN";
    epwm1.epwmTimebase_hsClockDiv                                         = "EPWM_HSCLOCK_DIVIDER_1";
    epwm1.epwmTimebase_counterMode                                        = "EPWM_COUNTER_MODE_UP";
    epwm1.epwmTimebase_syncOutPulseMode                                   = "EPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_shadowMode                 = true;
    epwm1.epwmDeadband_polarityFED                                        = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm1.epwmDeadband_enableRED                                          = true;
    epwm1.epwmDeadband_enableFED                                          = true;
    epwm1.epwmDeadband_redShadowMode                                      = true;
    epwm1.epwmDeadband_fedShadowMode                                      = true;
    epwm1.$name                                                           = "myEPWM6";
    epwm1.useInterfacePins                                                = ["EPWM#A"];
    epwm1.copyUse                                                         = true;
    epwm1.copyFrom                                                        = "myEPWM7";
    epwm1.epwmEventTrigger_EPWM_SOC_A_triggerEnable                       = true;
    epwm1.epwmEventTrigger_EPWM_SOC_A_triggerEventPrescalar               = "1";
    epwm1.epwmEventTrigger_interruptSource                                = "EPWM_INT_TBCTR_U_CMPD";
    epwm1.epwmEventTrigger_interruptEventCount                            = "1";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_HIGH";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_LOW";
    epwm1.epwmDigitalCompare_EPWM_DC_TYPE_DCAH                            = "EPWM_DC_TRIP_TRIPIN9";
    epwm1.epwmDigitalCompare_EPWM_DC_TYPE_DCAL                            = "EPWM_DC_TRIP_TRIPIN4";
    epwm1.epwmDigitalCompare_EPWM_DC_TYPE_DCBH                            = "EPWM_DC_TRIP_TRIPIN9";
    epwm1.epwmCounterCompare_cmpB                                         = 599;
    epwm1.epwmDeadband_delayFED                                           = 600;
    epwm1.epwmDeadband_delayRED                                           = 18;
    epwm1.epwmTimebase_period                                             = 599;
    epwm1.hrpwm_edgeModeA                                                 = "HRPWM_MEP_CTRL_RISING_EDGE";
    epwm1.hrpwm_edgeModeB                                                 = "HRPWM_MEP_CTRL_FALLING_EDGE";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_gld                        = true;
    epwm1.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_1_eventSync   = "EPWM_DC_EVENT_INPUT_NOT_SYNCED";
    epwm1.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_2_eventSync   = "EPWM_DC_EVENT_INPUT_NOT_SYNCED";
    epwm1.hrpwm_enable                                                    = true;
    epwm1.epwmDigitalCompare_dcFilterInput                                = "EPWM_DC_WINDOW_SOURCE_DCAEVT2";
    epwm1.epwmDigitalCompare_EPWM_TZ_DC_OUTPUT_A1                         = "EPWM_TZ_EVENT_DCXH_HIGH";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_LOW";
    epwm1.epwmDigitalCompare_EPWM_DC_MODULE_B_EPWM_DC_EVENT_1_eventSync   = "EPWM_DC_EVENT_INPUT_NOT_SYNCED";
    epwm1.epwmDigitalCompare_EPWM_DC_MODULE_B_EPWM_DC_EVENT_2_eventSync   = "EPWM_DC_EVENT_INPUT_NOT_SYNCED";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_HIGH";
    epwm1.epwmDigitalCompare_useBlankingWindow                            = true;
    epwm1.epwmDigitalCompare_blankingWindowOffset                         = 576;
    epwm1.epwmDigitalCompare_blankingWindowLength                         = 24;
    epwm1.epwmDigitalCompare_blankingWindowEvent                          = "EPWM_DC_WINDOW_START_TBCTR_ZERO";
    epwm1.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm1.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZA                           = "EPWM_TZ_ACTION_DISABLE";
    epwm1.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZB                           = "EPWM_TZ_ACTION_LOW";
    epwm1.epwmCounterCompare_cmpA                                         = 200;
    epwm1.epwmDigitalCompare_EPWM_TZ_DC_OUTPUT_A2                         = "EPWM_TZ_EVENT_DCXH_HIGH";
    epwm1.epwmTripZone_cbcSource                                          = ["EPWM_TZ_SIGNAL_DCAEVT2"];
    epwm1.epwm.$assign                                                    = "EPWM6";
    epwm1.epwm.epwmaPin.$assign                                           = "GPIO10";
    epwm1.epwm.epwmbPin.$assign                                           = "GPIO11";
    
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_LOW";
    epwm2.epwmTimebase_emulationMode                                      = "EPWM_EMULATION_FREE_RUN";
    epwm2.epwmTimebase_hsClockDiv                                         = "EPWM_HSCLOCK_DIVIDER_1";
    epwm2.epwmTimebase_counterMode                                        = "EPWM_COUNTER_MODE_UP";
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_shadowMode                 = true;
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_shadowMode                 = true;
    epwm2.useInterfacePins                                                = ["EPWM#A"];
    epwm2.$name                                                           = "myEPWM7";
    epwm2.epwmCounterCompare_cmpC                                         = 181;
    epwm2.epwmDeadband_controlShadowMode                                  = true;
    epwm2.epwmCounterCompare_cmpD                                         = 300;
    epwm2.epwmDeadband_polarityFED                                        = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm2.epwmDeadband_enableRED                                          = true;
    epwm2.epwmDeadband_enableFED                                          = true;
    epwm2.epwmDigitalCompare_dcFilterInput                                = "EPWM_DC_WINDOW_SOURCE_DCAEVT2";
    epwm2.epwmDeadband_outputSwapOutB                                     = true;
    epwm2.epwmDeadband_outputSwapOutA                                     = true;
    epwm2.epwmTripZone_cbcSource                                          = ["EPWM_TZ_SIGNAL_DCAEVT2"];
    epwm2.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm2.epwmDigitalCompare_useBlankingWindow                            = true;
    epwm2.epwmDigitalCompare_blankingWindowEvent                          = "EPWM_DC_WINDOW_START_TBCTR_ZERO";
    epwm2.epwmDigitalCompare_blankingWindowOffset                         = 576;
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZA                           = "EPWM_TZ_ACTION_LOW";
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZB                           = "EPWM_TZ_ACTION_LOW";
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm2.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm2.epwmDigitalCompare_blankingWindowLength                         = 84;
    epwm2.epwmTimebase_syncOutPulseMode                                   = "EPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO";
    epwm2.epwmDeadband_fedShadowMode                                      = true;
    epwm2.epwmDeadband_redShadowMode                                      = true;
    epwm2.copyUse                                                         = true;
    epwm2.copyFrom                                                        = "myEPWM6";
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_LOW";
    epwm2.epwmDigitalCompare_EPWM_DC_TYPE_DCAL                            = "EPWM_DC_TRIP_TRIPIN5";
    epwm2.epwmDigitalCompare_EPWM_DC_TYPE_DCBL                            = "EPWM_DC_TRIP_TRIPIN5";
    epwm2.epwmDigitalCompare_EPWM_DC_MODULE_B_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm2.epwmDigitalCompare_EPWM_DC_TYPE_DCAH                            = "EPWM_DC_TRIP_TRIPIN10";
    epwm2.epwmDigitalCompare_EPWM_DC_TYPE_DCBH                            = "EPWM_DC_TRIP_TRIPIN10";
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_HIGH";
    epwm2.epwmCounterCompare_cmpB                                         = 599;
    epwm2.epwmDeadband_delayFED                                           = 600;
    epwm2.epwmDeadband_delayRED                                           = 18;
    epwm2.epwmTimebase_period                                             = 599;
    epwm2.hrpwm_edgeModeA                                                 = "HRPWM_MEP_CTRL_RISING_EDGE";
    epwm2.hrpwm_edgeModeB                                                 = "HRPWM_MEP_CTRL_FALLING_EDGE";
    epwm2.epwmCounterCompare_cmpALink                                     = "EPWM_LINK_WITH_EPWM_6";
    epwm2.epwmCounterCompare_cmpBLink                                     = "EPWM_LINK_WITH_EPWM_6";
    epwm2.epwmTimebase_phaseEnable                                        = true;
    epwm2.epwmTimebase_phaseShift                                         = 100;
    epwm2.epwm.$assign                                                    = "EPWM7";
    epwm2.epwm.epwmaPin.$assign                                           = "GPIO12";
    epwm2.epwm.epwmbPin.$assign                                           = "GPIO13";
    
    epwm3.epwmTimebase_emulationMode                               = "EPWM_EMULATION_FREE_RUN";
    epwm3.epwmTimebase_hsClockDiv                                  = "EPWM_HSCLOCK_DIVIDER_1";
    epwm3.epwmTimebase_counterMode                                 = "EPWM_COUNTER_MODE_UP";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_A_shadowMode          = true;
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO    = "EPWM_AQ_OUTPUT_HIGH";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA = "EPWM_AQ_OUTPUT_LOW";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_B_shadowMode          = true;
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO    = "EPWM_AQ_OUTPUT_LOW";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPA = "EPWM_AQ_OUTPUT_HIGH";
    epwm3.useInterfacePins                                         = ["EPWM#A"];
    epwm3.$name                                                    = "myEPWM11";
    epwm3.copyFrom                                                 = "myEPWM7";
    epwm3.epwmTimebase_period                                      = 2400;
    epwm3.epwmCounterCompare_cmpA                                  = 1200;
    epwm3.useCase                                                  = "CUSTOM";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_T1_COUNT_UP      = "EPWM_AQ_OUTPUT_HIGH";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_T1_COUNT_UP      = "EPWM_AQ_OUTPUT_LOW";
    epwm3.epwm.$assign                                             = "EPWM11";
    epwm3.epwm.epwmaPin.$assign                                    = "GPIO20";
    
    epwm4.$name                                                           = "myEPWM1";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZA                           = "EPWM_TZ_ACTION_LOW";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZB                           = "EPWM_TZ_ACTION_LOW";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm4.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm4.epwmTimebase_counterMode                                        = "EPWM_COUNTER_MODE_UP";
    epwm4.epwmTimebase_syncOutPulseMode                                   = "EPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO";
    epwm4.epwmTimebase_hsClockDiv                                         = "EPWM_HSCLOCK_DIVIDER_1";
    epwm4.epwmTimebase_emulationMode                                      = "EPWM_EMULATION_FREE_RUN";
    epwm4.epwmCounterCompare_cmpC                                         = 181;
    epwm4.epwmCounterCompare_cmpD                                         = 300;
    epwm4.copyUse                                                         = true;
    epwm4.copyFrom                                                        = "myEPWM6";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_shadowMode                 = true;
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_B_shadowMode                 = true;
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_B_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm4.epwmTripZone_cbcSource                                          = ["EPWM_TZ_SIGNAL_DCAEVT2"];
    epwm4.epwmDigitalCompare_EPWM_DC_TYPE_DCAH                            = "EPWM_DC_TRIP_TRIPIN9";
    epwm4.epwmDigitalCompare_EPWM_DC_TYPE_DCAL                            = "EPWM_DC_TRIP_TRIPIN4";
    epwm4.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm4.epwmDigitalCompare_EPWM_DC_TYPE_DCBH                            = "EPWM_DC_TRIP_TRIPIN9";
    epwm4.epwmDigitalCompare_EPWM_DC_TYPE_DCBL                            = "EPWM_DC_TRIP_TRIPIN4";
    epwm4.epwmDigitalCompare_EPWM_DC_MODULE_B_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm4.epwmDigitalCompare_dcFilterInput                                = "EPWM_DC_WINDOW_SOURCE_DCAEVT2";
    epwm4.epwmDigitalCompare_useBlankingWindow                            = true;
    epwm4.epwmDigitalCompare_blankingWindowEvent                          = "EPWM_DC_WINDOW_START_TBCTR_ZERO";
    epwm4.epwmDigitalCompare_blankingWindowLength                         = 84;
    epwm4.epwmDeadband_polarityFED                                        = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm4.epwmDeadband_enableRED                                          = true;
    epwm4.epwmDeadband_delayRED                                           = 18;
    epwm4.epwmDeadband_enableFED                                          = true;
    epwm4.epwmDeadband_outputSwapOutA                                     = true;
    epwm4.epwmDeadband_controlShadowMode                                  = true;
    epwm4.epwmDeadband_redShadowMode                                      = true;
    epwm4.epwmDeadband_fedShadowMode                                      = true;
    epwm4.hrpwm_enable                                                    = true;
    epwm4.hrpwm_enableCalculator                                          = true;
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_HIGH";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_LOW";
    epwm4.epwmTimebase_period                                             = 599;
    epwm4.useInterfacePins                                                = ["EPWM#A","EPWM#B"];
    epwm4.epwmCounterCompare_cmpA                                         = 300;
    epwm4.hrpwm_DBredHR                                                   = 12;
    epwm4.hrpwm_DBfedHR                                                   = 12;
    epwm4.hrpwm_edgeModeA                                                 = "HRPWM_MEP_CTRL_RISING_EDGE";
    epwm4.hrpwm_edgeModeB                                                 = "HRPWM_MEP_CTRL_FALLING_EDGE";
    epwm4.hrpwm_epwmclk                                                   = 60;
    epwm4.epwmDeadband_deadbandCounterClockRate                           = "EPWM_DB_COUNTER_CLOCK_HALF_CYCLE";
    epwm4.epwmCounterCompare_cmpB                                         = 599;
    epwm4.epwmDeadband_delayFED                                           = 30;
    epwm4.epwmDeadband_outputSwapOutB                                     = true;
    epwm4.epwmDigitalCompare_blankingWindowOffset                         = 57;
    epwm4.epwm.epwmaPin.$assign                                           = "GPIO0";
    epwm4.epwm.epwmbPin.$assign                                           = "GPIO1";
    
    epwm5.epwmTimebase_emulationMode                                      = "EPWM_EMULATION_FREE_RUN";
    epwm5.epwmTimebase_hsClockDiv                                         = "EPWM_HSCLOCK_DIVIDER_1";
    epwm5.epwmTimebase_counterMode                                        = "EPWM_COUNTER_MODE_UP";
    epwm5.epwmTimebase_syncOutPulseMode                                   = "EPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO";
    epwm5.epwmCounterCompare_cmpC                                         = 181;
    epwm5.epwmCounterCompare_cmpD                                         = 300;
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_A_shadowMode                 = true;
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_LOW";
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_B_shadowMode                 = true;
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_HIGH";
    epwm5.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZA                           = "EPWM_TZ_ACTION_LOW";
    epwm5.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZB                           = "EPWM_TZ_ACTION_LOW";
    epwm5.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm5.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm5.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm5.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm5.epwmTripZone_cbcSource                                          = ["EPWM_TZ_SIGNAL_DCAEVT2"];
    epwm5.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm5.epwmDigitalCompare_dcFilterInput                                = "EPWM_DC_WINDOW_SOURCE_DCAEVT2";
    epwm5.epwmDigitalCompare_useBlankingWindow                            = true;
    epwm5.epwmDigitalCompare_blankingWindowEvent                          = "EPWM_DC_WINDOW_START_TBCTR_ZERO";
    epwm5.epwmDigitalCompare_blankingWindowOffset                         = 576;
    epwm5.epwmDigitalCompare_blankingWindowLength                         = 84;
    epwm5.epwmDeadband_polarityFED                                        = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm5.epwmDeadband_enableRED                                          = true;
    epwm5.epwmDeadband_enableFED                                          = true;
    epwm5.epwmDeadband_outputSwapOutA                                     = true;
    epwm5.epwmDeadband_outputSwapOutB                                     = true;
    epwm5.epwmDeadband_controlShadowMode                                  = true;
    epwm5.epwmDeadband_redShadowMode                                      = true;
    epwm5.epwmDeadband_fedShadowMode                                      = true;
    epwm5.epwmEventTrigger_enableInterrupt                                = true;
    epwm5.epwmEventTrigger_interruptSource                                = "EPWM_INT_TBCTR_U_CMPD";
    epwm5.epwmEventTrigger_interruptEventCount                            = "1";
    epwm5.epwmEventTrigger_EPWM_SOC_A_triggerEnable                       = true;
    epwm5.epwmEventTrigger_EPWM_SOC_A_triggerSource                       = "EPWM_SOC_TBCTR_U_CMPC";
    epwm5.epwmEventTrigger_EPWM_SOC_A_triggerEventPrescalar               = "1";
    epwm5.useInterfacePins                                                = ["EPWM#A"];
    epwm5.copyUse                                                         = true;
    epwm5.copyFrom                                                        = "myEPWM6";
    epwm5.$name                                                           = "myEPWM8";
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_A_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_B_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_B_onetimeSwForceAction       = "EPWM_AQ_OUTPUT_HIGH";
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_LOW";
    epwm5.epwmDigitalCompare_EPWM_DC_TYPE_DCAL                            = "EPWM_DC_TRIP_TRIPIN7";
    epwm5.epwmDigitalCompare_EPWM_DC_TYPE_DCBL                            = "EPWM_DC_TRIP_TRIPIN7";
    epwm5.epwmDigitalCompare_EPWM_DC_MODULE_B_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm5.epwmDigitalCompare_EPWM_DC_TYPE_DCAH                            = "EPWM_DC_TRIP_TRIPIN11";
    epwm5.epwmDigitalCompare_EPWM_DC_TYPE_DCBH                            = "EPWM_DC_TRIP_TRIPIN11";
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_HIGH";
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_LOW";
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_HIGH";
    epwm5.epwmCounterCompare_cmpALink                                     = "EPWM_LINK_WITH_EPWM_6";
    epwm5.epwmCounterCompare_cmpB                                         = 599;
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPB        = "EPWM_AQ_OUTPUT_HIGH";
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPB        = "EPWM_AQ_OUTPUT_LOW";
    epwm5.epwmDeadband_delayFED                                           = 600;
    epwm5.epwmDigitalCompare_EPWM_TZ_DC_OUTPUT_A2                         = "EPWM_TZ_EVENT_DCXL_HIGH";
    epwm5.epwmDeadband_delayRED                                           = 18;
    epwm5.epwmTimebase_period                                             = 599;
    epwm5.epwmTimebase_phaseEnable                                        = true;
    epwm5.epwmTimebase_phaseShift                                         = 150;
    epwm5.epwm.$assign                                                    = "EPWM8";
    epwm5.epwm.epwmaPin.$assign                                           = "GPIO14";
    epwm5.epwm.epwmbPin.$assign                                           = "GPIO15";
    
    epwm6.$name                                                    = "myEPWM2";
    epwm6.epwmTimebase_period                                      = 6000;
    epwm6.epwmTimebase_counterMode                                 = "EPWM_COUNTER_MODE_UP";
    epwm6.epwmCounterCompare_cmpA                                  = 3000;
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO    = "EPWM_AQ_OUTPUT_HIGH";
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA = "EPWM_AQ_OUTPUT_LOW";
    epwm6.epwmTimebase_hsClockDiv                                  = "EPWM_HSCLOCK_DIVIDER_1";
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO    = "EPWM_AQ_OUTPUT_HIGH";
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPB = "EPWM_AQ_OUTPUT_LOW";
    epwm6.epwmTimebase_syncOutPulseMode                            = "EPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO";
    epwm6.epwmTimebase_emulationMode                               = "EPWM_EMULATION_FREE_RUN";
    epwm6.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZA                    = "EPWM_TZ_ACTION_LOW";
    epwm6.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZB                    = "EPWM_TZ_ACTION_LOW";
    epwm6.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT1                = "EPWM_TZ_ACTION_DISABLE";
    epwm6.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT2                = "EPWM_TZ_ACTION_DISABLE";
    epwm6.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT1                = "EPWM_TZ_ACTION_DISABLE";
    epwm6.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT2                = "EPWM_TZ_ACTION_DISABLE";
    epwm6.epwmCounterCompare_cmpB                                  = 2349;
    epwm6.epwm.$assign                                             = "EPWM2";
    
    epwm7.$name                                                           = "myEPWM5";
    epwm7.copyUse                                                         = true;
    epwm7.copyFrom                                                        = "myEPWM7";
    epwm7.epwmTimebase_emulationMode                                      = "EPWM_EMULATION_FREE_RUN";
    epwm7.epwmTimebase_hsClockDiv                                         = "EPWM_HSCLOCK_DIVIDER_1";
    epwm7.epwmTimebase_counterMode                                        = "EPWM_COUNTER_MODE_UP";
    epwm7.epwmCounterCompare_cmpB                                         = 599;
    epwm7.epwmCounterCompare_cmpC                                         = 181;
    epwm7.epwmCounterCompare_cmpD                                         = 300;
    epwm7.epwmActionQualifier_EPWM_AQ_OUTPUT_A_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm7.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_HIGH";
    epwm7.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA        = "EPWM_AQ_OUTPUT_LOW";
    epwm7.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_LOW";
    epwm7.epwmActionQualifier_EPWM_AQ_OUTPUT_B_shadowMode                 = true;
    epwm7.epwmActionQualifier_EPWM_AQ_OUTPUT_B_usedEvents                 = ["EPWM_AQ_OUTPUT_ON_T1_COUNT_UP"];
    epwm7.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO           = "EPWM_AQ_OUTPUT_LOW";
    epwm7.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPB        = "EPWM_AQ_OUTPUT_LOW";
    epwm7.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_T1_COUNT_UP             = "EPWM_AQ_OUTPUT_HIGH";
    epwm7.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm7.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCAEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm7.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT1                       = "EPWM_TZ_ACTION_DISABLE";
    epwm7.epwmTripZone_EPWM_TZ_ACTION_EVENT_DCBEVT2                       = "EPWM_TZ_ACTION_DISABLE";
    epwm7.epwmTripZone_cbcSource                                          = ["EPWM_TZ_SIGNAL_DCAEVT2"];
    epwm7.epwmDigitalCompare_EPWM_DC_MODULE_A_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm7.epwmDigitalCompare_EPWM_DC_MODULE_B_EPWM_DC_EVENT_2_eventSource = "EPWM_DC_EVENT_SOURCE_FILT_SIGNAL";
    epwm7.epwmDigitalCompare_dcFilterInput                                = "EPWM_DC_WINDOW_SOURCE_DCAEVT2";
    epwm7.epwmDeadband_polarityFED                                        = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm7.epwmDeadband_enableFED                                          = true;
    epwm7.epwmDeadband_delayFED                                           = 600;
    epwm7.epwmDeadband_outputSwapOutA                                     = true;
    epwm7.epwmDeadband_outputSwapOutB                                     = true;
    epwm7.epwmDeadband_redShadowMode                                      = true;
    epwm7.epwmDeadband_fedShadowMode                                      = true;
    epwm7.useInterfacePins                                                = ["EPWM#A"];
    epwm7.epwmDigitalCompare_EPWM_DC_TYPE_DCAH                            = "EPWM_DC_TRIP_TRIPIN12";
    epwm7.epwmDigitalCompare_EPWM_DC_TYPE_DCAL                            = "EPWM_DC_TRIP_TRIPIN8";
    epwm7.epwmDigitalCompare_EPWM_DC_TYPE_DCBH                            = "EPWM_DC_TRIP_TRIPIN12";
    epwm7.epwmDigitalCompare_EPWM_DC_TYPE_DCBL                            = "EPWM_DC_TRIP_TRIPIN8";
    epwm7.epwmTimebase_phaseEnable                                        = true;
    epwm7.epwmActionQualifier_EPWM_AQ_OUTPUT_A_shadowMode                 = true;
    epwm7.epwmDeadband_enableRED                                          = true;
    epwm7.epwmDeadband_delayRED                                           = 18;
    epwm7.epwmDeadband_controlShadowMode                                  = true;
    epwm7.epwmTimebase_period                                             = 599;
    epwm7.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZA                           = "EPWM_TZ_ACTION_LOW";
    epwm7.epwmTripZone_EPWM_TZ_ACTION_EVENT_TZB                           = "EPWM_TZ_ACTION_LOW";
    epwm7.epwmDigitalCompare_EPWM_TZ_DC_OUTPUT_A1                         = "EPWM_TZ_EVENT_DCXH_HIGH";
    epwm7.hrpwm_enable                                                    = true;
    epwm7.hrpwm_edgeModeA                                                 = "HRPWM_MEP_CTRL_RISING_AND_FALLING_EDGE";
    epwm7.hrpwm_edgeModeB                                                 = "HRPWM_MEP_CTRL_RISING_AND_FALLING_EDGE";
    epwm7.epwmCounterCompare_cmpA                                         = 540;
    epwm7.epwmTimebase_phaseShift                                         = 560;
    epwm7.epwm.$assign                                                    = "EPWM5";
    epwm7.epwm.epwmaPin.$assign                                           = "GPIO8";
    epwm7.epwm.epwmbPin.$assign                                           = "GPIO9";
    
    epwmxbar1.muxesUsed = ["XBAR_MUX07"];
    epwmxbar1.$name     = "DCHG_CS1_CMPSS4L_TRIP4";
    
    epwmxbar2.muxesUsed = ["XBAR_MUX05"];
    epwmxbar2.tripInput = "XBAR_TRIP5";
    epwmxbar2.$name     = "DCHG_CS2_CMPSS3L_TRIP5";
    
    epwmxbar3.muxesUsed = ["XBAR_MUX09"];
    epwmxbar3.tripInput = "XBAR_TRIP7";
    epwmxbar3.$name     = "DCHG_CS3_CMPSS5L_TRIP7";
    
    epwmxbar4.muxesUsed = ["XBAR_MUX11"];
    epwmxbar4.tripInput = "XBAR_TRIP8";
    epwmxbar4.$name     = "DCHG_CS4_CMPSS6L_TRIP8";
    
    epwmxbar5.tripInput = "XBAR_TRIP9";
    epwmxbar5.muxesUsed = ["XBAR_MUX06"];
    epwmxbar5.$name     = "DCHG_CS1_CMPSS4H_TRIP9";
    
    epwmxbar6.tripInput = "XBAR_TRIP10";
    epwmxbar6.$name     = "DCHG_CS2_CMPSS3H_TRIP10";
    epwmxbar6.muxesUsed = ["XBAR_MUX04"];
    
    epwmxbar7.tripInput = "XBAR_TRIP11";
    epwmxbar7.muxesUsed = ["XBAR_MUX08"];
    epwmxbar7.$name     = "DCHG_CS3_CMPSS5H_TRIP11";
    
    epwmxbar8.$name     = "DCHG_CS4_CMPSS6H_TRIP12";
    epwmxbar8.tripInput = "XBAR_TRIP12";
    epwmxbar8.muxesUsed = ["XBAR_MUX10"];
    
    gpio1.direction       = "GPIO_DIR_MODE_OUT";
    gpio1.$name           = "tFLASH_SPI_EN";
    gpio1.gpioPin.$assign = "GPIO99";
    
    gpio2.direction       = "GPIO_DIR_MODE_OUT";
    gpio2.$name           = "CFET_HOP";
    gpio2.gpioPin.$assign = "GPIO26";
    
    gpio3.direction       = "GPIO_DIR_MODE_OUT";
    gpio3.$name           = "DFET_HOP";
    gpio3.gpioPin.$assign = "GPIO27";
    
    gpio4.$name           = "MCU_SELF_TEST";
    gpio4.gpioPin.$assign = "GPIO30";
    
    gpio5.$name           = "FAN_PWR_LATCH";
    gpio5.gpioPin.$assign = "GPIO29";
    
    gpio6.$name           = "tAFE_ALARM1";
    gpio6.gpioPin.$assign = "GPIO31";
    
    gpio7.$name           = "tVPC_Check";
    gpio7.gpioPin.$assign = "GPIO32";
    
    gpio8.direction       = "GPIO_DIR_MODE_OUT";
    gpio8.$name           = "EE_WP";
    gpio8.gpioPin.$assign = "GPIO33";
    
    gpio9.$name           = "t2nd_DET";
    gpio9.gpioPin.$assign = "GPIO37";
    
    gpio10.$name           = "tCFuse_DET";
    gpio10.gpioPin.$assign = "GPIO38";
    
    gpio11.direction       = "GPIO_DIR_MODE_OUT";
    gpio11.$name           = "tFuse_Check_BATT";
    gpio11.gpioPin.$assign = "GPIO39";
    
    gpio12.$name           = "AFE_SHDN";
    gpio12.direction       = "GPIO_DIR_MODE_OUT";
    gpio12.gpioPin.$assign = "GPIO41";
    
    gpio13.$name           = "VPC_SW";
    gpio13.direction       = "GPIO_DIR_MODE_OUT";
    gpio13.gpioPin.$assign = "GPIO49";
    
    gpio14.$name           = "tPOR_LED";
    gpio14.direction       = "GPIO_DIR_MODE_OUT";
    gpio14.gpioPin.$assign = "GPIO50";
    
    gpio15.$name           = "TH_SW";
    gpio15.direction       = "GPIO_DIR_MODE_OUT";
    gpio15.gpioPin.$assign = "GPIO51";
    
    gpio16.$name           = "PF_FUSE";
    gpio16.direction       = "GPIO_DIR_MODE_OUT";
    gpio16.gpioPin.$assign = "GPIO53";
    
    gpio17.$name           = "FUSE_DET_BUS";
    gpio17.gpioPin.$assign = "GPIO54";
    
    gpio18.$name           = "Protect_HIP";
    gpio18.gpioPin.$assign = "GPIO55";
    
    gpio19.$name           = "BMS_OVP_HIP";
    gpio19.gpioPin.$assign = "GPIO56";
    
    gpio20.$name           = "BMS_UVP_HIP";
    gpio20.gpioPin.$assign = "GPIO57";
    
    gpio21.$name           = "BMS_OCP_HIP";
    gpio21.gpioPin.$assign = "GPIO58";
    
    gpio22.$name           = "BMS_SCP_HIP";
    gpio22.gpioPin.$assign = "GPIO59";
    
    gpio23.$name           = "BUS_OVP_HIP";
    gpio23.gpioPin.$assign = "GPIO60";
    
    gpio24.$name           = "BUS_UVP_HIP";
    gpio24.gpioPin.$assign = "GPIO61";
    
    gpio25.$name           = "BUS_OCP_HIP";
    gpio25.gpioPin.$assign = "GPIO64";
    
    gpio26.$name           = "BUS_SCP_HIP";
    gpio26.gpioPin.$assign = "GPIO65";
    
    gpio27.direction       = "GPIO_DIR_MODE_OUT";
    gpio27.$name           = "UNLOCK_UVP_HOP";
    gpio27.gpioPin.$assign = "GPIO66";
    
    gpio28.$name           = "UNLOCK_SYS_HOP";
    gpio28.direction       = "GPIO_DIR_MODE_OUT";
    gpio28.gpioPin.$assign = "GPIO44";
    
    gpio29.$name             = "PWM_EN_LOP";
    gpio29.direction         = "GPIO_DIR_MODE_OUT";
    gpio29.writeInitialValue = true;
    gpio29.initialValue      = 1;
    gpio29.gpioPin.$assign   = "GPIO45";
    
    gpio30.direction       = "GPIO_DIR_MODE_OUT";
    gpio30.$name           = "SYS_DCDC_EN";
    gpio30.gpioPin.$assign = "GPIO133";
    
    gpio31.$name           = "tRTC_INT";
    gpio31.gpioPin.$assign = "GPIO46";
    
    gpio32.$name           = "MCU_Boot_1_Reserved";
    gpio32.gpioPin.$assign = "GPIO72";
    
    gpio33.$name           = "tShortpin_DET";
    gpio33.gpioPin.$assign = "GPIO80";
    
    gpio34.$name           = "MCU_Boot_0_Reserved";
    gpio34.gpioPin.$assign = "GPIO84";
    
    gpio35.direction       = "GPIO_DIR_MODE_OUT";
    gpio35.$name           = "BKPWM_EN_HOP";
    gpio35.masterCore      = "GPIO_CORE_CPU1_CLA1";
    gpio35.gpioPin.$assign = "GPIO85";
    
    gpio36.direction         = "GPIO_DIR_MODE_OUT";
    gpio36.writeInitialValue = true;
    gpio36.masterCore        = "GPIO_CORE_CPU1_CLA1";
    gpio36.$name             = "C2000_Update_Ready";
    gpio36.gpioPin.$assign   = "GPIO88";
    
    gpio37.direction       = "GPIO_DIR_MODE_OUT";
    gpio37.$name           = "C2000_PRE";
    gpio37.gpioPin.$assign = "GPIO89";
    
    gpio38.direction       = "GPIO_DIR_MODE_OUT";
    gpio38.$name           = "C2000_SW";
    gpio38.gpioPin.$assign = "GPIO90";
    
    gpio39.$name             = "PRE_CHG_HOP";
    gpio39.direction         = "GPIO_DIR_MODE_OUT";
    gpio39.writeInitialValue = true;
    gpio39.gpioPin.$assign   = "GPIO21";
    
    gpio40.$name           = "AUX_LATCH_HOP";
    gpio40.direction       = "GPIO_DIR_MODE_OUT";
    gpio40.gpioPin.$assign = "GPIO28";
    
    gpio41.$name           = "IDLE_or_RUN";
    gpio41.gpioPin.$assign = "GPIO7";
    
    gpio42.$name           = "Buck_or_Boost";
    gpio42.gpioPin.$assign = "GPIO92";
    
    gpio43.direction       = "GPIO_DIR_MODE_OUT";
    gpio43.$name           = "debug_pin";
    gpio43.gpioPin.$assign = "GPIO93";
    
    gpio44.$name           = "debug_pin_164";
    gpio44.direction       = "GPIO_DIR_MODE_OUT";
    gpio44.masterCore      = "GPIO_CORE_CPU1_CLA1";
    gpio44.gpioPin.$assign = "GPIO4";
    
    i2c1.$name              = "myI2C0";
    i2c1.i2c.$assign        = "I2CB";
    i2c1.i2c.sdaPin.$assign = "GPIO34";
    i2c1.i2c.sclPin.$assign = "GPIO35";
    
    i2c2.$name              = "myI2C1";
    i2c2.i2c.sdaPin.$assign = "GPIO42";
    i2c2.i2c.sclPin.$assign = "GPIO43";
    
    outputxbar1.$name                            = "myOUTPUTXBAR0";
    outputxbar1.muxesUsed                        = ["XBAR_MUX06"];
    outputxbar1.outputxbar.$assign               = "OUTPUTXBAR1";
    outputxbar1.outputxbar.outputxbarPin.$assign = "GPIO24";
    
    outputxbar2.$name                            = "myOUTPUTXBAR1";
    outputxbar2.muxesUsed                        = ["XBAR_MUX07"];
    outputxbar2.outputxbar.$assign               = "OUTPUTXBAR2";
    outputxbar2.outputxbar.outputxbarPin.$assign = "GPIO25";
    
    sci1.$name                    = "mySCI0";
    sci1.baudRates                = 19200;
    sci1.parity                   = "SCI_CONFIG_PAR_EVEN";
    sci1.registerInterrupts       = true;
    sci1.enabledErrorInterrupts   = ["SCI_INT_FE","SCI_INT_OE","SCI_INT_PE","SCI_INT_RXERR"];
    sci1.enabledFIFOInterrupts    = ["SCI_INT_RXFF","SCI_INT_TXFF"];
    sci1.txFifo                   = "SCI_FIFO_TX8";
    sci1.rxFifo                   = "SCI_FIFO_RX1";
    sci1.sci.$assign              = "SCIB";
    sci1.sci.scirxdPin.$assign    = "GPIO71";
    sci1.sci.scitxdPin.$assign    = "GPIO70";
    sci1.sciRXInt.enableInterrupt = true;
    sci1.sciTXInt.enableInterrupt = true;
    
    sync.syncOutLock       = true;
    sync.epwm7SyncInSource = "SYSCTL_SYNC_IN_SRC_EPWM4SYNCOUT";
    
    /**
     * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
     * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
     * re-solve from scratch.
     */
    epwm4.epwm.$suggestSolution          = "EPWM1";
    epwm6.epwm.epwmaPin.$suggestSolution = "GPIO2";
    epwm6.epwm.epwmbPin.$suggestSolution = "GPIO3";
    i2c2.i2c.$suggestSolution            = "I2CA";
    

    Best Regards,

    Ryan Hung

  • Hi Ryan, no worries- thanks for attaching the new sysconfig. Could you please confirm that in that .syscfg you are looking at the behavior of "myEPWM6", and the HRPWM you are trying to use for the trip is "myEPWM1". You have 7 instances of EPWM in that file and the names have been changing, so I want to be sure I'm looking at the 2 that are pertinent to this thread.

    Best Regards,

    Allison

  • Dear Allison,

    1. myEPWM6 refers to PWM6 (GPIO10 and 11), which is the waveform I shared a few days ago.

    2. T1 event is from HRPWM5 A (myEPWM5, GPIO8 ) → CMPIN4P → CTRIPH(ASYNC) → X-bar → TRIPIN9 → ePWM DC module → DCAEVT1.

    Best Regards,

    Ryan Hung 

  • Hi Ryan,

    HRPWM5 A (myEPWM5, GPIO8 )

    Maybe it was renamed somehow as there was no "myEPWM5" on the last .syscfg you sent, hence a bit of confusion there.

    Also an update on what we've been working on so far: Our program has 2 EPWMs (EPWM1 and EPWM2) representing your2 PWM signals. We've stripped out other modules since they are not necessary here and any extra EPWM settings. With this, we have been testing to see if we can get the 4ns resolution you want, but so far cannot. At the moment it looks like this is a logic limitation of the action qualifier module.

    Our EPWM2 has HR capability and is being used as T1 for EPWM1. We are able to see small edge adjustments on EPWM2, but EPWM1 can only respond in larger resolution. We need to do some more testing to understand why the jump is so large, but a another step we are also going to try tomorrow is implementing HR capabilities on EPWM1 to see if that allows for finer edge adjustment in response to EPWM2 changes. I should note that right now we are just using CMPAHR to adjust the edge of EPWM2 as the simplest case. 

    In the mean time, could you let us know what dividers you are setting to get 60MHz EPWMCLK and if you have any other findings on your end? I will update you tomorrow on our results with both EPWMs using HRPWM capability. Thanks again for your patience here.

    Best Regards,

    Allison

  • Hi Ryan, 

    To update, we are still working on testing with both HR configurations. We are seeing some added delay in our setup at the moment, so we are still looking into reducing that as well. (As for the EPWMCLK question I asked earlier, I will just assume you have the usual divider of 2 from SYSCLK 120MHz to get 60MHz). I will provide an update again once we are able to gather results from the HRx2 setup.

    Best Regards,

    Allison

  • Dear Allison,

     

    Please check EPWMCLK setting below.

    Best Regards,

    Ryan Hung

     

  • Hi Ryan,

    I was able to gather some other expertise input here and unfortunately the EPWM AQ module cannot support finer granularity (HR-level) than what you are seeing with the EPWMCLK period. There is logic in the Action Qualifier submodule that requires clocking, so the actions must occur accordingly. The Trip Zone would be the best way to implement what you are trying to do, though I know this is conflicting with other trips you need to drive both channels low.

    I realize this is a big limitation to your application, so I also want to take this opportunity to ask if you could explain more context of why you need this specific case to drive your EPWMA/B high and low in reaction to an external signal with such fine resolution (I know you explained a bit of the context earlier, but I'd like to understand the system importance a bit better). The reason I ask is because if there is a big enough need here, there is always a possibility we can try adding this feature into future designs. 

    Thanks again for your patience and willingness to work through this. And please let me know if you have any other feedback on usability of EPWM/HRPWM module in SysConfig as well - we are always trying to improve the ease-of use there.

    Best Regards,

    Allison