diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2023-10-13 21:10:11 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2023-11-16 22:07:15 -0500 |
commit | 29b7550ce5330da8e5ca4f22c1420cbeadf01eaf (patch) | |
tree | 107c086343081c9589af7be53873fea1a7a40d29 /test | |
parent | 48a05eaa542bfd4a1099c2224bda443049a6fa64 (diff) | |
download | kutter-29b7550ce5330da8e5ca4f22c1420cbeadf01eaf.tar.gz kutter-29b7550ce5330da8e5ca4f22c1420cbeadf01eaf.tar.xz kutter-29b7550ce5330da8e5ca4f22c1420cbeadf01eaf.zip |
pwm_tool: Add support for high-speed PWM pin updates
The output_pin module is only capable of updating an output pin at
most once every 100ms. Add a new pwm_tool module that is capable of
queuing updates in the micro-controller and thus allowing for much
higher update rates.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'test')
-rw-r--r-- | test/klippy/pwm.cfg | 6 | ||||
-rw-r--r-- | test/klippy/pwm.test | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/klippy/pwm.cfg b/test/klippy/pwm.cfg index 45555ca8..fbda9126 100644 --- a/test/klippy/pwm.cfg +++ b/test/klippy/pwm.cfg @@ -13,6 +13,12 @@ value: 0 shutdown_value: 0 cycle_time: 0.01 +[pwm_tool test_pwm_tool] +pin: PH4 +value: 0 +shutdown_value: 0 +cycle_time: 0.01 + [mcu] serial: /dev/ttyACM0 diff --git a/test/klippy/pwm.test b/test/klippy/pwm.test index d204cbc6..5e74a3e0 100644 --- a/test/klippy/pwm.test +++ b/test/klippy/pwm.test @@ -28,3 +28,11 @@ SET_PIN PIN=soft_pwm_pin VALUE=0.5 CYCLE_TIME=0.5 SET_PIN PIN=soft_pwm_pin VALUE=0.5 CYCLE_TIME=0.5 SET_PIN PIN=soft_pwm_pin VALUE=0.75 CYCLE_TIME=0.5 SET_PIN PIN=soft_pwm_pin VALUE=0.75 CYCLE_TIME=0.75 + +# PWM tool +# Basic test +SET_PIN PIN=test_pwm_tool VALUE=0 +SET_PIN PIN=test_pwm_tool VALUE=0.5 +SET_PIN PIN=test_pwm_tool VALUE=0.5 +SET_PIN PIN=test_pwm_tool VALUE=0.25 +SET_PIN PIN=test_pwm_tool VALUE=1 |