Initial PWM output value with eFlexPWM

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

Initial PWM output value with eFlexPWM

101 Views
zorrotz
Contributor III

Hi,

Working with eFlexPWM of MCXA132, I want to modify the initial value for PWM23.
For that I do next steps:


1. SM1CTRL2[PWM23_INIT] = 1

2. SM1CTRL2[FRCEN] = 1
    SM1CTRL2[FORCE] = 1    (note that SM1CTRL2[FORCE_SEL] is 000)

3. MCTRL[RUN] = 010

But first PWM cycle always starts with output at level 0.

Where can be the problem?

Thanks in advance

Labels (1)
0 Kudos
Reply
1 Reply

38 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @zorrotz 

 

To help us analyze the issue, could you please share your complete project with us?

Thank you.

 

BR

Alice

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2418776%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EInitial%20PWM%20output%20value%20with%20eFlexPWM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2418776%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3CBR%20%2F%3E%3CBR%20%2F%3EWorking%20with%20eFlexPWM%20of%20MCXA132%2C%20I%20want%20to%20modify%20the%20initial%20value%20for%20PWM23.%3CBR%20%2F%3EFor%20that%20I%20do%20next%20steps%3A%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E1.%20SM1CTRL2%5BPWM23_INIT%5D%20%3D%201%3C%2FP%3E%3CP%3E2.%20SM1CTRL2%5BFRCEN%5D%20%3D%201%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20SM1CTRL2%5BFORCE%5D%20%3D%201%26nbsp%3B%20%26nbsp%3B%20(note%20that%20SM1CTRL2%5BFORCE_SEL%5D%20is%20000)%3CBR%20%2F%3E%3CBR%20%2F%3E3.%20MCTRL%5BRUN%5D%20%3D%20010%3CBR%20%2F%3E%3CBR%20%2F%3EBut%20first%20PWM%20cycle%20always%20starts%20with%20output%20at%20level%200.%3CBR%20%2F%3E%3CBR%20%2F%3EWhere%20can%20be%20the%20problem%3F%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20in%20advance%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2418776%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EMCXA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E