Re: PWM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


I plan to use 2 servos, but not at the same time. I'd love to see your code
and test it. I'm using 2.6.26.8 currently.

Tried to make 2.6.27.x work, but wasn't able to boot up the board. Will
keep trying.

How can I enable sysfs? Currently I'm not having any /sys on the system.

The backlight driver's source is a great idea, will take a look at it.


Is it easier to control the TCs from userspace or just via kernel driver?

Thanks

          Tamas

On Sat, 29 Nov 2008 07:44:47 +1100 (EST), arasv@xxxxxxxxxxxxxx wrote:
>> Hi all,
>>
>> I'm trying to driver some modell servos on my AT91RM9200 devboard. For
>> this, I need PWM. Can anyone give me some hint (or example code) on
> this?
>>
>> Thanks,
>>
>>         Tamas
> 
> How many servos are you looking to run at once?
> 
> You might be in luck, I wrote a piezo output device driver just this week
> which gives you sysfs access to TIOA1 on the at91rm9200. My driver allows
> you to alter the frequency (and play notes like 'A4' and 'C6'!) but it
> keeps the PWM duty cycle at 50%. It's for 2.6.26.3. I'll happily share
> this driver with you. It isn't finished, but it works.
> 
> I use the atmel_tclib to interface to the Timer Counter registers on the
> at91rm9200.
> 
> See drivers/misc/atmel_tclib.c and drivers/clocksource/tcb_clksrc.c for
> timer block usage, and include/linux/atmel_tc.h for API.
> 
> See drivers/misc/*-laptop.c for examples of a simple driver with a sysfs
> interface.
> 
> It would be trivial to make my driver work for multiple outputs and
> variable duty cycle.
> 
> In 2.6.27.7-at91 you might also look at the "PWM LEDs" interface.
> 
> drivers/leds/leds-atmel-pwm.c
> 
> or the backlight driver (as was suggested by Nick):
> 
> ./drivers/video/backlight/atmel-pwm-bl.c
> 
> If you don't need to release "stable" kernel code ... there is also a
> generic PWM lib which is currently being worked on by Bill Gatliff but
I'm
> not sure if it's working with the at91rm9200. Anyone?
> 
> Aras
> 
> 
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________


-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter