How to use eMIOS OPWFMB mode?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use eMIOS OPWFMB mode?

1,380 Views
atuldixit
Contributor I

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?

Tags (1)
0 Kudos
1 Reply

972 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi Atul,

The basic description is wrong.

pastedImage_1.png

And does not correspond with a real implementation

 pastedImage_2.png

 pastedImage_3.png

 pastedImage_4.png

 

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

0 Kudos