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.

CCS/TMS320F28069M: Timer to read pwm duty cycle?

Part Number: TMS320F28069M
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi,

I have been searching various forums with no good results here.

I am using the F28069 in a project where I need to read input PWM as from a regular RC-controller. Since we have a lot of other processes going on in the code I would like to do this using one or more timers, if possible. There are various examples of using the timer for outputting a PWM-signal. But not on how to read an incoming PWM duty cycle. I really just need some getting started input to move forward with this myself, if anyone could help me getting this started. 

Thanks!

  • The best way to capture incoming PWM timings is to use either a CAP module or a HRCAP module.  The F28069 has both.

    If you have downloaded C2000Ware in the default location, an example showing how to configure a CAP module to measure PWM can be found at:

    C:\ti\c2000\C2000Ware_2_00_00_03\device_support\f2806x\examples\c28\ecap_capture_pwm

    There are other examples for the HRCAP.  For further details on the capture module, see chapter 6 (especially 6.6) of the TRM:

    http://www.ti.com/lit/ug/spruh18h/spruh18h.pdf

    Regards,

    Richard