Part Number: TMS320F28375D
reading through the ePWM for the part, I can see how to create the desired waveform...
I guess the question is:
1. how can I start and stop the PWM and do it at the cycle start and end times... ie: when I start it I want to start it at a known start place., when I stop it, I essentially want it to complete wherever its at to the same start position so a full cycle executes, it doesn't stop mid stream.
My issues at the moment is, it looks like you provide the sync signal, which I could issue by software, which would set the counter to a controlled start position... this is desirable, however, you have the 'freeze' control in a separate location... is it possible to 'freeze it' and when the sync pulse is issued it not only starts counting by the preloaded value but changes out of freeze mode to the desired up/dowon or up or down mode? This doesn't look like it is possible at the moment...
It doesn't have to be that way, but I guess the question is , how can I hold the counter at the start value until I'm ready (issue a software trigger) to start counting?
Also, with regard to stopping the unit.. using the event trigger I could use the time based counter equal to zero (or a compare register, whichever) and generate an interrupt, but then the CPU would have to write to the freeze register to freeze it.... since the PIE/CPU isn't guaranteed timing wise, the counter may start into a new cycle... is there anyway to 'terminate cleanly at the end of a cycle and wait for the next START?
Thanks.