🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

PSIM Sim Coder F28004x Target - ePWM EXTSYNCINx configuration

User: "Denys Ovsiyenko_21270"
New Altair Community Member
Updated by Denys Ovsiyenko_21270

Hi all, 

I am using the TMS320F280049C control board along with TMDSHSECDOCK to do some testing . I am using the Sim Coder and the code generation functions that PSIM provides for F28004x Target.

I need a specific feature of F280049C which is synchronization to an external signal. I would first need to use Input X-Bar to input the external signal that I want to sync to and secondly, configure the ePWM1 sync input to be either EXTSYNCIN1 or EXTSYNCIN2. These features are described in the control board datasheet, however, I am not able to find a way to configure the second step using PSIM Sim Coder F28004x Target blocks. 

Has anyone faced this problem before? 

I look forward for your replies. 

Thanks, 

Denys

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Albert_Dunford"
    Altair Employee
    Accepted Answer
    Updated by Albert_Dunford

    Hi Denys,

    The simulation unfortunately will not show the sync as you need to add some code manually. If you want to recreate the synch in simulation you will have to have a simulation that does not have code gen.

    2 simulations are attached. one that drives a square wave and the other with the sync setup using the xbar

    Do the following

    1. Add an input X_Bar block to the schematic and set INPUT5 to GPIO2 (can be any GPIO port).

    image

    1. Add a PWM X-Bar block in the schematic and select INPUTXBAR5 as PWM X-Bar signal.

    image

    1. Generate the hardware code and manually add the following function call (PS_PwmSetPhaseDelay)just after PWM1's initialization function call (PS_PwmInit).

    image

     

    The attached 2 schematics works fine on hardware boards, see the waveforms below:

    image