while 40Hz is exactly 6250 times slower than 250kHz, you have to check that it's possible to set those exact values in the timers. I don't remember off hand the math, but I think it's a clock multiplier off some system clock tick, so it may turn out that either 250kHz or 40Hz or both are not exact values, in which case the signals can not be in sync. Also, 256 periods of 250kHz is 1.024 ms, not 1.05ms
On Wed, Jun 10, 2015 at 4:20 PM, BBBCSF <[email protected]> wrote: > I'm attempting to use two PWM pins, both of different instances, to generate > two signals. My current task is to synchronize these two so that one goes > through a certain amount of periods while the other signal is high. > Specifically, I need a 250 KHz signal to go through 256 periods while a 40 > Hz signal is high for 1.05 ms and low for the other 23.95 ms. However the > signals don't sync up on the oscilloscope, even though according to the math > they should. Do I have to just figure out by plugging in different numbers > until I find out which one works? Also, is there a way to make it so that > the rising edge of the 250 KHz signal always comes a certain amount of time > after the rising edge of the 40 Hz? > > -- > 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/d/optout. -- 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/d/optout.
