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.
Dear team:
During the commissioning of variable frequency hrpwm, my customer found that the frequency of hrpwm output by the program would jitter under certain frequency conditions.
For example, when fpwm = 500KHz, tbprd = 100, in up-down mode, the PWM output is very stable.
However, when fpwm = 501khz, the frequency of PWM output will jump between 500KHz and 502khz;
Similarly, when fpwm = 1000khz, tbprd = 100, in up-down mode, the PWM output is very stable.
However, when fpwm = 999khz, the frequency of PWM output will jump between 990khz and 1000khz;
Is it the customer's code configuration problem? The following is the customer code:
Best regards
Yes, the customer needs to use CHANNEL A + CMPA + CMPAHR and the same for Channel B. Also Do they SYNC on every event? The continuous syncing could be the source of jitter.
Hi Nima:
The customer tested the routine hrpwm_ex2_prdupdown_sfo_v8 today. In the range of 400KHz to 1.2MHz, there is no frequency shaking phenomenon. But when he increased the frequency above 4MHz, frequency shaking phenomenon will occur.
The customer's design is: the period register of PWM is updated in a 100KHz Adc interrupt, and the frequency conversion range of PWM is in the range of 400KHz to 1.2MHz. Is there any problem with this architecture? Does HRPWM have any special requirements for the update timing of TBPRD or TBPRDHR?
Are the ADC interrupt and EPWM TB asynchronous to each other? By this I mean, do you update the EPWM registers within the ADC ISR, and this update could be made at any point in the EPWM 0-PRD-0 cycle?
Hi Nima:
The customer found the problem because the HRPWM clock was not turned on.
Thank you for your support.