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

> 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 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

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

It would be trivial to make my driver work for multiple outputs and
variable duty cycle.

In you might also look at the "PWM LEDs" interface.


or the backlight driver (as was suggested by Nick):


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?


This email has been scanned by the MessageLabs Email Security System.
For more information please visit 

List admin:

[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