Q: What is the preocedure to Enable PWM on imx8mm-evk?

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

Q: What is the preocedure to Enable PWM on imx8mm-evk?

ソリューションへジャンプ
3,031件の閲覧回数
autoamp
Contributor III

Hi,

On my evk am trying to enable PWM for controlling LEDs,

After going through post IMX8MM-EVK-pwm-output 

I have made following changes,

  • in dts file
pinctrl_pwm1: pwm1grp {
		fsl,pins = <
			MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT  0x16
		>;
	};

	pinctrl_pwm2: pwm2grp {
		fsl,pins = <
			MX8MM_IOMUXC_GPIO1_IO13_PWM2_OUT  0x16
		>;
	};

	pinctrl_pwm3: pwm3grp {
		fsl,pins = <
			MX8MM_IOMUXC_GPIO1_IO14_PWM3_OUT  0x16
		>;
	};

	pinctrl_pwm4: pwm4grp {
		fsl,pins = <
			MX8MM_IOMUXC_GPIO1_IO15_PWM4_OUT  0x16
		>;
	};
.
.
.
.
&pwm1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm1>;
	status = "okay";
};

&pwm2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm2>;
	status = "okay";
};

&pwm3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm3>;
	status = "okay";
};

&pwm4 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm4>;
	status = "okay";
};

Kernel Configs enabled:

Symbol: LEDS_PWM [=y]                                                                                                                                      
  │ Type  : tristate                                                                                                                                           
  │ Prompt: PWM driven LED Support                                                                                                                             
  │   Location:                                                                                                                                                
  │     -> Device Drivers                                                                                                                                       
  │ (9)   -> LED Support (NEW_LEDS [=y])                                                                                                                       
  │   Defined at drivers/leds/Kconfig:513                                                                                                                       
  │   Depends on: NEW_LEDS [=y] && LEDS_CLASS [=y] && PWM [=y]

For starters am planning to Control PWM signal from sysfs..

What is the procedure to up the PWM imx8mm-evk? Is there any step-by-step guide available?

Why there is no proper documentation available like application note from NXP??

 

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
2,961件の閲覧回数
autoamp
Contributor III

Thanks for the response... Issue resolved alredy

元の投稿で解決策を見る

3 返答(返信)
1,051件の閲覧回数
NITIN26
Contributor I

Hello autoamp,

I am Nitin B S who is also trying to enable PWM in imx8m plus evk through sysfs. I am activating my pwmchip and pwmchannel and running the code. The code is being executing as expected but when i connect the LED to board the results are not being reflected in my LED it is not even turning on. 

I am connecting my LED as shown in the config below to pin number 32(PWM4).

Can you please help me regarding the issue.

Thanks and Regards

Nitin B S

GPIO Image.PNG

0 件の賞賛
返信
2,962件の閲覧回数
autoamp
Contributor III

Thanks for the response... Issue resolved alredy

2,967件の閲覧回数
Rita_Wang
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信