Hi,
I have an interrupt triggered by GPIO input, and observed different interrupt
latency from different CPU state. If all the tasks are sleep, the interrupt
latency is about 20us-30us, if the CPU is in idle mode with simple calling
“__WFI()”, the interrupt latency is about 10us-15us, and if the CPU is running,
the interrupt latency can be within 8us.
I do the test as following, create a low priority task with 3 case:
1), the task loop is like
while (1){
/* keep the task in sleep mode, the interrupt will be 20us-30us */
os_time_delay(OS_TICKS_PER_SEC);
}
2). the task loop is like
while (1){
/* put the CPU in idle mode by simple calling WFI, the interrupt will be
10us-150us */
__WFI;
}
3). the task loop is like
while (1){
/* keep the CPU always running, the interrupt will be within 8us */
os_cputime_delay_usecs(1000000);
}
Any idea to reduce the interrupt latency from all tasks are in sleep mode? or
there is a hard limitation of interrupt response time?
Thanks,
Jiacheng