rpi-kernel icon indicating copy to clipboard operation
rpi-kernel copied to clipboard

Wait() will be broken when running under an overclock

Open NoraCodes opened this issue 10 years ago • 1 comments

In RaspberryPiLib.cpp's Wait() (on line 82), time to wait is calculated with

uint32 target = ticks + ( time * 800 );

where 800 is a magic number based on the default clockspeed. If there's a way to detect the current clockspeed (or even just detect on boot), maybe it should use that instead?

NoraCodes avatar Apr 19 '15 06:04 NoraCodes

Oh, great point! I have a lot of changes to merge with this original project and I plan to do that soon. I'll definitely look into this and try to resolve it soon.

SharpCoder avatar Apr 20 '15 00:04 SharpCoder