Part Number: TMS320F28379D
Hi,
I'm trying to measure a PWM signal with the enhanced capture module. The module seems perfectly adapted to measure an external PWM signal. However there's a catch. In my case, it is possible that the PWM will have its duty cycle stuck to 0% or 100%. Is there an easy way to work around this limitation?
My solution so far would be to use an eCap module and use an interrupt every 4 events (rising edge, falling edge, RE, FE). When this interrupt occurs, I would use a free-running counter to register the timestamp. Then, in my main loop, I would use the timestamp to see if the PWM measurement is still being updated. If it's not, I would flag it as the duty cycle being stuck on 0% or 100%.
Are there better solutions?