AnsweredAssumed Answered

wfi wakeup latency on iMX.6Q  platform

Question asked by changwu xie on Jun 3, 2019
Latest reply on Jun 17, 2019 by igorpadykov

I'm debugging UART receive buffer overflow issue om iMX.6Q,  I found that wfi wakeup latency is more than 1ms, is this meets the iMX6's parameter?


SW version: linux-3.0.35

Method: ftrace with almost all function_graph


work flows:

tick 105.225384:  arch_idle_multi_core -> ca9_do_idle()    exit wfi sleep due to interrupt

tick 105.225389: start wakeup process

tick 105.225668: arch_local_irq_enable() .  

tick 105.225674: asm_do_IRQ() { .       ;UART IRQ routines

tick 105.226256:    stamp_rx_24()   } .  ;here received 24 byte from UART buffer


UART config:115200@8N1  UART IRQ trigger threshold:1byte

For 24 byte transfer, the least time is 1000 * 24 * (1start + 8bit + 1stop) / 115200 = 2.083ms

So I guess the first byte received tick is 105.226256 - 2.083ms = 105.224173s

From the ftrace result, the wakeup tick is 105.225384s; 

WFI wakeup latency: 105.225384s - 105.224173s = 1.211ms