I do realize my code is very messy and early, alot of comented out stuff. I've rewriten in and modified it countless times just trying to get the sync function to work with my isr. Thanks for looking Paul, and I don't expect anybody to rewrite my code. It just seemed silly to me to count millis, or set up an interval timer when the flex timer was timing exactly what i wanted anyways, 1 pwm cycle.
since the otherday i only modified the prescaler from 111 to 000 where it was supposed to be, it was modified before this for debuging purposes.
the logic pics i posted were with ps 000
I'm looking at the code posted from message #7. If you've changed it since yesterday... well, you didn't post anything else, so this is what I've got.
Inside ftm0_isr(), you're checking and clearing the interrupt flag on FTM1. A simple mistake, but if you don't clear the FTM0 flag, it'll keep interrupting at maximum possible rate. Fix this first!
Thats it Paul! Now I'm embarassed it was something so simple. I copied that code, and forgot to change those 1s to 0s. Now my code triggers at the end of a pwm cycle like it was meant to. Obviousely thats why it was triggering every 2.05 millis... cause i was checking the wrong module.
It also looks like you're trying to use both COMBINE and CPWMS. That combination isn't one of the documented features in table 36-67 on page 783. Who knows what it will do?! It's definitely not a legal/documented setting.
And really, what sense does center aligned PWM make if you're combining 2 channel comparators to control both the rising and falling waveform edges? Center aligned means a single comparator triggers both rising and falling edges, aligned to the center of a double-length period. Combine mode means you control the absolute position of both edges within the waveform period. Conceptually, they're mutually exclusive. You have to pick one. Combine mode gives you complete control of the both waveforms... but then you have more work to do to control them. If they're always going to both be centered within the PWM period, then center aligned will be simpler.
I don't see where i have set the cpwm bit anywhere. There is some commented out CPWM giberish though. I have the TOIE bit set though which is right next to it in that rigister. this just enables the interupt to trigger after the timer hits the mod value, or after each pulse. I chose to use combine over cpwm because it seems to have more options and only an extra line to set the both start and end channels. This allows me to setup different schemes which alternate from one set of coils to the other which would allow me to run twice the amps on my motorcontroller because the power is more evenly consumed. still in early stages.
There may be other issues. This code is longer and more complex than I really want to put much time into fixing. Maybe you could try a simpler proof-of-concept which just controls 1 pin in a simple and easy-to-observe way (not a big lookup table... something simple like alternating between a few fixed settings).
Hopefully this quick look at least helps you get onto the right path?
Thanks for the help, but I'm on track now, i'll post some more elegant code once its polished if anyone wants to see it. I know your a busy man Paul, looking forward to the next teensy release (k66)

Now the update is triggering at the same rate as the pwm... as you can see.