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

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

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

跳至解决方案
3,018 次查看
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,948 次查看
autoamp
Contributor III

Thanks for the response... Issue resolved alredy

在原帖中查看解决方案

3 回复数
1,038 次查看
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,949 次查看
autoamp
Contributor III

Thanks for the response... Issue resolved alredy

2,954 次查看
Rita_Wang
NXP TechSupport
NXP TechSupport
0 项奖励
回复