DVFS and windows timer functions

To improve life time, we would like to set our cpu frequency to a fix level (e.g. 800 MHz) that is below the cpu max frequency (1 GHz).

Our configuration:

  • Colibri iMX6 DL
  • WinCE 7, BSP v1.6

Due to real time requirements we want to set the frequency to a fix level and do not want to have DVFS (dynamic voltage and frequency scaling) allow to adjust frequency depending on cpu load.

We tried to use DVFS to set a fix cpu frequency by setting maxFrequency and minFrequency in the registry to the same fix value:
“MaxFrequency”=dword:XXXXXXXX ;
“MinFrequency”=dword:XXXXXXX ;

This works for e.g. 500 MHz. It seems also to work for higher numbers like 600 or 800 MHz but then the windows timer functions GetTickCount() and QuerryPerformanceCounter() deliver wrong time results (e.g. time information was 20% too short when setting 800 MHz).
The timer functions deliver correct time when setting cpu frequency to 500 MHz, though.

It seems like only a few cpu frequency settings are supported physically by iMX6 but DVFS settings seem to be the reference for the windows timer functions regardless of the physically set frequency.
→ A bug of the DVFS implementation under WinCe?
→ What are the supported cpu frequencies on iMX6?

Thanks and regards,

Further tests confirm the Windows timer functions seem to be based on what is set in DVFS and not the actual (physical) cpu frequency.

Changing the DVFS frequency configuration does often not result in a (physical) cpu frequency change. There is a gap between the DVFS setting and the physically frequency. The Windows timer functions seem to be based on the DVFS setting, though:

DVFS setting (1) Physic freq (2) Windows timer deviation (3)
500 MHz ~ 475 MHz - 2%
700 MHz ~1000 MHz + 40%
800 MHz ~ 1000 MHz + 20%
1000 MHz ~ 1000 MHz +/- 0.05%

(1) DVFS registry setting (MinFrequency and MaxFrequency)
(2) Estimated frequency based on hardware interrupt
(3) Deviation of GetTickCount() time to RTC (hardware) based time

Timer ticks get calibrated based on initial CPU speed at boot time and not get updated when DVFS manipulate with CPU frequency. Toradex has no plans to fix this issue.
If you need to set fixed CPU frequency you can use set pex.cpuspeed at the eBoot menu. Timer should work properly all time if DVFS disabled.