Hi every body i am using an LPC-1768 MC to run a pwm. every thing works good. but when a non-pwm long-time (500ms) interrupt occurs, the pwm doesn't work. is there any trick or setup to continue running pwm in interrupt handler?
thanks Amir
Fix your 500ms interrupt instead.
Interrupt handlers should do their task in a minimum amount of time and then instantly return again.
How well do you think your PC would work, if the processor now and then locked up in a 500ms interrupt? You think it would be acceptable if your mouse cursor froze for 500ms, and no key presses were accepted?
If something takes 500ms to happen, then you need to solve that by multiple interrupts - maybe one interrupt at the start, and one at the end. Or maybe an interrupt that reacts to a pin change.
But you should not do any busy-waiting in an interrupt handler.