Hi team,
Recently I am working with a customer on their HRPWM configurations. And I have the following questions to confirm with you:
1. In P26 of SPRUGE8E, it mentioned:
CMPCTL[LOADAMODE]
– In up-count mode:CMPCTL[LOADAMODE] = 1 (load on CTR = PRD)
– In up-down count mode: CMPCTL[LOADAMODE] = 2 (load on CTR=0 or CTR=PRD)
Is it necessary to load on CTR=0 or CTR=PRD when using up-down count mode?
2. In the same page, you mentioned:
For TBPHS: TBPHSHR synchronization with high-resolution period, set both HRPCTL[TBPHSHRLOADE] = 1 and TBCTL[PHSEN] = 1.
In up-down count mode these bits must be set to 1 regardless of the contents of TBPHSHR.
The description of TBPHSHRLOADE register mentioned:This bit and the TBCTL[PHSEN] bit must be set to 1 when high-resolution period is enabled for up-down count mode even if TBPHSHR = 0x0000. This bit does not need to be set when only high-resolution duty is enabled.
my question is:
1) If both HR phase and period are used, do we have to set TBCTL[PHSEN] and HRPCTL[TBPHSHRLOADE] ?
2) If only HR period is used, do we have to TBCTL[PHSEN] and HRPCTL[TBPHSHRLOADE] ?
3. We did not fully understand the point of this note.
1) To avoid the jitter, the SYNCOSEL must be set to 0 when HR period mode is enabled, is it correct?
1) In our example code, a software sync is always performed during the initialization. Is it necessary to do this?
2) If TBCTL[SYNCOSEL] != 0 , is a software sync still necessary?
4. During the experiment, we noticed a one-system-clock period change on the PWM. Here is our configuration:
EPwm1Regs.TBCTL.bit.CTRMODE = TB_COUNT_UPDOWN;
EPwm1Regs.CMPCTL.bit.LOADAMODE = CC_CTR_ZERO_PRD;
EPwm1Regs.HRCNFG.all = 0x0;
EPwm1Regs.HRCNFG.bit.EDGMODE = HR_BEP;
EPwm1Regs.HRCNFG.bit.CTLMODE = HR_CMP;
EPwm1Regs.HRCNFG.bit.HRLOAD = HR_CTR_ZERO_PRD;
EPwm1Regs.HRCNFG.bit.AUTOCONV = 1;
EPwm1Regs.HRPCTL.bit.HRPE = 1;
EPwm1Regs.TBCTL.bit.PHSEN = 1;
EPwm1Regs.HRPCTL.bit.TBPHSHRLOADE = 1;
Do you have any idea of how to eliminate?
Sorry for having so much questions, thanks for your support.