Thank you so much for the fast reply. I'll try doing what you described. Thanks gain.

From: jumpnowdev <>
Sent: Monday, February 4, 2013 7:43 PM
Subject: Re: [Gumstix-users] changing the frequency of Scott Ellis pwm driver

There is a frequency parameter you can pass to the driver
when you load it, but it applies to all of the timers.

It's described in the README.

It's a trivial mod to do what you want, i.e. give each timer
their own frequency.

Here's what I'd do.

Add a new frequency variable to struct pwm_dev

struct pwm_dev {
    dev_t devt;
    struct cdev cdev;
    struct device *device;
+ int frequency;

Initialize it for each timer, maybe in pwm_init() but anywhere
as long as its before the pwm_set_frequency() call. Since you
know your frequencies, I'd just hard code them.

Then everywhere the current global frequency is used, use
your new pwm_dev.frequency instead. I think it's just
pwm_set_frequency() and pwm_set_servo_pulse() but I'd
check yourself.

FYI, the README is a little behind some recent changes to the
driver from Jemiah Aitch and Tobias Simon. Performance should
be improved using ioctl to change the timer settings at runtime.
The old file write() still works though.


View this message in context:
Sent from the Gumstix mailing list archive at

Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
gumstix-users mailing list