Tool/software: Code Composer Studio
Hi,
I'm working on a basic stepper motor drive. I read all the topics on this forum (about this subject :) ). I 'm looking for a method on how to change register TBPRD of EPWM1 when... My EPWM1 is configured and synchronized with other EPWMs by ECAP with XBAR (it's working great) and driving the CLA task. EPWM1 configurations: up-down count mode, at zero PRD, generates an interrupt and starts the CLA task1. In this task, I'm going to give pulses and change EPWM frequency. My problem is how to change the frequency od PWM after for example 5 impulses.
I read that there are some shadow TBPRD registers, can I use it for that purpose? Also, I read that I can reload the TBPRD register when EPWM is disabled, change frequency and enable, what do you think?
Could you help me with how to do it? I'm concerned about finding the best possible method.
Best Regards,
Serafin