I am changing the PWM prescaler in real time to generate a variable frequency PWM signal on the DSP 28379D to implement a model of a PickUp. However, I noticed that this change is causing discontinuities in the PWM signal generation transition. This is happening because I cannot update the prescaler at the beginning of the period. I believe that it always updates immediately and I couldn't find any register that could help me with this. What could be done?
When I change the prescaler generic from 1 to 14, it seems that there is a moment when it disables the PWM. Is this a normal behavior of the ePWM module? The figure bellow show the moment that i change 1 to 14 div clock.
#define PWM_CLOCK_GENERIC_PRESCALE_1 0x0
#define PWM_CLOCK_GENERIC_PRESCALE_14 0x7