After a bit of further investigation, it looks like isqrt64 is never actually called. What then sets the counter frequency?
Posts made by ezalys
-
RE: StepTimer.cpp Internals
-
StepTimer.cpp Internals
I'm trying to learn a bit about how the step pulse generation works and am starting by digging around in StepTimer.cpp. I'm trying to understand how exactly the timer interrupt works. The first thing I notice is the following comment
// The clock rate we use is a compromise. Too fast and the 64-bit square roots take a long time to execute. Too slow and we lose resolution.
Why should the clock rate affect the time of a square root?
Secondly, I'm not sure how the timers themselves work. Do you try and schedule an interrupt such and such time in the future and put it on a queue, and the ISR looks for the next timer event that should fire and arrange to have the timer interrupt hit you then, or does the ISR itself fire at 1 MHz?