i am using TMS320F28377SPZPT.
i want to syncronize 2 PWM signals which are on different boards. i am using EPWM7A on these boards.
There is not EXTSYNCOUT and EXTSYNCIN pins on this TMS320F28377SPZPT. So i try to use XBar for sync of PWM signals but it does not work. i try to find why..i am using GPIO 62 for Xbar.
you can see on picture reference PWM which means i am using this PWM for syncronization, and pwm output of my board is one of my boards PWM out.
my code is,
GPIO_SetupPinMux(62, GPIO_MUX_CPU1, 0);
GPIO_SetupPinOptions(62, GPIO_INPUT, GPIO_PULLUP);
EPwm7Regs.TBPRD = 1666;
EPwm7Regs.TBPHS.bit.TBPHS = 0;
EPwm7Regs.TBCTR = 0x0000;
EPwm7Regs.TBCTL.bit.CTRMODE = TB_COUNT_UPDOWN;
EPwm7Regs.TBCTL.bit.PHSEN = TB_ENABLE;
EPwm7Regs.TBCTL.bit.PRDLD = CC_SHADOW;
EPwm7Regs.TBCTL.bit.SYNCOSEL = TB_SYNC_IN;
EPwm7Regs.TBCTL.bit.HSPCLKDIV = TB_DIV1;
EPwm7Regs.TBCTL.bit.CLKDIV = TB_DIV1;
EPwm7Regs.TBSTS.bit.SYNCI = 1;
EPwm7Regs.CMPCTL.bit.SHDWAMODE = CC_SHADOW;
//EPwm7Regs.CMPCTL.bit.SHDWBMODE = CC_SHADOW;
EPwm7Regs.CMPCTL.bit.LOADAMODE = CC_CTR_ZERO;
// EPwm7Regs.CMPCTL.bit.LOADBMODE = CC_CTR_ZERO;
EPwm7Regs.AQCTLA.bit.CAU = AQ_SET;
EPwm7Regs.AQCTLA.bit.CAD = AQ_CLEAR;