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.

UCD3138: DPWM does not start if external sync is enabled and external clock not provided

Part Number: UCD3138

Hello,

In my tests I have verified that if I have EXT_SYNC_IN enabled in a pwm module, the module will not produce PWM until a sync signal is present. Once the synchronization signal is provided, the PWM module operates. If the synchronization signal is removed, the PWM module keeps working at the frequency set by DPWMPRD register.

My question is this: is there an option to have the PWM module operate since the beginning even without synchronization signal? (at its own switching frequency of DPWMPRD). I have not found info regarding this feature of the PWM module not working, waiting for the sync signal.

In summary, if EXT_SYNC_IN is enabled:

- no external clock provided: DPWM does not start

- external clock provided: DPWM at external clock frequency

- external clock removed: DPWM keeps working but at its frequency defined by DPWMPRD

Is it possible to have this behavior instead:

- no external clock provided: DPWM works at its frequency defined by DPWMPRD

- external clock provided: DPWM at external clock frequency

- external clock removed: DPWM keeps working but at its frequency defined by DPWMPRD

Thank you

Marco

  • Marco, I hadn't ever heard of this issue.  I've tried using the lab program, and I see the same thing.  I think it's probably a feature, not a bug.

    If you set the EXT_SYNC_EN bit before doing the global enable of the DPWMs, it will wait for an external sync edge before it starts.

    So if you want it to wait, do it that way.  However, if you set the EXT_SYNC_EN bit just after the global enable - I used the next line of C code - it will start up without an external sync.

  • Thank you Ian,

    yes, I am doing what you suggested as a workaround.

    As a feature, it should have probably shutdown the pwm when the external clock is removed. Having the possibility of chose the behavior would have been the best of both worlds

    Thank you