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 have an application where I may (or may not) have an external clock timing a control loop. Ideally, the loop will be controlled (synchronized) to an external clock at 2kHz (connected to XINT1). If this input is missing, then I need to 'free run' at 2kHz (TIMER1 for instance).
Should I be considering using one of the EPWMs instead of timer 1? I know the EPWMs can be synchronized with external inputs but I'm not sure how well this would work out since it seems to me that my PWM frequency would need to be set to the lower limit. In other words the external clock would need to always be a higher frequency than the PWM frequency.
I am assuming my external clock (if available) will be 2kHz (+/-10Hz).
Bob
I think the ePWM module can easily generate the 2kHz clock signal for you. It can definitely be synchronized externally with a SYNCIN signal as well.
I agree, but it seems to me that I would only be able to 'speed up' the ePWM with my external clock. For instance if my external ePWM is set to 2Khz and my actual external clock happens to be 1.9kHz (I'm exaggerating) then what is going to happen? Won't I get an extra 'edge' on my clock because the ePWM is running faster? Maybe I'm not understanding how the SYNCIN works?
Bob
SYNCIN is just signal that is mean to be used as a one time per X amount of EPWM cycles that synchronizes your EPWM timebase. Starting it over from ZERO or specific phase value.