imx283 pwm support in uboot

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

imx283 pwm support in uboot

Jump to solution
1,091 Views
lukeli
Contributor II

hi.

i can configure pwm in kernel, but fail to configure it in imx283. i saw imx6 have supported pwm setting in uboot.

how can i set it in imx283? thx in advance.

list my source in uboot:

  1. writel(BF_PWM_ACTIVEn_INACTIVE(75) |
  2.                       BF_PWM_ACTIVEn_ACTIVE(0),
  3.                PWM_BASE + HW_PWM_ACTIVEn(pwm_led->pwm));
  4.        //设置周期
  5. writel(BF_PWM_PERIODn_CDIV(5) | /* divide by 64 */     \
  6.         BF_PWM_PERIODn_INACTIVE_STATE(3) | /* low */
  7.         BF_PWM_PERIODn_ACTIVE_STATE(2) | /* high */     \
  8.         BF_PWM_PERIODn_PERIOD(99)),
  9.         PWM_BASE + HW_PWM_PERIODn(pwm_led->pwm));
  10.       //打开PWM
  11. writel(BF_PWM_CTRL_PWM_ENABLE(pwm_led->pwm),
  12.              PWM_BASE + HW_PWM_CTRL_SET);
0 Kudos
Reply
1 Solution
835 Views
igorpadykov
NXP Employee
NXP Employee

Hi luke

please find attached i.MX28 pwm baremetal example, hope this helps.

Best regards

igor

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

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

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

View solution in original post

0 Kudos
Reply
2 Replies
836 Views
igorpadykov
NXP Employee
NXP Employee

Hi luke

please find attached i.MX28 pwm baremetal example, hope this helps.

Best regards

igor

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

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

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

0 Kudos
Reply
835 Views
lukeli
Contributor II

thx for the demo source, it works!!

i did not config CLK_CTRL_XTAL_ADDR in my source.

0 Kudos
Reply