Does the high resolution PWM delay block feature work with centered PWM generation? How do you set up the fractional bits for this mode?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Does the high resolution PWM delay block feature work with centered PWM generation? How do you set up the fractional bits for this mode?

885件の閲覧回数
ameares
Contributor I

I am using the PWM in centered mode and I would like to try using the high resolution fraction bits.  I am not sure how to set the fractional bits for VAL2 since VAL2 has a negative number and the counter is counting up from a negative number.

For example, 

SM1INIT = -1000;

SM1VAL1 = +1000;

Say I wanted to set the duty cycle to about 50%.

VAL2 = -500;

VAL3 = +500;

Can I use FRACVAL3, and FRACVAL2, to obtain a duty cycle of 1001.5 counts?  Does this mean you set the FRACVAL3 to 0.25 and FRACVAL2 to 0.75 and VAL2 to -501?

I am using the MC56F82xxx series but this would apply to other processors as well.

Thanks, any tips are welcome.

-Andrew Meares

ラベル(1)
0 件の賞賛
3 返答(返信)

542件の閲覧回数
ameares
Contributor I

The documentation leaves me with many questions since it only covers each feature in isolation.  Some questions like this timing issue can be answered by a little experimental code.  I suspect now that it will be more efficient to simply apply twice the fractional part to the FRACVAL3 register and deal with rounding up VAL3 rather than figure out how to implement non-causal delays.  (little joke)

0 件の賞賛

542件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Andrew,

Based on your requirement, I write a documentation so that it is helpful to the customers who have the same question.

https://community.nxp.com/docs/DOC-335308 

BR

Xiangjun Rong

0 件の賞賛

542件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Andrew,

Yes, you can set the  FRACVAL3, and FRACVAL2 to get fractional duty cycle.

Pls refer to the documentation and the code.

Hope it can help you

BR

Xiangjun rong

The feature Fraction Delay logic with Micro-Edge Placement for eFlexPWM module 

0 件の賞賛