I am using HALCogen to create a simple 0% PWM signal from the N2HET. I don't really care about the PWM, I am just using the end-of-period interrupt as a 10ms timing base. My problem is I would like to stop this timer every time it interrupts, perform a certain action (i.e. perform an i2c transfer), and then restart it.
When I stop the PWM (using pwmStop()) it stops the actual waveform generation, however the clock still runs on. Therefore, when I restart the timer (using pwmStart()) it interrupts too early.
1) Is there any way to completely stop the pwm (i.e. both the signal AND the counter) without stopping other N2HET programs that are running on the same bus?
2) I am currently using the PWM merely as a timing base. This is the best way I could think of doing so without using the RTI peripheral. Is there a better way to achieve this without using the RTI?
Thanks for the help!