Configuring PWM on iMX6UL - Causes system lock up

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Configuring PWM on iMX6UL - Causes system lock up

941 Views
james_dunn
Contributor I

Running Ubuntu Linux in iMX6UL design.

I have modified the imx6ul.dtsi and imx6ul-14x14-evk.dts as shown below.  I logged on to the system and executed the command in sequence.  The result is that iMX6UL part becomes unresponsive or locked up.  Watchdog timer is not going off, cannot ping the system or connect in anyway without a power cycle.

Anyone have any ideas on what's going on?

imx6ul.dtsi:

pwm8: pwm@020fc000 {
compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm";
reg = <0x020fc000 0x4000>;
interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6UL_CLK_PWM8>,
<&clks IMX6UL_CLK_PWM8>;
clock-names = "ipg", "per";
#pwm-cells = <2>;

imx6ul-14x14-evk.dts:

&pwm8 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pwm8>;
status = "okay";
};

pinctrl_pwm8: pwm8grp {
fsl,pins = <
MX6UL_PAD_CSI_HSYNC__PWM8_OUT 0x08030
>;
};

Command sequence:

root@sn1803149:~# echo 1 > /sys/class/pwm/pwmchip7/pwm0/enable
login as: root
root@10.31.77.115's password:
Last login: Thu Jan 3 09:55:41 2019 from 10.31.76.160
root@sn1803149:~# echo 0 > /sys/class/pwm/pwmchip8/export
-sh: /sys/class/pwm/pwmchip8/export: No such file or directory
root@sn1803149:~# echo 0 > /sys/class/pwm/pwmchip7/export
root@sn1803149:~#
root@sn1803149:~#
root@sn1803149:~#
root@sn1803149:~# echo 1000000 /sys/class/pwm/pwmchip7/pwm0/period
1000000 /sys/class/pwm/pwmchip7/pwm0/period
root@sn1803149:~#
root@sn1803149:~# echo 300000 /sys/class/pwm/pwmchip7/pwm0/duty_cycle
300000 /sys/class/pwm/pwmchip7/pwm0/duty_cycle
root@sn1803149:~#
root@sn1803149:~#
root@sn1803149:~# echo 1 > /sys/class/pwm/pwmchip7/pwm0/enable

As soon as i execute the enable command, it goes to lunch and never comes back on it's own.

Thanks in advance.

Jim D

Labels (1)
0 Kudos
2 Replies

598 Views
TheSnake69
Contributor I

Hello Jim,

I've got the very same problem, were you able to solve it?

 

BR

 

0 Kudos

640 Views
igorpadykov
NXP Employee
NXP Employee

Hi James

example of i.mx6ul pwm8 can be found in BD linux-imx6/arch/arm/boot/dts/imx6ul-pico-hobbit.dts

and one can try it

linux-imx6/imx6ul-pico-hobbit.dts at boundary-imx_4.9.x_2.0.0_ga · boundarydevices/linux-imx6 · GitH... 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos