| 
									
										
										
										
											2021-07-22 00:40:40 +02:00
										 |  |  | # Benchmarks
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | This document describes Klipper benchmarks. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ## Micro-controller Benchmarks
 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | This section describes the mechanism used to generate the Klipper | 
					
						
							|  |  |  | micro-controller step rate benchmarks. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The primary goal of the benchmarks is to provide a consistent | 
					
						
							|  |  |  | mechanism for measuring the impact of coding changes within the | 
					
						
							|  |  |  | software. A secondary goal is to provide high-level metrics for | 
					
						
							|  |  |  | comparing the performance between chips and between software | 
					
						
							|  |  |  | platforms. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The step rate benchmark is designed to find the maximum stepping rate | 
					
						
							|  |  |  | that the hardware and software can reach. This benchmark stepping rate | 
					
						
							|  |  |  | is not achievable in day-to-day use as Klipper needs to perform other | 
					
						
							|  |  |  | tasks (eg, mcu/host communication, temperature reading, endstop | 
					
						
							|  |  |  | checking) in any real-world usage. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | In general, the pins for the benchmark tests are chosen to flash LEDs | 
					
						
							|  |  |  | or other innocuous pins. **Always verify that it is safe to drive the | 
					
						
							|  |  |  | configured pins prior to running a benchmark.** It is not recommended | 
					
						
							|  |  |  | to drive an actual stepper during a benchmark. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ### Step rate benchmark test
 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | The test is performed using the console.py tool (described in | 
					
						
							|  |  |  | [Debugging.md](Debugging.md)). The micro-controller is configured for | 
					
						
							|  |  |  | the particular hardware platform (see below) and then the following is | 
					
						
							|  |  |  | cut-and-paste into the console.py terminal window: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | SET start_clock {clock+freq} | 
					
						
							|  |  |  | SET ticks 1000 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | reset_step_clock oid=0 clock={start_clock} | 
					
						
							|  |  |  | set_next_step_dir oid=0 dir=0 | 
					
						
							|  |  |  | queue_step oid=0 interval={ticks} count=60000 add=0 | 
					
						
							|  |  |  | set_next_step_dir oid=0 dir=1 | 
					
						
							|  |  |  | queue_step oid=0 interval=3000 count=1 add=0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | reset_step_clock oid=1 clock={start_clock} | 
					
						
							|  |  |  | set_next_step_dir oid=1 dir=0 | 
					
						
							|  |  |  | queue_step oid=1 interval={ticks} count=60000 add=0 | 
					
						
							|  |  |  | set_next_step_dir oid=1 dir=1 | 
					
						
							|  |  |  | queue_step oid=1 interval=3000 count=1 add=0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | reset_step_clock oid=2 clock={start_clock} | 
					
						
							|  |  |  | set_next_step_dir oid=2 dir=0 | 
					
						
							|  |  |  | queue_step oid=2 interval={ticks} count=60000 add=0 | 
					
						
							|  |  |  | set_next_step_dir oid=2 dir=1 | 
					
						
							|  |  |  | queue_step oid=2 interval=3000 count=1 add=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The above tests three steppers simultaneously stepping. If running the | 
					
						
							|  |  |  | above results in a "Rescheduled timer in the past" or "Stepper too far | 
					
						
							|  |  |  | in past" error then it indicates the `ticks` parameter is too low (it | 
					
						
							|  |  |  | results in a stepping rate that is too fast). The goal is to find the | 
					
						
							|  |  |  | lowest setting of the ticks parameter that reliably results in a | 
					
						
							|  |  |  | successful completion of the test. It should be possible to bisect the | 
					
						
							|  |  |  | ticks parameter until a stable value is found. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | On a failure, one can copy-and-paste the following to clear the error | 
					
						
							|  |  |  | in preparation for the next test: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | clear_shutdown | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | To obtain the single stepper benchmarks, the same configuration | 
					
						
							|  |  |  | sequence is used, but only the first block of the above test is | 
					
						
							|  |  |  | cut-and-paste into the console.py window. | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-20 23:12:29 -08:00
										 |  |  | To produce the benchmarks found in the [Features](Features.md) document, the total | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | number of steps per second is calculated by multiplying the number of | 
					
						
							|  |  |  | active steppers with the nominal mcu frequency and dividing by the | 
					
						
							|  |  |  | final ticks parameter. The results are rounded to the nearest K. For | 
					
						
							|  |  |  | example, with three active steppers: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | ECHO Test result is: {"%.0fK" % (3. * freq / ticks / 1000.)} | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | The benchmarks are run with parameters suitable for TMC Drivers. For | 
					
						
							|  |  |  | micro-controllers that support `STEPPER_BOTH_EDGE=1` (as reported in | 
					
						
							|  |  |  | the `MCU config` line when console.py first starts) use | 
					
						
							|  |  |  | `step_pulse_duration=0` and `invert_step=-1` to enable optimized | 
					
						
							|  |  |  | stepping on both edges of the step pulse. For other micro-controllers | 
					
						
							|  |  |  | use a `step_pulse_duration` corresponding to 100ns. | 
					
						
							| 
									
										
										
										
											2019-09-08 10:37:25 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ### AVR step rate benchmark
 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | The following configuration sequence is used on AVR chips: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | allocate_oids count=3 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | config_stepper oid=0 step_pin=PA5 dir_pin=PA4 invert_step=0 step_pulse_ticks=32 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=PA3 dir_pin=PA2 invert_step=0 step_pulse_ticks=32 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=PC7 dir_pin=PC6 invert_step=0 step_pulse_ticks=32 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | The test was last run on commit `59314d99` with gcc version `avr-gcc | 
					
						
							| 
									
										
										
										
											2019-09-06 13:24:20 -04:00
										 |  |  | (GCC) 5.4.0`. Both the 16Mhz and 20Mhz tests were run using simulavr | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | configured for an atmega644p (previous tests have confirmed simulavr | 
					
						
							|  |  |  | results match tests on both a 16Mhz at90usb and a 16Mhz atmega2560). | 
					
						
							| 
									
										
										
										
											2019-09-08 00:41:34 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | | avr              | ticks | | 
					
						
							|  |  |  | | ---------------- | ----- | | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | | 1 stepper        | 102   | | 
					
						
							|  |  |  | | 3 stepper        | 486   | | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ### Arduino Due step rate benchmark
 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | The following configuration sequence is used on the Due: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | allocate_oids count=3 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | config_stepper oid=0 step_pin=PB27 dir_pin=PA21 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=PB26 dir_pin=PC30 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=PA21 dir_pin=PC30 invert_step=-1 step_pulse_ticks=0 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | The test was last run on commit `59314d99` with gcc version | 
					
						
							|  |  |  | `arm-none-eabi-gcc (Fedora 10.2.0-4.fc34) 10.2.0`. | 
					
						
							| 
									
										
										
										
											2019-09-08 00:41:34 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-08 10:37:25 -04:00
										 |  |  | | sam3x8e              | ticks | | 
					
						
							|  |  |  | | -------------------- | ----- | | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | | 1 stepper            | 66    | | 
					
						
							|  |  |  | | 3 stepper            | 257   | | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ### Duet Maestro step rate benchmark
 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | The following configuration sequence is used on the Duet Maestro: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | allocate_oids count=3 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | config_stepper oid=0 step_pin=PC26 dir_pin=PC18 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=PC26 dir_pin=PA8 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=PC26 dir_pin=PB4 invert_step=-1 step_pulse_ticks=0 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | The test was last run on commit `59314d99` with gcc version | 
					
						
							|  |  |  | `arm-none-eabi-gcc (Fedora 10.2.0-4.fc34) 10.2.0`. | 
					
						
							| 
									
										
										
										
											2019-09-08 01:12:11 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | | sam4s8c              | ticks | | 
					
						
							|  |  |  | | -------------------- | ----- | | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | | 1 stepper            | 71    | | 
					
						
							|  |  |  | | 3 stepper            | 260   | | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ### Duet Wifi step rate benchmark
 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | The following configuration sequence is used on the Duet Wifi: | 
					
						
							|  |  |  | ``` | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | allocate_oids count=3 | 
					
						
							|  |  |  | config_stepper oid=0 step_pin=PD6 dir_pin=PD11 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=PD7 dir_pin=PD12 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=PD8 dir_pin=PD13 invert_step=-1 step_pulse_ticks=0 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | The test was last run on commit `59314d99` with gcc version | 
					
						
							|  |  |  | `gcc version 10.3.1 20210621 (release) (GNU Arm Embedded Toolchain 10.3-2021.07)`. | 
					
						
							| 
									
										
										
										
											2019-09-08 00:41:34 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | | sam4e8e          | ticks | | 
					
						
							|  |  |  | | ---------------- | ----- | | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | | 1 stepper        | 48    | | 
					
						
							|  |  |  | | 3 stepper        | 215   | | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ### Beaglebone PRU step rate benchmark
 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | The following configuration sequence is used on the PRU: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | allocate_oids count=3 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | config_stepper oid=0 step_pin=gpio0_23 dir_pin=gpio1_12 invert_step=0 step_pulse_ticks=20 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=gpio1_15 dir_pin=gpio0_26 invert_step=0 step_pulse_ticks=20 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=gpio0_22 dir_pin=gpio2_1 invert_step=0 step_pulse_ticks=20 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | The test was last run on commit `59314d99` with gcc version `pru-gcc | 
					
						
							| 
									
										
										
										
											2019-09-08 00:41:34 -04:00
										 |  |  | (GCC) 8.0.0 20170530 (experimental)`. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | | pru              | ticks | | 
					
						
							|  |  |  | | ---------------- | ----- | | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | | 1 stepper        | 231   | | 
					
						
							|  |  |  | | 3 stepper        | 847   | | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ### STM32F042 step rate benchmark
 | 
					
						
							| 
									
										
										
										
											2019-03-29 15:38:54 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | The following configuration sequence is used on the STM32F042: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | allocate_oids count=3 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | config_stepper oid=0 step_pin=PA1 dir_pin=PA2 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=PA3 dir_pin=PA2 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=PB8 dir_pin=PA2 invert_step=-1 step_pulse_ticks=0 | 
					
						
							| 
									
										
										
										
											2019-03-29 15:38:54 +02:00
										 |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | The test was last run on commit `59314d99` with gcc version | 
					
						
							|  |  |  | `arm-none-eabi-gcc (Fedora 10.2.0-4.fc34) 10.2.0`. | 
					
						
							| 
									
										
										
										
											2019-09-08 00:41:34 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | | stm32f042        | ticks | | 
					
						
							|  |  |  | | ---------------- | ----- | | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | | 1 stepper        | 59    | | 
					
						
							|  |  |  | | 3 stepper        | 249   | | 
					
						
							| 
									
										
										
										
											2019-03-29 15:38:54 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ### STM32F103 step rate benchmark
 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | The following configuration sequence is used on the STM32F103: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | allocate_oids count=3 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | config_stepper oid=0 step_pin=PC13 dir_pin=PB5 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=PB3 dir_pin=PB6 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=PA4 dir_pin=PB7 invert_step=-1 step_pulse_ticks=0 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | The test was last run on commit `59314d99` with gcc version | 
					
						
							|  |  |  | `arm-none-eabi-gcc (Fedora 10.2.0-4.fc34) 10.2.0`. | 
					
						
							| 
									
										
										
										
											2019-09-08 00:41:34 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-08 09:25:31 -04:00
										 |  |  | | stm32f103            | ticks | | 
					
						
							|  |  |  | | -------------------- | ----- | | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | | 1 stepper            | 61    | | 
					
						
							|  |  |  | | 3 stepper            | 264   | | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ### STM32F4 step rate benchmark
 | 
					
						
							| 
									
										
										
										
											2019-07-25 18:18:42 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-31 20:43:56 -04:00
										 |  |  | The following configuration sequence is used on the STM32F4: | 
					
						
							| 
									
										
										
										
											2019-07-25 18:18:42 -04:00
										 |  |  | ``` | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | allocate_oids count=3 | 
					
						
							|  |  |  | config_stepper oid=0 step_pin=PA5 dir_pin=PB5 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=PB2 dir_pin=PB6 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=PB3 dir_pin=PB7 invert_step=-1 step_pulse_ticks=0 | 
					
						
							| 
									
										
										
										
											2019-07-25 18:18:42 -04:00
										 |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | The test was last run on commit `59314d99` with gcc version | 
					
						
							|  |  |  | `arm-none-eabi-gcc (Fedora 10.2.0-4.fc34) 10.2.0`. The STM32F407 | 
					
						
							|  |  |  | results were obtained by running an STM32F407 binary on an STM32F446 | 
					
						
							|  |  |  | (and thus using a 168Mhz clock). | 
					
						
							| 
									
										
										
										
											2019-09-08 00:41:34 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-08 10:37:25 -04:00
										 |  |  | | stm32f446            | ticks | | 
					
						
							|  |  |  | | -------------------- | ----- | | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | | 1 stepper            | 46    | | 
					
						
							|  |  |  | | 3 stepper            | 205   | | 
					
						
							| 
									
										
										
										
											2019-09-08 10:37:25 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | | stm32f407            | ticks | | 
					
						
							|  |  |  | | -------------------- | ----- | | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | | 1 stepper            | 46    | | 
					
						
							|  |  |  | | 3 stepper            | 205   | | 
					
						
							| 
									
										
										
										
											2019-07-25 18:18:42 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-20 22:10:36 +02:00
										 |  |  | ### STM32H7 step rate benchmark
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-22 00:12:33 -04:00
										 |  |  | The following configuration sequence is used on STM32H723: | 
					
						
							| 
									
										
										
										
											2022-10-20 22:10:36 +02:00
										 |  |  | ``` | 
					
						
							|  |  |  | allocate_oids count=3 | 
					
						
							| 
									
										
										
										
											2025-04-22 00:12:33 -04:00
										 |  |  | config_stepper oid=0 step_pin=PA13 dir_pin=PB5 invert_step=-1 step_pulse_ticks=52 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=PB2 dir_pin=PB6 invert_step=-1 step_pulse_ticks=52 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=PB3 dir_pin=PB7 invert_step=-1 step_pulse_ticks=52 | 
					
						
							| 
									
										
										
										
											2022-10-20 22:10:36 +02:00
										 |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-22 00:12:33 -04:00
										 |  |  | The test was last run on commit `554ae78d` with gcc version | 
					
						
							| 
									
										
										
										
											2025-03-12 04:01:48 -04:00
										 |  |  | `arm-none-eabi-gcc (Fedora 14.1.0-1.fc40) 14.1.0`. | 
					
						
							| 
									
										
										
										
											2022-10-20 22:10:36 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-03-12 04:01:48 -04:00
										 |  |  | | stm32h723            | ticks | | 
					
						
							| 
									
										
										
										
											2022-10-20 22:10:36 +02:00
										 |  |  | | -------------------- | ----- | | 
					
						
							| 
									
										
										
										
											2025-04-22 00:12:33 -04:00
										 |  |  | | 1 stepper            | 70    | | 
					
						
							|  |  |  | | 3 stepper            | 181   | | 
					
						
							| 
									
										
										
										
											2022-10-20 22:10:36 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-27 10:47:52 -05:00
										 |  |  | ### STM32G0B1 step rate benchmark
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The following configuration sequence is used on the STM32G0B1: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | allocate_oids count=3 | 
					
						
							|  |  |  | config_stepper oid=0 step_pin=PB13 dir_pin=PB12 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=PB10 dir_pin=PB2 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=PB0 dir_pin=PC5 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The test was last run on commit `247cd753` with gcc version | 
					
						
							|  |  |  | `arm-none-eabi-gcc (Fedora 10.2.0-4.fc34) 10.2.0`. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-06 14:54:50 -04:00
										 |  |  | | stm32g0b1        | ticks | | 
					
						
							| 
									
										
										
										
											2021-12-27 10:47:52 -05:00
										 |  |  | | ---------------- | ----- | | 
					
						
							|  |  |  | | 1 stepper        | 58    | | 
					
						
							|  |  |  | | 3 stepper        | 243   | | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-31 12:41:31 -04:00
										 |  |  | ### STM32G4 step rate benchmark
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The following configuration sequence is used on the STM32G431: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | allocate_oids count=3 | 
					
						
							|  |  |  | config_stepper oid=0 step_pin=PA0 dir_pin=PB5 invert_step=-1 step_pulse_ticks=17 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=PB2 dir_pin=PB6 invert_step=-1 step_pulse_ticks=17 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=PB3 dir_pin=PB7 invert_step=-1 step_pulse_ticks=17 | 
					
						
							|  |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The test was last run on commit `cfa48fe3` with gcc version | 
					
						
							|  |  |  | `arm-none-eabi-gcc (Fedora 14.1.0-1.fc40) 14.1.0`. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | | stm32g431        | ticks | | 
					
						
							|  |  |  | | ---------------- | ----- | | 
					
						
							|  |  |  | | 1 stepper        | 47    | | 
					
						
							|  |  |  | | 3 stepper        | 208   | | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ### LPC176x step rate benchmark
 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | The following configuration sequence is used on the LPC176x: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | allocate_oids count=3 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | config_stepper oid=0 step_pin=P1.20 dir_pin=P1.18 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=P1.21 dir_pin=P1.18 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=P1.23 dir_pin=P1.18 invert_step=-1 step_pulse_ticks=0 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | The test was last run on commit `59314d99` with gcc version | 
					
						
							|  |  |  | `arm-none-eabi-gcc (Fedora 10.2.0-4.fc34) 10.2.0`. The 120Mhz LPC1769 | 
					
						
							| 
									
										
										
										
											2019-09-08 00:41:34 -04:00
										 |  |  | results were obtained by overclocking an LPC1768 to 120Mhz. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-08 10:37:25 -04:00
										 |  |  | | lpc1768              | ticks | | 
					
						
							|  |  |  | | -------------------- | ----- | | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | | 1 stepper            | 52    | | 
					
						
							|  |  |  | | 3 stepper            | 222   | | 
					
						
							| 
									
										
										
										
											2019-09-08 00:41:34 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-08 10:37:25 -04:00
										 |  |  | | lpc1769              | ticks | | 
					
						
							|  |  |  | | -------------------- | ----- | | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | | 1 stepper            | 51    | | 
					
						
							|  |  |  | | 3 stepper            | 222   | | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ### SAMD21 step rate benchmark
 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | The following configuration sequence is used on the SAMD21: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | allocate_oids count=3 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | config_stepper oid=0 step_pin=PA27 dir_pin=PA20 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=PB3 dir_pin=PA21 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=PA17 dir_pin=PA21 invert_step=-1 step_pulse_ticks=0 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | The test was last run on commit `59314d99` with gcc version | 
					
						
							|  |  |  | `arm-none-eabi-gcc (Fedora 10.2.0-4.fc34) 10.2.0` on a SAMD21G18 | 
					
						
							| 
									
										
										
										
											2019-09-08 00:41:34 -04:00
										 |  |  | micro-controller. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-08 10:37:25 -04:00
										 |  |  | | samd21               | ticks | | 
					
						
							|  |  |  | | -------------------- | ----- | | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | | 1 stepper            | 70    | | 
					
						
							|  |  |  | | 3 stepper            | 306   | | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ### SAMD51 step rate benchmark
 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | The following configuration sequence is used on the SAMD51: | 
					
						
							|  |  |  | ``` | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | allocate_oids count=3 | 
					
						
							|  |  |  | config_stepper oid=0 step_pin=PA22 dir_pin=PA20 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=PA22 dir_pin=PA21 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=PA22 dir_pin=PA19 invert_step=-1 step_pulse_ticks=0 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | The test was last run on commit `59314d99` with gcc version | 
					
						
							|  |  |  | `arm-none-eabi-gcc (Fedora 10.2.0-4.fc34) 10.2.0` on a SAMD51J19A | 
					
						
							| 
									
										
										
										
											2019-09-08 00:41:34 -04:00
										 |  |  | micro-controller. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-08 10:37:25 -04:00
										 |  |  | | samd51               | ticks | | 
					
						
							|  |  |  | | -------------------- | ----- | | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | | 1 stepper            | 39    | | 
					
						
							|  |  |  | | 3 stepper            | 191   | | 
					
						
							|  |  |  | | 1 stepper (200Mhz)   | 39    | | 
					
						
							|  |  |  | | 3 stepper (200Mhz)   | 181   | | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-09 22:10:46 -04:00
										 |  |  | ### SAME70 step rate benchmark
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The following configuration sequence is used on the SAME70: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | allocate_oids count=3 | 
					
						
							|  |  |  | config_stepper oid=0 step_pin=PC18 dir_pin=PB5 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=PC16 dir_pin=PD10 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=PC28 dir_pin=PA4 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-28 15:15:08 -04:00
										 |  |  | The test was last run on commit `34e9ea55` with gcc version | 
					
						
							| 
									
										
										
										
											2024-10-09 22:10:46 -04:00
										 |  |  | `arm-none-eabi-gcc (NixOS 10.3-2021.10) 10.3.1` on a SAME70Q20B | 
					
						
							|  |  |  | micro-controller. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | | same70               | ticks | | 
					
						
							|  |  |  | | -------------------- | ----- | | 
					
						
							|  |  |  | | 1 stepper            | 45    | | 
					
						
							|  |  |  | | 3 stepper            | 190   | | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-21 02:15:01 +01:00
										 |  |  | ### AR100 step rate benchmark ###
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The following configuration sequence is used on AR100 CPU (Allwinner A64): | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | allocate_oids count=3 | 
					
						
							|  |  |  | config_stepper oid=0 step_pin=PL10 dir_pin=PE14 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=PL11 dir_pin=PE15 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=PL12 dir_pin=PE16 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-28 15:15:08 -04:00
										 |  |  | The test was last run on commit `b7978d37` with gcc version | 
					
						
							| 
									
										
										
										
											2023-02-21 02:15:01 +01:00
										 |  |  | `or1k-linux-musl-gcc (GCC) 9.2.0` on an Allwinner A64-H | 
					
						
							|  |  |  | micro-controller. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | | AR100 R_PIO          | ticks | | 
					
						
							|  |  |  | | -------------------- | ----- | | 
					
						
							|  |  |  | | 1 stepper            | 85    | | 
					
						
							|  |  |  | | 3 stepper            | 359   | | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-28 13:48:07 -04:00
										 |  |  | ### RPxxxx step rate benchmark
 | 
					
						
							| 
									
										
										
										
											2021-06-22 00:57:28 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-28 13:48:07 -04:00
										 |  |  | The following configuration sequence is used on the RP2040 and RP2350: | 
					
						
							| 
									
										
										
										
											2021-06-22 00:57:28 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | ``` | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | allocate_oids count=3 | 
					
						
							|  |  |  | config_stepper oid=0 step_pin=gpio25 dir_pin=gpio3 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=gpio26 dir_pin=gpio4 invert_step=-1 step_pulse_ticks=0 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=gpio27 dir_pin=gpio5 invert_step=-1 step_pulse_ticks=0 | 
					
						
							| 
									
										
										
										
											2021-06-22 00:57:28 -04:00
										 |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-02-26 20:25:18 -05:00
										 |  |  | The test was last run on commit `14c105b8` with gcc version | 
					
						
							| 
									
										
										
										
											2024-10-28 13:48:07 -04:00
										 |  |  | `arm-none-eabi-gcc (Fedora 14.1.0-1.fc40) 14.1.0` on Raspberry Pi | 
					
						
							|  |  |  | Pico and Pico 2 boards. | 
					
						
							| 
									
										
										
										
											2021-06-22 00:57:28 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-28 13:48:07 -04:00
										 |  |  | | rp2040 (*)           | ticks | | 
					
						
							| 
									
										
										
										
											2021-06-22 00:57:28 -04:00
										 |  |  | | -------------------- | ----- | | 
					
						
							| 
									
										
										
										
											2025-02-26 20:25:18 -05:00
										 |  |  | | 1 stepper            | 3     | | 
					
						
							|  |  |  | | 3 stepper            | 14    | | 
					
						
							| 
									
										
										
										
											2021-06-22 00:57:28 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-28 13:48:07 -04:00
										 |  |  | | rp2350               | ticks | | 
					
						
							|  |  |  | | -------------------- | ----- | | 
					
						
							|  |  |  | | 1 stepper            | 36    | | 
					
						
							|  |  |  | | 3 stepper            | 169   | | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | (*) Note that the reported rp2040 ticks are relative to a 12Mhz | 
					
						
							| 
									
										
										
										
											2025-02-26 20:25:18 -05:00
										 |  |  | scheduling timer and do not correspond to its 200Mhz internal ARM | 
					
						
							| 
									
										
										
										
											2025-06-08 12:23:02 -04:00
										 |  |  | processing rate. It is expected that 3 scheduling ticks corresponds to | 
					
						
							| 
									
										
										
										
											2025-02-26 20:25:18 -05:00
										 |  |  | ~42 ARM core cycles and 14 scheduling ticks corresponds to ~225 ARM | 
					
						
							| 
									
										
										
										
											2024-10-28 13:48:07 -04:00
										 |  |  | core cycles. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ### Linux MCU step rate benchmark
 | 
					
						
							| 
									
										
										
										
											2020-06-07 09:27:55 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | The following configuration sequence is used on a Raspberry Pi: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | allocate_oids count=3 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | config_stepper oid=0 step_pin=gpio2 dir_pin=gpio3 invert_step=0 step_pulse_ticks=5 | 
					
						
							|  |  |  | config_stepper oid=1 step_pin=gpio4 dir_pin=gpio5 invert_step=0 step_pulse_ticks=5 | 
					
						
							|  |  |  | config_stepper oid=2 step_pin=gpio6 dir_pin=gpio17 invert_step=0 step_pulse_ticks=5 | 
					
						
							| 
									
										
										
										
											2020-06-07 09:27:55 -04:00
										 |  |  | finalize_config crc=0 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | The test was last run on commit `59314d99` with gcc version | 
					
						
							|  |  |  | `gcc (Raspbian 8.3.0-6+rpi1) 8.3.0` on a Raspberry Pi 3 (revision | 
					
						
							|  |  |  | a02082). It was difficult to get stable results in this benchmark. | 
					
						
							| 
									
										
										
										
											2020-06-07 09:27:55 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | | Linux (RPi3)         | ticks | | 
					
						
							|  |  |  | | -------------------- | ----- | | 
					
						
							| 
									
										
										
										
											2021-11-04 22:08:32 -04:00
										 |  |  | | 1 stepper            | 160   | | 
					
						
							|  |  |  | | 3 stepper            | 380   | | 
					
						
							| 
									
										
										
										
											2020-06-07 09:27:55 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ## Command dispatch benchmark
 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | The command dispatch benchmark tests how many "dummy" commands the | 
					
						
							|  |  |  | micro-controller can process. It is primarily a test of the hardware | 
					
						
							|  |  |  | communication mechanism. The test is run using the console.py tool | 
					
						
							|  |  |  | (described in [Debugging.md](Debugging.md)). The following is | 
					
						
							|  |  |  | cut-and-paste into the console.py terminal window: | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | DELAY {clock + 2*freq} get_uptime | 
					
						
							| 
									
										
										
										
											2021-05-02 23:20:11 -04:00
										 |  |  | FLOOD 100000 0.0 debug_nop | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | get_uptime | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | When the test completes, determine the difference between the clocks | 
					
						
							|  |  |  | reported in the two "uptime" response messages. The total number of | 
					
						
							|  |  |  | commands per second is then `100000 * mcu_frequency / clock_diff`. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-31 12:24:40 -04:00
										 |  |  | The USB tests may exceed the CPU capacity of a Raspberry Pi. If | 
					
						
							|  |  |  | running on a Raspberry Pi, Beaglebone, or similar host computer then | 
					
						
							|  |  |  | increase the delay (eg, `DELAY {clock + 20*freq} get_uptime`). Where | 
					
						
							|  |  |  | applicable, the benchmarks below are with console.py running on a | 
					
						
							|  |  |  | desktop class machine with the device connected via a super-speed hub. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The CAN bus tests may saturate the USB host controller of a Raspberry | 
					
						
							|  |  |  | Pi (when testing via a standard gs_usb USB to CAN bus adapter). Where | 
					
						
							|  |  |  | applicable, the CAN bus benchmarks below are with console.py running | 
					
						
							|  |  |  | on a desktop class machine with a USB to CAN bus adapter connected via | 
					
						
							|  |  |  | a super-speed USB hub. | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | | MCU                 | Rate | Build    | Build compiler      | | 
					
						
							|  |  |  | | ------------------- | ---- | -------- | ------------------- | | 
					
						
							|  |  |  | | atmega2560 (serial) |  23K | b161a69e | avr-gcc (GCC) 4.8.1 | | 
					
						
							|  |  |  | | sam3x8e (serial)    |  23K | b161a69e | arm-none-eabi-gcc (Fedora 7.1.0-5.fc27) 7.1.0 | | 
					
						
							| 
									
										
										
										
											2025-05-31 12:24:40 -04:00
										 |  |  | | rp2350 (CAN)        |  59K | 17b8ce4c | arm-none-eabi-gcc (Fedora 14.1.0-1.fc40) 14.1.0 | | 
					
						
							| 
									
										
										
										
											2019-09-06 13:24:20 -04:00
										 |  |  | | at90usb1286 (USB)   |  75K | 01d2183f | avr-gcc (GCC) 5.4.0 | | 
					
						
							| 
									
										
										
										
											2023-02-21 02:15:01 +01:00
										 |  |  | | ar100 (serial)      | 138K | 08d037c6 | or1k-linux-musl-gcc 9.3.0 | | 
					
						
							| 
									
										
										
										
											2019-09-06 13:07:08 -04:00
										 |  |  | | samd21 (USB)        | 223K | 01d2183f | arm-none-eabi-gcc (Fedora 7.4.0-1.fc30) 7.4.0 | | 
					
						
							| 
									
										
										
										
											2021-02-12 12:34:41 -05:00
										 |  |  | | pru (shared memory) | 260K | c5968a08 | pru-gcc (GCC) 8.0.0 20170530 (experimental) | | 
					
						
							| 
									
										
										
										
											2019-09-06 13:07:08 -04:00
										 |  |  | | stm32f103 (USB)     | 355K | 01d2183f | arm-none-eabi-gcc (Fedora 7.4.0-1.fc30) 7.4.0 | | 
					
						
							|  |  |  | | sam3x8e (USB)       | 418K | 01d2183f | arm-none-eabi-gcc (Fedora 7.4.0-1.fc30) 7.4.0 | | 
					
						
							|  |  |  | | lpc1768 (USB)       | 534K | 01d2183f | arm-none-eabi-gcc (Fedora 7.4.0-1.fc30) 7.4.0 | | 
					
						
							|  |  |  | | lpc1769 (USB)       | 628K | 01d2183f | arm-none-eabi-gcc (Fedora 7.4.0-1.fc30) 7.4.0 | | 
					
						
							| 
									
										
										
										
											2019-09-08 09:13:51 -04:00
										 |  |  | | sam4s8c (USB)       | 650K | 8d4a5c16 | arm-none-eabi-gcc (Fedora 7.4.0-1.fc30) 7.4.0 | | 
					
						
							| 
									
										
										
										
											2019-09-06 13:07:08 -04:00
										 |  |  | | samd51 (USB)        | 864K | 01d2183f | arm-none-eabi-gcc (Fedora 7.4.0-1.fc30) 7.4.0 | | 
					
						
							|  |  |  | | stm32f446 (USB)     | 870K | 01d2183f | arm-none-eabi-gcc (Fedora 7.4.0-1.fc30) 7.4.0 | | 
					
						
							| 
									
										
										
										
											2024-10-28 13:48:07 -04:00
										 |  |  | | rp2040 (USB)        | 885K | f6718291 | arm-none-eabi-gcc (Fedora 14.1.0-1.fc40) 14.1.0 | | 
					
						
							|  |  |  | | rp2350 (USB)        | 885K | f6718291 | arm-none-eabi-gcc (Fedora 14.1.0-1.fc40) 14.1.0 | | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 13:29:36 -04:00
										 |  |  | ## Host Benchmarks
 | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | It is possible to run timing tests on the host software using the | 
					
						
							|  |  |  | "batch mode" processing mechanism (described in | 
					
						
							|  |  |  | [Debugging.md](Debugging.md)). This is typically done by choosing a | 
					
						
							|  |  |  | large and complex G-Code file and timing how long it takes for the | 
					
						
							|  |  |  | host software to process it. For example: | 
					
						
							|  |  |  | ``` | 
					
						
							| 
									
										
										
										
											2020-11-16 18:47:32 -05:00
										 |  |  | time ~/klippy-env/bin/python ./klippy/klippy.py config/example-cartesian.cfg -i something_complex.gcode -o /dev/null -d out/klipper.dict | 
					
						
							| 
									
										
										
										
											2019-03-28 09:47:10 -04:00
										 |  |  | ``` |