klipper/src/generic
Kevin O'Connor a6a6b21e4d armcm_timer: Use a static instruction count for TIMER_MIN_TRY_TICKS
Change TIMER_MIN_TRY_TICKS from 2us to 90 instructions.

On newer chips 2us is a large amount of time - for example on the
520Mhz stm32h723 it would be 1040 instructions.  Using a large time
can result in "busy waiting" in the irq handler when the cpu may be
better spent running tasks.

The armcm_timer.c code is used on most ARM cortex-M chips and on all
of these chips the SysTick timer should be tied directly to the
instruction counter.  This change should be safe because it should not
take more than 90 instructions to reschedule the timer on any of these
chips.  Also, all of these chips should be able to exit the irq
handler and reenter it in less than 90 instructions allowing more time
for tasks to run if the next timer is more than 90 timer ticks in the
future.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-12-03 17:47:50 -05:00
..
alloc.c basecmd: Move low-level alloc code into basecmd.c 2017-07-20 10:44:31 -04:00
armcm_boot.c armcm_boot: Support ARM cortex-m33 chips 2024-11-13 14:25:59 -05:00
armcm_boot.h armcm_boot: Use armcm_main() instead of main() to start board code 2019-10-24 11:16:10 -04:00
armcm_irq.c armcm_boot: Support ARM cortex-m33 chips 2024-11-13 14:25:59 -05:00
armcm_link.lds.S armcm_link: Fix build on recent arm gcc/newlibc versions 2024-06-17 12:45:07 -04:00
armcm_reset.c armcm_boot: Support ARM cortex-m33 chips 2024-11-13 14:25:59 -05:00
armcm_reset.h armcm_reset: Add a armcm_reset.h header file for try_request_canboot() 2022-06-04 11:52:39 -04:00
armcm_timer.c armcm_timer: Use a static instruction count for TIMER_MIN_TRY_TICKS 2025-12-03 17:47:50 -05:00
armcm_timer.h armcm_timer: Fix typo in comment in armcm_timer.h 2019-08-21 12:05:13 -04:00
canbus.c canbus: Rename canserial_send() to canbus_send() 2022-12-14 14:25:21 -05:00
canbus.h stm32: Add support for reporting canbus state from can.c 2025-02-02 18:43:34 -05:00
canserial.c canbus_stats: Periodically report canbus interface statistics 2025-02-02 18:43:34 -05:00
canserial.h usb_canbus: No need to check if canserial can accept a packet 2023-04-24 11:31:06 -04:00
crc16_ccitt.c command: Prefer uint8_t* for buffers; prefer uint8_fast_t for lengths 2018-05-28 10:43:39 -04:00
gpio.h sensor_lis2dw: add lis3dh sensor and i2c communication 2024-11-12 19:50:48 -05:00
io.h io.h: read/write[bwl] should use barrier 2017-02-02 10:46:42 -05:00
irq.h generic: Minor header cleanup to generic/irq.h 2020-06-07 21:18:04 -04:00
misc.h usb_cdc: Rename usb_request_bootloader() to bootloader_request() 2022-07-29 11:40:54 -04:00
pgm.h usb_cdc: Add support for usb_send_ep0_progmem() 2018-09-30 22:32:19 -04:00
serial_irq.c serial_irq: Rename SERIAL_BOOTLOADER_SIDECHANNEL to HAVE_BOOTLOADER_REQUEST 2022-12-30 21:28:32 -05:00
serial_irq.h simulator: Rework dummy simulator code to user timer_irq / serial_irq 2018-07-11 14:35:24 -04:00
timer_irq.c timer_irq: Remove TIMER_IDLE_REPEAT_TICKS special case 2025-12-03 17:47:50 -05:00
timer_irq.h sched: Implement generic sleep mechanism based on tasks pending 2017-08-08 00:27:28 -04:00
usb_canbus.c usb_canbus: Send echo frame before processing the frame 2025-02-27 13:24:19 -05:00
usb_cdc.c usb_cdc: Avoid ending a transmission with a max size usb packet 2025-02-15 18:22:45 -05:00
usb_cdc.h usb_cdc_ep: Define endpoint sizes in usb_cdc_ep.h 2025-02-15 18:22:45 -05:00
usb_cdc_ep.h usb_cdc_ep: Define endpoint sizes in usb_cdc_ep.h 2025-02-15 18:22:45 -05:00
usbstd.h usb_canbus: Initial support for USB to CAN bridge mode 2022-06-27 10:50:23 -04:00
usbstd_cdc.h lpc176x: Initial support for serial over usb 2018-05-25 11:52:13 -04:00