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.

UCD3138A: UCD3138A DPWM mode change

Part Number: UCD3138A

Dear TI,

I  have a question about DPWM configuration.

 First DPWM0A duty came from CLA  in normal mode to run, but next period (about 7us) I want to set DPWM0A to 50% duty of open loop, not related to CLA.

It seems that there is no such hardware connection to change DPWM?

Is there possible to implement this cofiguration within a period? how to achieve it?

Best Wishes

LEI

  • If you set both Hi and Lo CLA clamps, you can get open loop 50% duty.
  • What do you want to do after, you want to go back to closed loop after a single switching cycle?
    How about doing this after 4 switching cycles?
    You could use DPWM end of period interrupt to switch, but it is hard to do this in a single switching cycle.
    If you set both Hi and Lo CLA clamps to the same value that presents 50%, you will be in open loop 50%.
    What is your switching frequency?

  • DPWM0A Duty cycle came form CLA run for a while , then DPWM0A run in a fixed duty of open loop for a while, Alternately in turn.
    External signal trigger the change of Open and closed loop.
    switching frequency is 200kHz.
    Can it be achieve?
  • Could you please be more specific about the timing?
    How long (min) it stays in open loop? How long (min) it stays in closed loop?
    What is the max acceptable latency between the time the external trigger toggles, till the switching beween open loop (OL) and CL happens?

  • Switching period is 200kHz,

    CLA output connect to  DPWM0A and DPWM1A, so the duty of DPWM0A and DPWM1A are same.

    Always keep DPWM0A closed loop.

     but DPWM1A stays 10 period in closed loop same with DPWM0A,  then change to open loop, keep 2 -5 period for 50% duty.  then go back to closed loop again( same with DPWM0A).

    When external signal triggers, I wish DPWM1A change to open loop within a period.

    Thanks a lot.

    Can't it post picture, I can draw a sample sequence diagram。

  • If both DPWM0 and DPWM1 are connected to the same CLA, then use of Clamps to force 50% duty only to DPWM1 will not work.
    Here is what you could do. Configure and stall(freeze) a second spare filter(CLA) to output 50% duty cycle all the time.
    Then switch the DPWMs between the Closed loop filter(CLA) and the frozen one. This can be done by DPWM0_FILTER_SEL in the DPWMMUX register.

    What is left is how to trigger this change.
    I would suggest that you connect your external trigger signal to one of the pins that can generate an interrupt (for example a fault pin, or EXT_INT pin). Then map this interrupt source to trigger the fast interrupt using write_reqmask( ) and write_firqpr( ) functions.
    The switching between the filters should be implemented inside the fast interrupt service routine (ISR).

    Hope this helps.
  • First, Thanks a lot for you clear reply.

    In this way, the rising time of both DPWM0A and DPWM1A are same when DPWM0A switch to open loop  50% duty cycle and change back?

    I hope DPWMIA  is synchronized with DPWM0A ,they both have same period and Rising time,even sometimes  different duty.

    Best Wishes

    LEI

  • Yes. You can sync two DPWMs internally in a master/slave fashion, so they always start at the same time.
    Have DPWM0 as a master and DPWM1 to be a slave of DPWM0. Also set the value of Event1 the same on both DPWMs.
  • Dear Yitzhak Bolurian,

    Thanks a lot for you help.

    Bese Wishes