fastest possible interrupt
Posted: Mon Apr 02, 2012 8:39 pm
Hi,
I need to run an interrupt as fast as possible, if only for just a test, so I want to see disable anything that may preempt it. How can I achieve this? Right now I removed the prologue and epilogue and typed this directly:
#undef port_lock
#undef port_unlock
#define port_lock() asm volatile ("cpsid i" : : : "memory")
#define port_unlock() asm volatile ("cpsie i" : : : "memory")
port_lock();
/* interrupt code */
port_unlock();
but still have a lot of variation (I'm toggling a pin).
Is there a way to ensure this interrupt is not preempted at all?
T
I need to run an interrupt as fast as possible, if only for just a test, so I want to see disable anything that may preempt it. How can I achieve this? Right now I removed the prologue and epilogue and typed this directly:
#undef port_lock
#undef port_unlock
#define port_lock() asm volatile ("cpsid i" : : : "memory")
#define port_unlock() asm volatile ("cpsie i" : : : "memory")
port_lock();
/* interrupt code */
port_unlock();
but still have a lot of variation (I'm toggling a pin).
Is there a way to ensure this interrupt is not preempted at all?
T