Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order
    1. Home
    2. ezalys
    3. Posts
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by ezalys

    • RE: StepTimer.cpp Internals

      After a bit of further investigation, it looks like isqrt64 is never actually called. What then sets the counter frequency?

      posted in Firmware developers
      ezalys
      ezalys
    • 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?

      posted in Firmware developers
      ezalys
      ezalys