I am using MPC5746C micro controller for my project development. I am referring MPC5746C reference manual and AN4830 application note. Please refer attached file for application note.
In section 2.9 various mode of eMIOS has been configured like MCB, OPWFMB, OPWMB, IPM, IPWM etc.
I am not able understand how to counter value 2K comes? How to calculate register value of A and B can be configured as two time duty cycle is mentioned there?
Hi Atul,
The basic description is wrong.
And does not correspond with a real implementation
In OPWFMB mode B register is used to set the PWM frequency and A register to set duty cycle.
Thus for above code
Period = B * (UCPRE + 1) / channel clock = 200 * 1 / 1MHz = 200us ~ 5kHz
Pulse width = A * (UCPRE + 1) / channel clock = 20 us
BR, Petr