imx283 pwm support in uboot

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

imx283 pwm support in uboot

跳至解决方案
1,519 次查看
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 项奖励
回复
1 解答
1,263 次查看
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 项奖励
回复
2 回复数
1,264 次查看
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 项奖励
回复
1,263 次查看
lukeli
Contributor II

thx for the demo source, it works!!

i did not config CLK_CTRL_XTAL_ADDR in my source.

0 项奖励
回复