Tool/software:
Hi Champ,
I am asking for my customer.
In Time-Base Period Shadow Mode, the shadow register contents are transferred to the active register (TBPRD (Active) ← TBPRD (shadow)) when the time-base counter equals zero (TBCTR = 0x00) and/or a sync event.
In current PWM cycle, up-down mode, TBPRD is initially given with 100 for example. Then, update the new TBPRD value (TBPRD = 200) at a sync event take places at TBPRD = 100.
(1). In this current PWM cycle, the TBCTR would still ONLY count to TBPRD = 100 then count down, right ? Won't count to new updated TBPRD = 200 in this current cycle since it misses the updated point when TBPRD shadow to active takes place.
(2). If customer wants to have TBPRD updated with new value 200 in current PWM cycle, at least how many TBCLK the sync event should take place ahead TBCTR reaches to current PWM cycle TBPRD = 100 ? Is considering 2 TBCLK delay for SYNCIN pulse + 1 EPWM clock cycle to write to the active register (shadow → active) be enough ?
Thanks and regards,
Johnny