2008-08-29 06:43 AM
2008-08-28 08:27 AM
Hi,
This is my first posting here. I am an analogue engineer really but have recently started using an ST7 in a regulator application. I am a software novice. I was getting on ok with the project until I started getting glitches in the PWM output, with long pulses being produced. This was tracked down to the fact I was setting the ATR value at the same time an a compare occured, now and then. The solution to this I am told is to use an interrupt to syncronize setting ATR to the overflow of the counter. However I have been trying this and using Interruot 9 is causing problems. The ATR values is incremented and the frequency output is increased until the frequency increase stops (at too low a frequency) and the programme malfunctions. I have no idea why this is happening and hope someone can spot the problem. Thanks, Nick2008-08-29 06:43 AM
I think this is happening due to time delays in the interrupt routine. The PWM timers runs up to about 90Kz, then stops. I was trying to get up to 300KHz.