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.
I would like to synchronize four ePWM modules (ePWM1,2,3 and 4) with an external signal connected on GPIOx (which pin not important). From my understanding of the TRM, I should route the GPIO pin to InputXBar5 and then select EPWMSYNCINSEL = 0x18 for each PWM Module. I should also disable the SYNCO for ePWM1,2,3,4 and enable phase load on TBCTL.bit.PHSEN. Now the thing is that I did this, but i do not get the expected behaviour, as apparently the SYNC signal has no effect on the ePWMs.... could you maybe provide an simple working example of the appropriate configuration?
cheers,
Roberto.
The process would be:
1. Configure GPIOx as input.
2. Configure Input XBAR to point INPUT5 to GPIOx
3. Configure EPWMx.EPWMSYNCINSEL = INPUT XBAR5
4. Enable PHSEN for EPWMx
5. Set TBPHS for EPWMx to your desired value
6. Run your EPWM
Nima
Hi Nima,
thanks for the reply! It tourns out that the problem was with the Simulink generated code. The Support Package does not configure the EPWMSYNCINSEL register and to make it worst, due to a problem with the handshake over IPC with CPU2, the InputXbar was being reset after initialization. Thanks anyway for the help!