Part Number:TMS320F28388D
如题,想通过输入类型的GPIO88,然后经过InputXbar然后到EpwmXbar然后通过Trip4到ePwmModules,发现怎么都触发不了:
CPU1配置Xbar:
EALLOW;
InputXbarRegs.INPUT12SELECT = 88;
EPwmXbarRegs.TRIP4MUXENABLE.BIT.MUX27 = 1;
EPwmXbarRegs.TRIP4MUX16TO31CFG.BIT.MUX27 = 1;
EPwmXbarRegs.TRIPOUTINV.BIT.TRIP4 = 1;
EDIS;
cpu2配置触发信号:
EALLOW;
EPwm1Regs.TZSEL.BIT.DCAEVTA =1;
EPwm1Regs.DCTRIPSEL.BIT.DCALCOMPSEL = 4;
EPwm1Regs.TZDCSEL.BIT.DCAEVT1 = 3;//GPIO低电平触发
EPwm1Regs.DCACTL.BIT.EVT1SRCSEL = 0;
EPwm1Regs.DCACTL.BIT.EVT1FRCSYNCSEL = 1;
EPwm1Regs.DCACTL.BIT.EVT1LATSEL = 0;
EPwm1Regs.TZCTL.BIT.DCAEVT1 = 1;
EPwm1Regs.TZCTL2.BIT.ETZE= 0;
EPwm1Regs.TZCTL.BIT.TZA = 1;
EPwm1Regs.TZCTL.BIT.TZB = 1;
EDIS;
gpio88已经配置好上拉,在仿真上可以看到信号正常翻转了,但是在EPwm1Regs.TZOSTFLG.BIT.DCAEVT1一直是0,也就是说没有触发到事件。我想问一下我上面的配置有问题吗?我用TZ3直接触发OST1是没有问题的,现在用上epwmXbar做转接不知道那出错了,也没能找到相关例程,希望大神门指教一下
Green Deng:
你好,抱歉对PWM-xbar不太熟悉,我将你的问题升级到英文E2E了,还请留意以下帖子中工程师的回复:https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1029306/tms320f28388d-application-of-epwm-xbar
,
user4486550:
没关系,如果有这方面的例程最好