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.

TMDSDOCK28379D: create a PWM signal with a period of 250 ns and an ON period of 100µs and an OFF period of 100µs

Part Number: TMDSDOCK28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hello,

I am looking for a solution to configure a PWM1 signal with a period of 250 ns. I want this signal to be active for 100µs and then deactivated for 100µs in a loop (an example is added at the bottom of the message). I've tried using a TripZone on a PWM2 signal with a period of 200µs with 100µs ON, but the solution isn't viable because the period of PWM1 varies by up to 10µs. Do you have any ideas on how to solve this problem with Event trigger, Cpu Timer ...?

Thank you in advance

Florentin.

  • Hi Florentin,

    I would normally recommend the trip zone for this - can you elaborate on the specific issue with this?

    Another thought is perhaps you can use the EPWM with 200us period (100us on and 100us off) but then use the chopper module on top of that to generate the desired frequency during "on" time. Please take a look at the description in the TRM (15.8 PWM Chopper (PC) Submodule) and the register descriptions/value options (15.15.2.11 PCCTL Register)  to see if this seems like a viable solution. 

    Best Regards,

    Allison

  • Hello,tnaks you for your response. I don't think chopper it's a viable solution for ma project. I want to use the HRPWM function and vary the frequency with precise values.

    With the Trip Zone, I have an offset between the PWM2 signal with a period of 200µs and the PWM1 signal with a period of 250ns that is only a few µs (from 1µs to 250 ns).

  • Hi Florentin,

    Thanks for the response. For HRPWM if you are varying the frequency, you will want to utilize TBPRDHR. We have an HRPWM period control software example in C2000Ware located at {C2000Ware}\driverlib\f2837xd\examples\cpu1\hrpwm\hrpwm_ex3_prd_updown_sfo. We also have descriptions on this in the TRM (particularly, 15.14.1.5.4 High-Resolution Period and 15.14.1.5.4.1 High-Resolution Period Configuration). Let me know if this is a viable solution for you.

    Best Regards,

    Allison