hi everyone, I am using lpc2378 processor. I am using timer interrupt at highest priority and USB in HID interrupt. But it does not work properly.
Iqbal
Only the problem is this it does not working properly, USB interrupts interfer in timer interrupt, or I can say that when USB Interrupt is being executed it doesnt allow timer interrupt to execute, priority doesnt matters at all. Moreover the concept of IENABLE and IDISABLE has also been verified. It doesnt make that much difference.
but this is the default behavior of your chip, unless you enable nested interrupts! and you still did not explain in detail what does not work!
Nothing, in timer interrupt I am just toggling Port 1 at 8 KHz and in USB routine I am sending data from PC to processor and then back to the PC. But toggling at 8 KHz is being affected. I think I have enabled nesting of interrupts by using IENABLE and IDISABLE, is there any other way to do this task?
> in timer interrupt I am just toggling Port 1 at 8 KHz
The times have a function to toggle output port on match. Using this function and reset on match, you get 50% duty waveform without any firmware intervention. Also, PWM module is available for waveform generation.
When you need precise timing, consider on the hardware functions, first.
Tsuneo