aboutsummaryrefslogtreecommitdiffstats
path: root/src/generic/armcm_timer.c
Commit message (Collapse)AuthorAgeFilesLines
* sched: Improve timer vs task priority checkKevin O'Connor2024-10-261-1/+1
| | | | | | | | | | | | | | | Rename sched_tasks_busy() to sched_check_set_tasks_busy() and change it to only return true if tasks are active (running or requested) for two consecutive calls. This makes it less likely that timers will yield to tasks except when tasks really are notably backlogged. This also makes it less likely that multiple steppers controlling the same rail will be interrupted by tasks mid-step. This should slightly improve the timing, and make it less likely that a halt during homing/probing will occur with these steppers taking a different number of total steps. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_boot: Add generic code for early board init on armcm machinesKevin O'Connor2019-08-221-0/+2
| | | | | | | | Add basic ARM Cortex-M C init code and build linker scripts to src/generic/ code. This can be used to simplify the various ARM board code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_timer: Improve comments on wrap_timer codeKevin O'Connor2019-07-271-3/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_timer: Support micro-controllers faster than 160MhzKevin O'Connor2019-07-241-0/+22
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_timer: Unify udelay() implementationKevin O'Connor2019-06-091-0/+14
| | | | | | | Move the udelay() code from various arm board directories into the src/generic/armcm_timer.c code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* command: Always pass a string to the DECL_CONSTANT() macroKevin O'Connor2019-03-171-1/+1
| | | | | | | | Make it clear that the name of the constant being defined is a string. When the value being defined is also a string, use a new DECL_CONSTANT_STR() macro. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_timer: Add a generic timer mechanism for ARM CortexM3/M4 chipsKevin O'Connor2019-02-061-0/+136
The ARM CortexM3 (and later) chips almost always have a 32bit timer in the "Debug and Watch Trace" (DWT) unit which resides within the cpu core itself. This timer is generally faster to access than timers located on the chip's peripheral bus. When combined with the standard ARM SysTick timer it provides a (generally) portable mechanism to implement Klipper's software timer mechanism. It's generally also faster than using the vendor specific timers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>