imx283 pwm support in uboot

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx283 pwm support in uboot

ソリューションへジャンプ
1,093件の閲覧回数
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 解決策
837件の閲覧回数
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 返答(返信)
838件の閲覧回数
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 件の賞賛
返信
837件の閲覧回数
lukeli
Contributor II

thx for the demo source, it works!!

i did not config CLK_CTRL_XTAL_ADDR in my source.

0 件の賞賛
返信