How to set iMX6 PWM 2MHz output?

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

How to set iMX6 PWM 2MHz output?

2,274 Views
charleshuang
Senior Contributor II

Hi
We want to use PAD_GPIO01 (PWM2) to generate 2MHz output

We use memtool set register to generate 2MHz

1.Set CCM_CCGR4 to enable pwm2 clock

2.Set PAD_GPIO01 to PWM mode

3.Set PWM2 register, I try to set PWM Sample Register and PWM Period Register to generate output,but I can't understand how to generate 2MHz output

here are my questions1.Can imx6 PWM support 2MHz output?

2.How to set?

Best Regards

Labels (3)
Tags (1)
0 Kudos
1 Reply

894 Views
igorpadykov
NXP Employee
NXP Employee

Hi charles

please look at description of pwm programming  at

sect.27.6.1 Configuring the PWM output attached document

and example from sdk.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos