    1#include "F2837xD_device.h"

    2#include "F2837xD_Examples.h"

    3#include "F2837xD_GlobalPrototypes.h"

    4#include "rtwtypes.h"

    5#include "Inverter_001.h"

    6#include "Inverter_001_private.h"

    7

    8void config_ePWM_GPIO (void)

    9{

    10  EALLOW;

    11  ClkCfgRegs.PERCLKDIVSEL.bit.EPWMCLKDIV = 1;

    12

    13  /*-- Configure pin assignments for ePWM5 --*/

    14  GpioCtrlRegs.GPAGMUX1.bit.GPIO8 = 0;

    15  GpioCtrlRegs.GPAMUX1.bit.GPIO8 = 1;  /* Configure GPIOGPIO8 as EPWM5A*/

    16  GpioCtrlRegs.GPAGMUX1.bit.GPIO9 = 0;

    17  GpioCtrlRegs.GPAMUX1.bit.GPIO9 = 1;  /* Configure GPIOGPIO9 as EPWM5B*/

    18

    19  /*-- Configure pin assignments for ePWM3 --*/

    20  GpioCtrlRegs.GPAGMUX1.bit.GPIO4 = 0;

    21  GpioCtrlRegs.GPAMUX1.bit.GPIO4 = 1;  /* Configure GPIOGPIO4 as EPWM3A*/

    22  GpioCtrlRegs.GPAGMUX1.bit.GPIO5 = 0;

    23  GpioCtrlRegs.GPAMUX1.bit.GPIO5 = 1;  /* Configure GPIOGPIO5 as EPWM3B*/

    24

    25  /*-- Configure pin assignments for ePWM6 --*/

    26  GpioCtrlRegs.GPAGMUX1.bit.GPIO10 = 0;

    27  GpioCtrlRegs.GPAMUX1.bit.GPIO10 = 1; /* Configure GPIOGPIO10 as EPWM6A*/

    28  GpioCtrlRegs.GPAGMUX1.bit.GPIO11 = 0;

    29  GpioCtrlRegs.GPAMUX1.bit.GPIO11 = 1; /* Configure GPIOGPIO11 as EPWM6B*/

    30

    31  /*-- Configure pin assignments for ePWM4 --*/

    32  GpioCtrlRegs.GPAGMUX1.bit.GPIO6 = 0;

    33  GpioCtrlRegs.GPAMUX1.bit.GPIO6 = 1;  /* Configure GPIOGPIO6 as EPWM4A*/

    34  GpioCtrlRegs.GPAGMUX1.bit.GPIO7 = 0;

    35  GpioCtrlRegs.GPAMUX1.bit.GPIO7 = 1;  /* Configure GPIOGPIO7 as EPWM4B*/

    36

    37  /*--- Configure pin assignments for TZn ---*/

    38  EDIS;

    39}

    40