2023-09-08 08:26 AM
Hello. I want to use triple interleaved mode in HRTIM. I made the settings as in the images. The frequency of PWM will be 16khz. For this setting, I set the "period" to 42500. Therefore, the "TimerA Compare1" value can be maximum 14166 (42500/3), the "TimerB Compare1" value can be 28333 and the "TimerC Compare1" value can be maximum 42500. I can observe the PWM outputs and it works as I want. But there are 2 problems.
Problem1:
hhrtim1.Instance->sTimerxRegs[0].CMP1xR =0;
hhrtim1.Instance->sTimerxRegs[1].CMP1xR = 14166;
hhrtim1.Instance->sTimerxRegs[2].CMP1xR = 28333;
When I write, the duty values of all PWMs are not 0%. It looks like the picture.
Problem2:
hhrtim1.Instance->sTimerxRegs[0].CMP1xR =14160;
hhrtim1.Instance->sTimerxRegs[1].CMP1xR = 28330;
hhrtim1.Instance->sTimerxRegs[2].CMP1xR = 42495;
In the second problem, the duties are intertwined.
NOTE: I use "The timer operates in continuous (free-running) mode".The example in the HRTIM Cookbook used "The timer operates in retriggerable single-shot mode", but I could not create PWM with that mode.
I would be grateful if you could help.