PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

XScale pxa-250 Slowdown?

This might be a FAQ, I apologise.

I've been debugging a problem for almost a day now and I'm beginning to suspect it's some sort of CPU management thing.

I have an iPAQ 3970 which i s pxa-250 400MHz XScale.

After playing my game for a few minutes, it experiences a slowdown. This slowdown, ironically, occurs when the game action is relatively slow. When the game action speeds up, the slowdown disappears (and the game is actually faster, are you following this?). About a second after the game action slows down again, the slowdown reappears.

These times (a few minutes till the problem appears, then a second after activity slows down) before the slowdown occurs seem independent of what's happening in the game.

I'm wondering if my CPU is just deciding to go into a slower mode or something. Does this fit the profile? How do these CPU modes work on XScale pxa-250?

I read something about "turbo" mode and "low power" mode. Can anyone explain this? Got any good URLs?

Is this a known "gotcha" issue? Or am I barking up the wrong tree?

UPDATE: if this is a "feature", is there any way to turn it off programmatically? Or at least a control panel setting I can try?
If you go into Settings->Power->Processor, you should be able to set it to: Normal, PowerSave, or Auto. (Unless that's just an Axim thing.)

Try the Normal and PowerSave settings and see if it does the same thing. (It should be defaulted to Auto).

-John
Must be an Axim thing, I don't have a processor tab.
Are there APIs I can use to set, or at least get, these settings?

I don't want to play with the crystal frequency or anything, I just want to do the equivalent of control panel functionality in my code.
Are you positive that it's not some other application that's doing it? Activesync could be doing something or a today screen item...

I had my game jerk once every few seconds because of a today screen plug-in. I think it was the one that's skinnable with the weather info and battery-memory stuff. I don't use it anymore.
I'm pretty positive.

It happens only after a few minutes of play, when the pieces are falling slow. If I edit the code to make them fall faster, it doesn't happen. That's the only change in the code.

When it happens, it only happens about 1s after fast movement in the game. So when I am slamming a block down fast (lots of movement and collision detection) it doesn't happen. When that block hits the bottom, a new slow block starts falling, and 1s later, frames are skipped. If I slam it, frames stop skipping.

Here's a question. The documentation for QueryPerformanceFrequency promises that the frequency will not change while the program is running. Is this true even when the XScale changes its speeds, or is the documentation lying?
QueryPerformanceCounter doesn't necessarely have the same frequency has the CPU. In fact, there is often no relation whatsoever between the timer and the CPU.
Yes, but is it possible that the performance counter frequency is affected by XScale speed changes?

Is there somewhere I can find out more about when the XScale does its automatic speed changes? Under what conditions?
OK I finally solved my problem, it was a bug, one I had noted but hadn't fixed because ironically I didn't want to change code while investigating the problem. Still it was tricky to track down.

My questions about the performance counter frequency and xscale still stand.