GP32 Correct Use Of Cpu_setspeed


pea

developer
Joined
Oct 3, 2004
Messages
1,089
Age
46
Location
New Zealand
Website
www.projectitis.com
Hi all,

Does the call to cpu_setSpeed have to be right at the start? Can it be called multiple times throughout the running of the program without doing anything nasty?

Reason I ask is because I want to load a ini file off the smc, and then set the CPU speed based on whats in there...

Cheers,
Pea
 
From my experience, you can set the clockspeed multiple times during a program, but you should set a basic CPU speed right at the program startup. I'm not really sure, but I *think* you would use the cpu speed of your launcher without (not really sure about that, I think the 66mhz is a standard frequency set by GPSDK, Mirko's doesn't set a standard freq).

HTH
 
Thanks don,

As long as I can set the CPU speed again later, I don't mind setting it right at the start as well. I can only test using geepee emulator because I don't have my GP32 yet (about a month)

Cheers,
Pea
 
Mirko does set a "standard frequency" at 44MHz. It's in his version of gpstart.c. If you don't set the clock, then it will use the frequency from the BIOS - usually 66MHz, except for Pacrom which is 33MHz.

You don't have to worry about setting the clock speed repeatedly. Some programs even make use of higher clock speeds for cpu-intensive processes, like GPFM when it reads an image.
 
Back
Top