Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => iMX233 => Topic started by: FET_Destroyer on March 21, 2015, 07:33:46 PM

Title: imx233 - micro pwm
Post by: FET_Destroyer on March 21, 2015, 07:33:46 PM
Hello guys,

I'm newbie to olinuxino but i've done somethings in the past on linux, not to much, but something.
I've instaled Arch Linux ARM - Linux 3.19.0-1-ARCH #1 PREEMPT Wed Feb 11 17:51:40 MST 2015 armv5tejl GNU/Linux
I'm starting slow with just some bash scripts on gpio pins and thats ok.
Now I want to use pwm and acording to this website all the files are in the /sys/class/pwm:

http://www.armadeus.com/wiki/index.php?title=PWM (http://www.armadeus.com/wiki/index.php?title=PWM)

(http://i.imgur.com/JWnRIIX.png)

But mine is empty  :-\

(http://i.imgur.com/I9GaK9H.png)

Can somebody help me? I want to use pwm but I dont know how  :-\

Regards
Title: Re: imx233 - micro pwm
Post by: lambda on March 21, 2015, 08:16:43 PM
Is the pwm-mxs kernel module loaded?

If it is: Is the pwm also enabled in devicetree?

HTH,
Harald
Title: Re: imx233 - micro pwm
Post by: FET_Destroyer on March 22, 2015, 04:04:48 PM
Hi lambda,

How do I know if the pwm-mxs kernel is being loaded?
I've follow the instructions on the arch linux arm website to create an SD card.

Regards
Title: Re: imx233 - micro pwm
Post by: lambda on March 22, 2015, 05:33:19 PM
lsmod should show you the loaded kernel modules on any linux system.

uname -a will tell you the version of your kernel

in /proc/device-tree/ you should see your loaded device tree data.

I don't now about arch linux - i run all my imx23 boards with OpenWRT.

HTH,
Harald
Title: Re: imx233 - micro pwm
Post by: FET_Destroyer on March 23, 2015, 09:24:40 PM
No loaded pwm module  :(
Can somedoby help me to install it? Do I need to compile all the arch linux kernel and modules?
(http://i.imgur.com/5NoPlrb.png)

Regards
Title: Re: imx233 - micro pwm
Post by: lambda on March 24, 2015, 12:39:41 AM
Well, first step then is to see if the module is available on your system.
Should be somewhere below /lib/modules/<kernelversion>/

If the module is there, then load it with insmod or modprobe ...

If the module is not there, you will need help from somebody familiar with
archlinux.

HTH,
Harald
Title: Re: imx233 - micro pwm
Post by: swahren on March 24, 2015, 08:17:24 PM
Hi FET_Destroyer,

how are you connected to your board (UART, USB or WIFI)?

Since PWM0 and PWM1 are on the same pins as Debug UART this is a more difficult task than simple GPIO.

Stefan

Edit: Good news, i've look at the i.MX233 reference manual and it's look like that PWM2 is also available and don't have any conflicts (CON2 - pin 27).