rpi-kernel
rpi-kernel copied to clipboard
Wait() will be broken when running under an overclock
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?
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.