Hi, On Thursday, April 17, 2014 7:48:50 PM UTC+3, Strawson wrote: > > Hello all, > > As (probably) most of you are aware, the most straightforward method of > changing the pwm period (frequency) is at boot by setting it in a .dts > overlay. This may be the solution for 90% of pwm users, but we have run > into the situation where we would like to change the pwm period at run time > to avoid re-compiling the .dts overlay when we wish to swap between > different applications. >
How about something like this in runtime? echo 0 > /sys/class/pwm/pwmchip1/export cd /sys/class/pwm/pwmchip1/pwm0 1 kHz: echo 0 > enable echo 1000000 > period echo 500000 > duty_cycle echo 1 > enable 100 Hz: echo 0 > enable echo 10000000 > period echo 5000000 > duty_cycle echo 1 > enable Regards, Robert -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.