Hi
Our customer uses our automatic generated project and finds that PWM will make wrong output
when setting PWM.TBPHS. To locate wrong PWM period, we wrote a project to save data near
the wrong PWM period. The project is designed as follows:
1. CPU: F28069M (we test the project on LaunchPad F28069M)
2. PWM1 works at switching frequency 240KHz.
3. PWM2 has same setting with PWM1, plus phase shift 20 degrre to 160 degree.
4. System contrl frequency is 20KHz, so we use PWM8 as a timer to cause 20KHz interrupt.
5. GPIO3(PWM2.B) links to GPIO12, and system uses GPIO12 as external interrupt source
and it triggers interrupt at rising edge.
6. The duty cycle of PWM1 and PWM2 is 0.5.
7. System uses external interrupt routine to calculate the width of the rising edge. The regular
width is about 4.17us, system will keep 15 data in the wrong PWM period( array aryErr).
8. nGblTimes is the number of the wrong PWM periods (my test result is 3).
9. All wrong periods are caused when change PWM2.TBPHS from 93 to 95.
The PWM2.B's waveform near the wrong PWM period is as below:
The project can be reached at the following:
Please let me know how to avoid this problem.
Same error occurs on F28335, too. Perhaps F2803x and F2802x have the same problem.
thanks,
Jiakai