Commit Graph

4553 Commits

Author SHA1 Message Date
Dennis Marttinen 83889ac435 print_stats: Fix exception when canceling in/as first G-code
Signed-off-by: Dennis Marttinen <twelho@welho.tech>
2021-11-21 08:01:43 -05:00
Kevin O'Connor 8b401382f6 stm32: Enable SPI on stm32h7
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-20 18:26:52 -05:00
adelyser 3ac354088a
stm32: Add stm32h7 SPI support (#4850)
Signed-off-by: Aaron DeLyser <bluwolf@gmail.com>
2021-11-20 18:23:23 -05:00
adelyser b480734c88 stm32: Add STM32H743 support
Signed-off-by: Aaron DeLyser <bluwolf@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-20 18:11:02 -05:00
Kevin O'Connor 7b69ef0750 stm32: Limit stm32h7 chips to 400Mhz
Don't go above 400Mhz as otherwise it causes 32bit rollover issues.
(Parts of the code expect a rollover will not occur faster than 10
seconds.)

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-20 18:11:02 -05:00
Kevin O'Connor bb08dc7ae9 atsam: Add get_pclock_frequency() helper function
Add get_pclock_frequency() and use it to calculate peripheral clocks.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-20 13:52:16 -05:00
Alex Maclean 92ca111986 atsam: Fix I2C bitrate
Multiplying the desired bitrate by 4 results in half the
desired period and thus twice the desired bitrate.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
2021-11-20 13:28:35 -05:00
Alex Maclean 01a223393e atsam: Don't enable USB FS clock on SAM3
This clock is only needed for low-power operation mode,
and wasn't correctly configured anyway (should be 48MHz).

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
2021-11-20 13:28:35 -05:00
Alex Maclean c55a94001f atsam: Don't bother disabling DMA for UART
PDC is not enabled by default so no need to disable it

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
2021-11-20 13:28:35 -05:00
Alex Maclean e2133a7301 atsam: Don't set unused bits in UART
The CHRL and NBSTOP bits are not present
in the UART peripheral, only the USART.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
2021-11-20 13:28:35 -05:00
Kevin O'Connor 326c12728c docs: Fix incorrect error description in TMC_Drivers.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-19 13:05:41 -05:00
Kevin O'Connor e772a92f16 docs: Fix spurious quote in TMC_Drivers.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-19 13:00:43 -05:00
Pedro Lamas 7ef7bf608a gcode_macro: Add "rawparams" pseudo-variable
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2021-11-19 11:22:36 -05:00
adelyser a5ec751406
stm32: Add UART4 to stm32h7 (#4848)
Signed-off-by: Aaron DeLyser <bluwolf@gmail.com>
2021-11-19 10:27:56 -05:00
Yifei Ding 08dab6f825 docs: Improve TMC_Drivers Common Error Layout
Fixed some incorrect bold text introduced in 8f46ab27, corrected some TMC feature names.

Signed-off-by: Yifei Ding <yifeiding@protonmail.com>
2021-11-19 10:25:06 -05:00
Yifei Ding 0d0d8cbb7d docs: Re-organize Hall Filament Width Sensor Doc
Signed-off-by: Yifei Ding <yifeiding@protonmail.com>
2021-11-19 10:25:06 -05:00
Yifei Ding 71ab552562 docs: skew_correction Typo and Config Highlighting
Signed-off-by: Yifei Ding <yifeiding@protonmail.com>
2021-11-19 10:25:06 -05:00
Yifei Ding c0ea48a582 docs: Match Single Blank Line Above and Below A Title
Signed-off-by: Yifei Ding <yifeiding@protonmail.com>
2021-11-19 10:25:06 -05:00
Yifei Ding d602177281 docs: Correct TMC_Drivers Title Nesting
Signed-off-by: Yifei Ding <yifeiding@protonmail.com>
2021-11-19 10:25:06 -05:00
Yifei Ding ee04a6340a docs: Align Lists
Signed-off-by: Yifei Ding <yifeiding@protonmail.com>
2021-11-19 10:25:06 -05:00
Eric Callahan 46381e03a4
gcode_macro: fix reference issues to the variables attribute (#4925)
Create a copy of the dictionary prior to updating the the variable field.
This fixes an issue where webhooks holds a reference to the variables
dict returned by get_status().

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-11-19 02:01:16 -05:00
Kevin O'Connor 68c92991ed docs: Minor example change in Code_Overview.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-16 20:33:12 -05:00
Kevin O'Connor 4861a0d958 docs: Add recommendation on Python type handling to Code_Overview.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-16 19:27:07 -05:00
Kevin O'Connor 779793c746 docs: Update Code_Overview.md with information on get_status()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-16 19:15:20 -05:00
Kevin O'Connor 34f58f2816 workflows: Limit github ticket workflows to Klipper3d/klipper repo
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-16 18:51:50 -05:00
Kevin O'Connor bea16c74be docs: Remove unneeded "raw" markdown tags from documentation
The `<!-- {% raw %} -->` tags are no longer needed now that the Jekyll
package is no longer used to process the markdown documentation.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-16 11:47:59 -05:00
Kevin O'Connor d93e21fe67 docs: Expand on default_parameter_X conversion in Config_Changes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-16 11:45:30 -05:00
Geoffrey Young 5dcc377cde temperature_sensors: add ATC Semitec 104NT-4-R025H42G thermistor
module: extras/temperature_sensors.cfg

this thermistor is the 104NT-4 resold by Trianglelab (and others on Ali),
as well as the 300 degree resold by Slice Engineering, both of which use the
same RT table (TL even links to the ATC Semitec website)

see the 300 C tab on the Slice spreadsheet:
  https://docs.google.com/spreadsheets/d/1904x5JK-Sup-cX5DqHiiZWaFVTK6_PQBFxgi_6yXEJw/edit#gid=934228925
as well as the TL product page:
  https://www.aliexpress.com/item/32843785247.html
in addition to the RT table provided in temperature_sensors.cfg

Signed-off-by: Geoffrey Young <geoffrey.young@gmail.com>
2021-11-15 23:14:32 -05:00
Kevin O'Connor cf811e52d7 docs: Update benchmarks after stepper and scheduler changes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-15 22:56:42 -05:00
Kevin O'Connor c179db3d43 temperature_sensors: Deprecate "NTC 100K beta 3950" thermistor
It seems the common "beta 3950" thermistors generally follow a
temperature table defined by the new "Generic 3950" definition.  Using
a table that actually follows the "beta 3950" temperature curve is
generally less accurate.  Deprecate the existing "NTC 100K beta 3950"
definition to avoid this common issue.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-10 18:56:51 -05:00
Kevin O'Connor 19aac4055d temperature_sensors: Add a new "Generic 3950" thermistor
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-10 18:52:55 -05:00
Kevin O'Connor c0909d2f7f temperature_sensors: Define default thermistors in config
Move the definitions of the default thermistors from thermistors.py to
the temperature_sensors.cfg file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-10 18:52:55 -05:00
Kevin O'Connor 596cd21751 temperature_sensors: Define default sensors in new config file
Move the default list of sensor modules from heaters.py to a new
temperature_sensors.cfg config file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-10 18:52:55 -05:00
Kevin O'Connor 59314d99e0 sched: Move last_insert check for improved gcc code layout
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-09 20:20:24 -05:00
Justin Schuh cfff897480 spi_flash: Better fallback on MCU protocol change
Support a set of known past config responses.

Signed-off-by: Justin Schuh <code@justinschuh.com>
2021-11-09 20:15:46 -05:00
Eric Callahan a0615e5e17 stm32f4: reset peripherals in enable_pcclock()
Reset peripherals to after enabling to clear stale
registers set by the bootloader.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-11-08 20:10:51 -05:00
Eric Callahan bf9d497ab0 stm32f4: reset peripheral clocks on init
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-11-08 20:10:51 -05:00
Justin Schuh 76bfc3237a spi_flash: Fix MCU handshake protocol
Update config response string to match new version from d4aee4f.

Signed-off-by: Justin Schuh <code@justinschuh.com>
2021-11-08 20:07:38 -05:00
Kevin O'Connor d4aee4f55e mcu: Make a minor change to the protocol to require mcu update
Commit 9ecddd1b fixed a serious error (introduced in 7d95a004).  Force
a protocol version change so users are aware of the need to update the
mcu code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-06 18:47:44 -04:00
Kevin O'Connor 9ecddd1ba4 sched: Fix scheduling bug in repeat scheduler check
Commit 7d95a004 introduced a defect - if the cached timer pointed to
by last_insert did not reschedule itself then the cache would not be
in a valid state and other active timers may not get properly
rescheduled.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-06 00:19:48 -04:00
Kevin O'Connor dccd555409 stepper: Move min_next_time check to stepper_event_full()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-04 12:06:27 -04:00
Kevin O'Connor 14cbc6f754 docs: Update MCU_Commands.md with new config_stepper command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-04 12:06:27 -04:00
Kevin O'Connor 689231df3a stepper: Add support for stepping on both edges of a step pulse
Add an optimized step function for drivers that support stepping on
both rising and falling edges of the step pin.  Enable this
optimization on 32bit ARM micro-controllers.  Automatically detect
this capability in the host code and enable on TMC drivers running in
SPI/UART mode.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-04 12:06:27 -04:00
Kevin O'Connor 4acfd8d7c8 stepper: Make step pulse duration customizable at run-time
Remove the STEP_DELAY Kconfig option and replace it with a per-stepper
step_pulse_duration printer.cfg config option.

The AVR code will continue to have optimized code to step and "unstep"
in the same function (which is automatically activated when the step
delay is 40 ticks or less).  This change removes the Kconfig option
for single function step/unstep on 32bit processors.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-04 12:06:27 -04:00
Kevin O'Connor 913d099261 linux: Use Unix signals to notify when a timer is pending
Use Unix signals in software timer implementation.  This makes the
code a little more efficient.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-02 13:27:51 -04:00
Kevin O'Connor ffeafb690b docs: Note removal of deprecated features in Config_Changes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-02 12:45:11 -04:00
Kevin O'Connor 8bfcedfb42 heaters: Remove support for deprecated pid_integral_max option
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-02 12:45:11 -04:00
Kevin O'Connor 6e0431907d gcode_macro: Remove support for deprecated features
Remove support for default_parameter_xxx config options.  Remove
support for direct access to command parameters.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-02 12:45:11 -04:00
Kevin O'Connor 0382ffbf68 pins: Remove support for deprecated pin_map option
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-02 12:45:11 -04:00
Kevin O'Connor 1699f378de console: Remove support for PINS command
Remove support for builtin pin aliases from the console.py tool.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-11-02 12:45:11 -04:00