PWM Phase Shift in IMXRT 1020

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

PWM Phase Shift in IMXRT 1020

852 Views
narenchandra401
Contributor III

Hi community ,

Is there any example code available for PWM phase shift . 

I did not find any register where we can provide the phase shift value . Please help with suitable references .

Thanks and Regards 

Naren 

Labels (1)
0 Kudos
5 Replies

765 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Naren chandra,

To provide the fastest possible support, I'd highly recommend you refer to the pwm demo project in the SDK library. The PWM module can output phase shited PWMs, and in the aforementioned demo, it demonstrates how to utilize the SDK PWM driver.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

765 Views
narenchandra401
Contributor III

Hi Jeremyzhou ,

Yes i have tested the sample SDK and i have selected 5 PWM channals 

PWM1-A0,B0,A1,B1,A2 

All configured as Independent PWM 

PWM1-A0 has kPWM_BusClock as Clock source and all the other has A0 as reference clock source .

Is there any register that i need to set to run all these in phase shifted mode ?

I need a phase shift of 72 degrees between them , 

In the reference manual i did not find any register related to Phase shift ? 

If some hint of reference is provided it will help my development . 

Thanks and Regards 

Naren Chandra 

0 Kudos

765 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Naren chandra,

Thanks for your reply.
In the RM, it presents how to implement various PWMs in the section:49.4.1 PWM Capabilities, definitely, it contains the Phase Shifted PWM, I think it can guide you to do it.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

765 Views
narenchandra401
Contributor III

Thanks for the response , 

I have already refereed the RM and this is what it says

"If numerical biases are applied to the turn on and turn off edges of different PWM signal, the signals will be phase shifted with respect to each other"

That means we need to tweak Val23, val45 to acheive this . 

So in my scenarion , i have 

PWM1_A0

PWM1_B0

PWM1_A1

PWM1_B1

PWM1_A2

and i have to phase shift these 5 pwm signals , I need to write VAL23,45 registers 

But more details are not provided 

should i take A0 as reference to all or , A0 is refernce to A1, and A1 is reference to A2 so on.

0 Kudos

765 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Naren chandra,

1) should i take A0 as reference to all or , A0 is refernce to A1, and A1 is reference to A2 so on.

-- Yes.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos