Commit Graph

5155 Commits

Author SHA1 Message Date
Pedro Lamas 9e765daeed bed_screws: Reset on move error
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2023-11-02 13:08:53 -04:00
Wayne Manion 233f50424c
config: Update generic-bigtreetech-skr-pico-v1.0.cfg (#6376)
Add RP2040 internal temperature sensor

Signed-off-by: Wayne Manion <treowayne@gmail.com>
2023-11-02 13:03:01 -04:00
Kevin O'Connor 64a97431b5 docs: Update Contact.md to note other common ways to obtain Klipper log file
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-11-01 19:04:13 -04:00
Kevin O'Connor 03982f2c7e docs: Update the Contact document
Try to make it more clear that Discord is not Discourse, as the two
similarly sounding services are often confused by users unfamiliar
with them.

The Klipper Discourse and Klipper Discord are available for many
topics related to Klipper - reword some sections to make their use
more open.

Avoid referring to the Klipper github repo in this Contact document as
we no longer use Klipper github issues at all.

Remove the table of contents as it is largely redundant for the
document.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-11-01 19:04:13 -04:00
Kevin O'Connor bee7ec720b config: Add new generic-bigtreetech-octopus-pro-v1.1.cfg config
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-30 14:29:43 -04:00
Kevin O'Connor 9b15293547 config: Clarify stepper enable comment in Octopus boards
Make sure the stepper enable_pin comment shows an inverted pin.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-30 14:29:43 -04:00
Kevin O'Connor a629b87ae0 config: Split generic-bigtreetech-octopus.cfg into separate files
Use two different files for the Octopus Pro and Octopus (non-Pro).
The configs are the same in practice, but the difference in version
and naming can lead to confusion.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-30 14:29:43 -04:00
Kevin O'Connor f7567a0db9 Revert "toolhead: Use dict for step generation flush times. (#6303)"
This reverts commit 6749985302.

A defect was found in the above commit (the input shaper code calls
note_step_generateion_scan_time() for many steppers, so the
input_shaper class can't be used as the index).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-21 15:46:08 -04:00
Viesturs Zariņš 6749985302
toolhead: Use dict for step generation flush times. (#6303)
Makes the API to extruder and input shaper more robust, avoiding the need to track the old delay.

Signed-off-by: Viesturs Zariņš <viesturz@gmail.com>
2023-10-19 13:28:16 -04:00
Tom Dunn 0c521b601d Config_checks: Missing ! in pin inversion example in Verify endstops
In the "Verify endstops" section there is an example of adding an
exclamation point to the pin definition to invert its logic.  I
believe the intention in the example is to keep the hardware pull-up
^ and follow it with ! to invert the pin logic, but the ! is missing.

Signed-off-by: Tom Dunn <thomas.dunn@gmail.com>
2023-10-19 13:13:57 -04:00
Aaron B. Haun 593486fadc docs: Fix a typo in serial bootloader entry docs
Signed-off-by: Aaron B. Haun <aaron@haun.guru>
2023-10-19 13:10:05 -04:00
Luke V dd01e99c59
atsam: Add support for CAN on atsame70 (#6366)
Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
2023-10-19 13:01:59 -04:00
Alex Maclean b1f597c550
atsam: Remove USB endpoint header (#6365)
The atsam USB hardware only requires that the ACM endpoint be endpoint
3.  As of commit 11828387 the atsam chips can therefore use the
default USB endpoints.

This will allow CAN bridge support for the SAME70 to function
(upstream host driver has hardcoded endpoints).

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
2023-10-12 21:02:26 -04:00
Aaron B. Haun ecc9bbf52a docs: add info about requesting bootloaders
Signed-off-by: Aaron B. Haun <aaron@haun.guru>
2023-10-12 20:53:31 -04:00
Kevin O'Connor 5edc7fee7e config: Fix trailing space in printer-creality-ender5-2019.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-09 13:34:58 -04:00
ghostoverflow256 7eabf02f5b
config: Update printer-creality-ender5-2019.cfg to add instructions for silent boards (#6326)
Recently tested on my ender 5 pro that came from creality with a v1.1.5 board. Works. Tested all endstops, motors, and heaters. 

Signed-off-by: Jake Aronleigh <jakestar98@outlook.com>
2023-10-09 13:28:49 -04:00
Kevin O'Connor 83ef0e135e stm32: Make sure to limit tx during usbfs startup
Wait for two tx packets before startup, and make sure one of those
packets is acked before sending a third tx packet.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-05 00:47:42 -04:00
Kevin O'Connor 447125faae serialqueue: Eventually time out if unable to write CANbus messages
Klipper logs an error on a failed CANbus write.  Unfortunately, if the
bus becomes permanently disabled (eg, due to a user removing power to
devices on the CANbus) then it can result in the logs filling with
error messages.

Permanently disable the low-level processing of messages if CANbus
writes continually fail for at least 10 seconds.  This avoids filling
the log with redundant messages.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-04 22:42:14 -04:00
Kevin O'Connor 043f18da26 stm32: Fix usbfs spurious USB packet transmit on startup
Commit cd8d57c2 added USB double buffering mode on transmits.
However, when enabling double buffering mode, the hardware seems to
always send at least two packets.  Spurious transmissions could cause
the Linux gs_usb driver to get confused, which could lead to the can0
device becoming unavailable on restarts.  Fix by waiting for two USB
packets to be available before enabling the endpoint.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-04 22:11:22 -04:00
Kevin O'Connor 615db729e7 stm32: Only enable one direction on usbfs double buffered end points
The bulk out endpoint should not be enabled in tx mode, and the bulk
in endpoint should not be enabled in rx mode.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-04 18:49:46 -04:00
Kevin O'Connor 6adff3954b usb_canbus: Prioritize local response sending over new host messages
Prioritize sending responses back to the host over transmitting new
messages from the host.  Otherwise, the gs_usb host usb
acknowledgments could saturate the usb bandwidth for extended periods.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:29:17 -04:00
Kevin O'Connor 78ae83c314 usb_canbus: Add a local queue for USB messages received from host
Read USB messages arriving from the host into a queue.  This makes it
less likely that USB "bulk out" packets will be NAK'ed on the USB bus,
which improves USB bus utilization.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:29:17 -04:00
Kevin O'Connor 5b204866c5 usb_canbus: Rename UsbCan.queue to UsbCan.canhw_queue
Rename the internal variable names.  This is in preparation for
support of a USB message queue.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:29:17 -04:00
Kevin O'Connor 472fd32cab rp2040: Add support for double buffering on USB bulk tx packets
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:28:13 -04:00
Kevin O'Connor 90427fe30e rp2040: Add support for double buffering on USB bulk rx packets
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:28:13 -04:00
Kevin O'Connor bdeec0f56d rp2040: Open code usb_read_packet() and usb_write_packet() in callers
Copy the code for these two functions to their respective callers.
This is in preparation for double buffer support.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:28:13 -04:00
Kevin O'Connor 83eecae028 rp2040: Add helper functions to usbserial.c
Add helper functions for manipulating the buffer memory and packet
control registers.  This is in preparation for double buffer support.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:28:13 -04:00
Kevin O'Connor cd8d57c2c6 stm32: Add usbfs double buffer support for bulk tx messages
Implement the usbfs fast buffer switching mechanism on the "bulk in"
endpoint.  This can improve the overall USB throughput and bus
utilization.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:26:46 -04:00
Kevin O'Connor b1361d9e5b stm32: Add usbfs double buffer support for bulk rx messages
Implement the usbfs fast buffer switching mechanism on the "bulk out"
endpoint.  This can improve the overall USB throughput and bus
utilization.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:26:46 -04:00
Kevin O'Connor 01ac5334e9 stm32: Update usbfs to support setting both buffers for each endpoint
The usbfs device supports two buffers for each endpoint - typically
one for rx and one for tx.  Add support for explicit handling of both
buffers.  This is in preparation for improved "double buffering"
support.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:26:46 -04:00
Kevin O'Connor 1e3ace2170 stm32: Improve usbfs epr register handling
Replace the set_stat_x_bits() functions with a single calc_epr_bits()
function.  This new function supports setting bits other than the stat
field in the epr register.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:26:46 -04:00
Kevin O'Connor aa726cb7cb lib: Update to latest can2040 code
Add support for can2040_stop()
Add data_state_go_error() helper
Add new can2040_get_statistics() API function
Call report_note_discarding() after setting MS_DISCARD state
Convert report_is_rx_eof_pending() to report_is_not_in_tx()

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-03 23:24:18 -04:00
Ikko Eltociear Ashimine 7bd32994d4 docs: fix typo in RPi_microcontroller.md
additionaly -> additionally

Signed-off-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
2023-09-29 13:58:29 -04:00
Dmitry Butyugin a4cd0336bd
idex_modes: Fixed the case when carriages home in the same direction (#6310)
Previous version of the code assumed that dual carriages home away
from each other, which is not true on some machines, which have the
second dual carriage homing on the first carriage. The new code
correctly identifies the relative order of the carriages now.

This fixes discrepancies between the documentation and the actual
implementation of the carriages kinematic ranges calculation.

Notes about dual_carriage homing and proximity checks changes

Fixed clearing of homing state after homing in certain modes

In case of multi-MCU homing it is possible that the carriage position
will end up outside of the allowed motion range due to latencies in data
transmission between MCUs. Selecting certain modes after homing could
result in home state clearing instead of blocking the motion of the
active carriage. This commit fixes this undesired behavior.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-09-29 13:46:42 -04:00
Kevin O'Connor 21b7842979 docs: Add Peopoly to Sponsors.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-09-26 16:51:38 -04:00
Kevin O'Connor e9bf2d4c5c mcu: Enhance RetryAsyncCommand to handle low-level retransmits
The RetryAsyncCommand code needs to ensure that any response messages
are not from a previous (unrelated) query.  To do that it compares the
'#sent_time' from potential responses to ensure they are not from a
previous session.  However, if there are any low-level serial
retransmits then the low-level code sets the '#sent_time' to zero (to
indicate that the query send time is not strictly known).  That could
result in a valid response not being accepted by RetryAsyncCommand.

If a low-level connection is experiencing a small amount of periodic
retransmits it could result in multiple high-level retry attempts
failing to the point that there is a user-facing error.  This could
result in "Timeout on wait for 'tmcuart_response' response" errors.

Fix by accepting responses even if there is a low-level retransmit
once the code can confirm that there can be no previous query still in
progress.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-09-21 14:52:55 -04:00
DavidvtWout 8ef0f7d7e3
spi_temperature: Limit maximum temperature in MAX31865.calc_adc() to melting point of platinum (#6320)
Limit the maximum temperature in MAX31865.calc_adc() to the melting
point of platinum. Above this temperature the Callendar-Van Dusem
formula does not make sense. The default value for max_temp is
99999999.9 and at this temperature the result of this formula is
negative. This sets max_sample_value to 0 which causes the mcu
to shutdown.

Set max adc value to (1<<15)-1 .  This is needed because the max value of the adc register
of the MAX31865 is 0b1111 1111 1111 1110 which represents
32767 and not 32768.

Signed-off-by: David van 't Wout <github@yoctobyte.nl>
2023-09-10 18:51:14 -04:00
FrY Sennberg 2acfa28294
tmc2240: Adding UART interface support to tmc2240 (#6305)
Signed-off-by:  Christoph Frei <fryakatkop@gmail.com>
2023-09-10 14:41:59 -04:00
Bomberski 8f178b892a
config: Add MKS Monster 8 generic config (#6336)
Signed-off-by: Allen Cox <Bomberski420@gmail.com>
2023-09-10 13:55:37 -04:00
JamesH1978 5f58fe7484
config: Add HC32F460 variant of Ender 2 Pro (#6334)
PR to add the newer version of the Ender 2 Pro with the CR-FDM-v2.5.54.170 motherboard with the HC3232F460 chip.

Confirmed as working with discord member NyftHeart and using configs from Steve Gotthardt, with his permission to use and submit.

Signed-off-by: James Hartley <james@hartleyns.com>
2023-09-10 13:52:33 -04:00
bigtreetech 5f990f93d5 Kconfig: Support Enable/Disable lis2dw on chips with small flash size
Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
2023-08-21 14:26:46 -04:00
bigtreetech 073665cebb docs: Add how to configure LIS2DW instructions
Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
2023-08-21 14:26:46 -04:00
bigtreetech ec1dcf3bd2 lis2dw12: Add support for lis2dw12 accelerometer
lis2dw12 is an accelerometer from STMicroelectronics(https://www.st.com/resource/en/datasheet/lis2dw12.pdf)
With better performance than the ADXL345 according to the datasheet.

Signed-off-by: XM.Zhou from BigTreeTech zhouxm@biqu3d.com
Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
2023-08-21 14:26:46 -04:00
Kevin O'Connor c9aa7ac871 github: Fix regression due to update of actions/stale
Commit 594c0243 updated the workflows from actions/stale@v3 to
actions/stale@v8, but did not make the corresponding updates to the
config parameters.  This resulted in the closing of some PRs.  Update
the config parameters to avoid this regression.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-08-21 13:15:53 -04:00
locki-cz 01ed8096d8
spi_flash: Update board_defs.py (#6318)
Added alias for Octopus pro h723 v1.1 for sdcard update script.

Signed-off-by: David Bucek <bucek.david@gmail.com>
2023-08-15 14:11:51 -04:00
Wulfsta 261efdd86c config: Add 1LC example configuration and docs
Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
2023-08-13 15:32:27 -04:00
Falk Höppner 4292136b16 hc32f460: Add app address 0x10000
Required for the Anycubic Kobra 2.

Signed-off-by: Falk Höppner <falk@hoppner.se>
2023-08-13 15:30:00 -04:00
flatline-84 15c3824e9b
config: Add config for printer Creality CR10s Pro V2 (#6300)
Created a base config for the Creality CR10s Pro v2 as described here: https://www.creality.com/products/cr-10s-pro-v2-3d-printer

This will allow users with this printer to more easily setup Klipper firmware.

Signed-off-by: Peter Kydas <peter@kydas.me>
2023-08-13 15:26:56 -04:00
FatalBulletHit dd368c107c
docs: Update RPi_microcontroller.md (pwm-2chan) (#6304)
Added a more detailed explanation for pwm-2chan.

Signed-off-by: Alfie Batthullt <FatalBulletHit@gmail.com>
2023-08-13 15:23:58 -04:00
Chris Lombardi 07792a02b4 scripts: Added stm32f070 to mcus supported by flash_usb.py
Verified with an Monoprice Mini Select v2 using katapult.

Signed-off-by: Chris Lombardi <clearchristx@gmail.com>
2023-08-13 14:14:55 -04:00