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.
Hi everybody,
I have a problem with HRPWM on TMS320F28379D if the phase shift is enabled.
If the HRPWM feature is enabled only for one channel without the syncronisation between the modules it is working properly, but if the PWM modules are working in phase sift mode (PHSEN = 1) and the HRPWM feature is enabled in parallel the following jitter can be observed on the output:
I tried a lot of settings regarding to the load configuration, shadow registers and phase shifting but only the location of the jitter moved the jitter was not eliminated just if I set back PHSEN = 0.
Could you please help me which setup is required for the HRPWM and Phase Shift to remove the jitter on the output?
Thanks you in advance!
Regards,
Marton
Hi Marton,
Could you provide the following information:
1. The phase value setting.
2. Source of PWMSYNC, and the period of PWMSYNC.
Regards,
Srinivasa
Hi Srinivasa,
thank you for your reply!
1. on PWM2:
TBPHS = 260
TBPHSHR = 0 -> for the test the fractional part of the phase shift register was not changed
2. PWMSYNC is generated by PWM1 for the PWM2. PWM1 triggers sync signal if the CNT=ZERO, and PWM2 uses this sync signal for counter register loading and pass on to the SYNCO.
Detailed settings
PWM1 and PWM2 common settings
EPWMCLK: 100 MHz
CTRMODE = 0b10 -> up-down counting mode
target frequency: 96 kHz
target period: 100000/96/2 = 520,8333
TBPRD (integer part) = 520
TBPRSHR (fractional part in Q15 format): 0,8333 * 2^16 = 54613
HRMSTEP = 66 -> 10ns / 150ps = 66
HRLOAD = 0b10 -> Load on either CTR = Zero or CTR = PRD
AUTOCONV = 0b1 -> Automatic HRMSTEP scaling is enabled.
EDGMODE = 0b11 -> MEP control of both edges
TBPHSHRLOADE = 0b1 -> Synchronize the high-resolution phase on a SYNCIN
HRPE = 0b1 -> High resolution period enabled
PWM1 settings
PHSEN = 0b0 -> phase shift is disabled
SYNCOSEL = 0b01 -> SYNCO = if(CTR=ZERO)
PWM2 settings
SYNCOSEL = 0b00 -> SYNCO = SYNCI
PHSDIR = 0b0
PHSEN = 0b1 -> phase shift is enabled
TBPHS = 260
TBPHSHR = 0 -> for the test the fractional part of the phase shift register was not changed
Regards,
Marton
Hi Marton,
I suspect the following:
* You are using hires period.
* PWMSYNCOUT generation is based only on the integer value of period.
which is probably why you see a jitter on PWM. Can you experiment, by not using hires period, to confirm ?
Regards,
Srinivasa
Hi Srinivasa,
thank you for your help! I disabled the continguous Phase shift loading on sync event, because it seems that was the reason of the jitter in HRPWM mode.
Best regards,
Marton