AnsweredAssumed Answered

imx283 pwm support in uboot

Question asked by luke li on Jun 7, 2016
Latest reply on Jun 9, 2016 by luke li

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);

Outcomes