Have a question about Warp7? Ask it here!
Have a question about Warp7? Ask it here!
Hi Giuseppe,
If you want to use the PWM output on WaRP7, you have just to create (or modify) the devicetree source file.
For example : To use the PWM on the MikroBUS connector (RST pin), create the following dts :
#include "imx7s-warp.dts"
&pwm3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pwm3>;
status = "okay";
};
&iomuxc {
pinctrl-names = "default";
imx7s-warp {
pinctrl_pwm3: pwm3grp {
fsl,pins = <
MX7D_PAD_ENET1_RGMII_TD0__PWM3_OUT 0x79
>;
};
};
};
and compile it => make ARCH=arm imx7s-warp-pwm.dtb (I can send you the dtb by e-mail if you want)
After that, power up the WaRP7 and stop the booting process:
=> setenv fdt_file imx7s-warp-pwm.dtb
=> run bootcmd
...
6406568 bytes read in 96 ms (63.6 MiB/s)
Booting from mmc ...
reading imx7s-warp-pwm.dtb
37553 bytes read in 12 ms (3 MiB/s)
Kernel image @ 0x80800000 [ 0x000000 - 0x61c1a8 ]
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
Using Device Tree in place at 83000000, end 8300c2b0
Under your embedded Linux, you can export the PWM as follows
root@warp7:~# echo 0 > /sys/class/pwm/pwmchip0/export
root@warp7:~# echo 10000000 > /sys/class/pwm/pwmchip0/pwm0/period
root@warp7:~# echo 10000000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
root@warp7:~# echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
Best Regards
Pierre-Jean
Hi Pierre-jean,
if it don't you disturb, i would like the file .dtb.
and I have questions about the compilation of this file, after the compilation file, where is stock file ?
the make don't create a new file who contains executable code ?
regards
Giuseppe
Hi Giuseppe,
No problems, I can send the dtb (just give me your e-mail).
Concerning the dts, this file is located inside the sources of your Kernel (eg ; yocto-build/tmp/work/imx7s_warp-poky-linux-gnueabi/<linux>/arch/arm/boot/dts/imx7s-warp.dts or<linux>/arch/arm/boot/dts/imx7s-warp-pwm.dts if you want to create another file).
For the compilation, just execute :
make ARCH=arm imx7s-warp.dtb
or
make ARCH=arm imx7s-warp-pwm.dtb
(Toochain is needed)
Regards
Pierre-Jean
sorry i forget to join my mail.
send mail at gmingoia@mind-microtec.org
sorry i forget to join my mail.
send mail at gmingoia@mind-microtec.org