Thanks, Tried your trick.... even replaced the new dtbo file.... but even after that I am getting the default value for Period ( ie, 5000000) and duty (ie, 0) ... Is there any step that you missed in between...??. Anyways thanks for the tip..:)
On Monday, 8 July 2013 08:44:54 UTC+5:30, [email protected] wrote: > > Hello, > > you can change period by changing dtbo files. > > 1 Generate dts file from original dtbo file > dtc -I dtb -O dts -o /lib/firmware/bone_pwm_P8_13-00A0.dts /lib/firmware/ > bone_pwm_P8_13-00A0.dtbo > > 2 Change period > open file "/lib/firmware/bone_pwm_P8_13-00A0.dts" with editor at lines > around line 26: > pwm_test_P8_13 { > compatible = "pwm_test"; > pwms = <0xdeadbeef 0x1 0x7a120 0x1>; > > and change to following, for example change period to 100000ns=0.1ms > > pwm_test_P8_13 { > compatible = "pwm_test"; > pwms = <0xdeadbeef 0x1 100000 0x1>; > > where > -3rd parameter of line"pwms = ~" is period. > -period (and other parameters) can be written in either decimal or > hexadecimal of 0xABC format. > -default period 0x7a120 is 5000000 in decimal. > -As you mentioned, Both A and B output for one eHRPWM must have same > period setting. > If not, the second device will fail to setup at "echo (device)> > /sys/devices/bone_capemgr.*/slots" command. > > 3 Compile to new dtbo file > dtc -O dtb -o bone_pwm_P8_13-00A0.dtbo -b 0 -@ bone_pwm_P8_13-00A0.dts > > You'd better back up original dtbo file before overwriting it. > > 4 Use new dtbo file. > echo bone_pwm_P8_13 > /sys/devices/bone_capemgr.*/slots > > > > 2013年6月4日火曜日 16時33分00秒 UTC+9 [email protected]: >> >> Hey, >> yes sure, duty must be (0 <= duty <= period). Otherwise you would try to >> to set a pwm duty cycle of less than 0% or more than 100%. Returning an >> error to the user is a proper way to handle this. >> >> As mentioned above EHRPWM1 and EHRPWM2 share the same base period (or >> respectively the base frequency). If I enable both PWM ouputs, writing to >> the period files always results in an error. Enabeling only one of the two >> outputs lets me change the periods. >> This does make sense after all. I assume the necessary crosschecking of >> the conditions (0 <= duty <= period) for related PWM outputs is simply not >> implemented yet or mayby just faulty. >> >> Am Montag, 3. Juni 2013 12:25:15 UTC+2 schrieb [email protected]: >>> >>> Hi >>> >>> I'm just starting out, but here is what I found. Hopefully it can help >>> you. >>> The period must be greater than duty. >>> This worked fine for me: >>> echo 100000 > /sys/devices/ocp.2/pwm_test_P9_14.12/period >>> Period is given in ns. Duty is given in ns on/off depending on polarity. >>> >> > -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
