wfi wakeup latency on iMX.6Q platform

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

wfi wakeup latency on iMX.6Q platform

1,012 Views
xiechangwu
Contributor I

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

pastedImage_9.png

pastedImage_10.png

Labels (2)
0 Kudos
5 Replies

916 Views
igorpadykov
NXP Employee
NXP Employee

Hi changwu

for wake up times one can look at Table 10-1. Aimed power modes

i.MX6SDL Reference Manual.

However depending of processor loading times may be bigger.

https://www.nxp.com/webapp/Download?colCode=IMX6SDLRM 


Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

915 Views
xiechangwu
Contributor I

Hi, igor

  Thanks for your reply, I've seem the IMX6SDLRM and it shows that WFI wakeup time is "immediate". This value didn't match my test result(>1ms), can you help to explain it ?

  Thanks!

  pastedImage_1.png

0 Kudos

915 Views
igorpadykov
NXP Employee
NXP Employee

Hi changwu

latencies may be caused by software, Table 10-1 gives theoretical values.

Best regards
igor

0 Kudos

916 Views
xiechangwu
Contributor I

Hi, igor

  I couldn't understand "software caused latency".

  WFI-->CPU waiting for interrupt-->wakeup & continue to exec the following code.  According to my calculation, the "wakeup" point has been delay 1.211ms.

   Can you read my detailed derivation process?

0 Kudos

916 Views
igorpadykov
NXP Employee
NXP Employee

Hi changwu

for detailed analysis of latencies may be recommended to proceed

with extended support of

NXP Professional Services | NXP 

 

Best regards
igor

0 Kudos