Skip to content
Commit 2f0ce5a3 authored by Roman Dobrodii's avatar Roman Dobrodii Committed by Carles Cufí
Browse files

tests/subsys/pm/power_mgmt_soc: fix various bugs



- Reduce "extra" added latency when trying to enter light
  sleep from 500ms to 50us, since light sleep states
  (e.g. "WFI idle") usually have microsecond-range residency
  times.
- Keep "extra" latency when entering deep sleep the same at
  1100ms (as we're trying to enter the deepest sleep state
  available, it doesn't hurt).
- Replace k_uptime_delta() with manual subtraction since
  k_uptime_delta() updates starting timestamp which leads to
  incorrect timing measurement when k_uptime_delta() is
  called for the second time.
- Measuring PM sleep entry latency using pm_notifier entry
  callback, do it only for the first PM entry event after
  calling k_usleep(), as during the sleep PM entry & exit
  may happen multiple times and that is normal.

Signed-off-by: default avatarRoman Dobrodii <rdobrodii@antmicro.com>
parent ddab8786
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment