Page 2 of 2

Re: LED dimm with gpio-pwm

Posted: Fri Jan 09, 2015 11:52 pm
by Greenwire-Elektronik
Hey Ton, sorry for my late response. First of all - what do you mean with "before" and "after"?

So far Timer 0 is not running at all. Timer 1 is running - as watchdog timer.
I am not sure regarding my theory of system tick counter is been used for PWM - anyway, are you having the same problem if you use periods > 200 ms?

If you share the program, i can analyze it on my scope during the weekend!

Re: LED dimm with gpio-pwm

Posted: Sat Jan 10, 2015 8:40 am
by Ton
With before/after I mean this set of commands.
Basically it is to start a signal on the output.
The period and duty value can vary.

Code: Select all
mkdir -p /config
mount -t configfs none /config
mkdir /config/gpio_pwm/21
echo 1 > /sys/class/pwm/gpio_pwm\:21/export
echo 10000000 > /sys/class/pwm/gpio_pwm\:21/period_ns
echo  5000000 > /sys/class/pwm/gpio_pwm\:21/duty_ns
echo 1 > /sys/class/pwm/gpio_pwm\:21/run