We would like to generate the PWM waveform with square pulse (400kHz & duty 50%).
- Duty has broken by using Interrupt FIFO Empty .
- Because the 5 [usec] delay occurs by the processing of interrupt FIFO Empty.
- Don't use the Interrupt sample FIFO empty (FIE)
- PWM output controls on/off by switching EN bit in PWMCR.
Is my below understanding right?
When output the fixed frequency & constant duty waveform, to continue to write data in FIFO(PWMSAR) isn't necessary.
One should control simply ON/OFF by the EN bit of PWMCR.
[Other information (Our steps)]
1. Writes sample data to PWSAR register four times.
2. Doesn't write it to PWSAR register in the FIFO Empty interrupt handler.
3. Write 0x78 to PWMSR.
4. Write the optimal data to PWMPR for 400KHz
5. Write 0x01 to PWMIR.
--> we got the intended output waveform (400kHz & duty 50%)