Tool/software: Code Composer Studio
Hi All,
I'm working on paralleling two or more inverters.
Here I'm trying to synchronize the PWM generated by two control cards. Following the Manual of TMS320F28379D, one device act as master to send the syncout signal to the slave one through GPIO. The ePWM module in the slave device will receive the synchronizing signal through GPIO15 which can be selected from INPUT5. The INPUT5 will be the SYNCIN source in ePWM module.
The related codes are as follows,
Master:
//***********Main codes in EPWM***********************
EPwm1Regs.TBCTL.bit.SYNCOSEL = TB_CTR_ZERO;
SyncSocRegs.SYNCSELECT.bit.SYNCOUT = 0; //EPWM1SYNCOUT
//*****************GPIO****************************
GpioCtrlRegs.GPAPUD.bit.GPIO6 = 0; // Enable pullup resistor
GpioCtrlRegs.GPAMUX1.bit.GPIO6 = 3; // Set GPIO6 to SYNCOUT
GpioCtrlRegs.GPADIR.bit.GPIO6 = 1; // set as output
============================================
Slave:
//***********Main codes in EPWM***********************
EPwm4Regs.TBSTS.bit.SYNCI = 1;
EPwm4Regs.TBCTL.bit.SYNCOSEL = TB_SYNC_IN;
SyncSocRegs.SYNCSELECT.bit.EPWM4SYNCIN = 5; // SYNCIN Source: EXTSYNCIN1
EPwm4Regs.TBCTL.bit.PHSEN = TB_ENABLE;
EPwm4Regs.TBPHS.bit.TBPHS = 1;
//*************************GPIO****************************
InputXbarRegs.INPUT5SELECT = 0x15; // Connect INPUT5 to GPIO15
GpioCtrlRegs.GPAPUD.bit.GPIO15 = 0; // Enable pullup resistor
GpioCtrlRegs.GPAMUX1.bit.GPIO15= 0; // Set GPIO15
GpioCtrlRegs.GPADIR.bit.GPIO15 = 0; // set as input
====================================================
I observed the GPIO6 in GPADAT register and it shows 0. It seems the SYNCOUT didn't transfer the signal to the output of master device, which command is missing?
Thanks.