Commit Graph

152 Commits

Author SHA1 Message Date
Yuri D'Elia 6ceca9bf85 Implement double-edge stepping
Introduce new wrapper macros to tick the stepper pins.
Default to the original raising-edge stepping mode.

When using the TMC double-edge stepping mode (aka half-wave or
square-wave mode) the _LO macros become no-ops.
2020-06-24 17:58:43 +02:00
Yuri D'Elia 6017600714 Reintroduce the ability to disable TMC interpolation per-axis 2020-06-24 17:58:43 +02:00
Alex Voinea fd1d05ab48
♻️Code optimization 2020-04-02 14:44:44 +03:00
Alex Voinea d0c51b9e73
int -> bool 2020-03-26 19:06:35 +02:00
Alex Voinea 2e50954710
Merge branch 'MK3' into MK3_fix_selftest_Z_crash2 2020-01-22 14:56:54 +02:00
DRracer d6ac9e4638
Merge pull request #2342 from vintagepc/2306-hard-reset-homing-fails
Fix #2306 hard reset homing fails
2019-12-15 10:51:52 +01:00
Alex Voinea 779423f0e7
Move hardcoded values to variants 2019-11-29 15:06:54 +02:00
vintagepc 982c4cbf7b
Candidate fix for homing fail hard reset 2019-11-21 18:51:02 -05:00
DRracer 4cf2f05d1d
Merge pull request #2057 from leptun/MK3_fix_M350
M350 for all axis - MK3
2019-11-08 16:15:15 +01:00
leptun 350e27810a fix selftest Z crash. Use stallGuard when testing Z 2019-10-11 21:00:51 +03:00
Marek Bel 8c7015df53 Document set current command. 2019-09-27 15:42:31 +02:00
leptun 556b87edec M350 for all axis - MK3 2019-07-29 09:41:33 +03:00
Marek Bel 6b8a5bc3ac Fix compiler warnings
sketch/tmc2130.cpp:146:42: warning: default argument given for parameter 1 of 'void tmc2130_init(bool)' [-fpermissive]
sketch/tmc2130.cpp:146:24: warning: unused parameter 'bSupressFlag' [-Wunused-parameter]
2019-07-16 17:31:56 +02:00
DRracer 8b806f692e
Merge pull request #1664 from MRprusa3d/PFW-811
"disable_z()" for Delta PSU
2019-07-16 16:46:34 +02:00
Marek Bel 49f172a7b9 Convert uint8_t cycle control varibles changed in previous commit to uint_least8_t to be potentially more portable. 2019-06-12 15:01:57 +02:00
DRracer b15bbaf177 for cycles' variables: int -> uint8_t where appropriate, part1 2019-06-12 14:58:15 +02:00
MRprusa3d 1d8c24e8a9 "disable_z()" for Delta PSU IV
correction for (motor) mode switching
2019-06-05 19:22:04 +02:00
Marek Bel 4bfa3d7e0b Reporty busy: paused for user in case MMU is not responding. 2019-04-04 19:04:15 +02:00
Robert Pelnar eea755496b Conditional translation for SYSTEM_TIMER_2 because we want to have posibility to switch between old/new implementation.
Timing functions (millis, micros and delay) replaced in whole source, defined in Marlin.h.
This commit enables original implementation (SYSTEM_TIMER_2 undefined)
Verified with passed complete wizard process.
2019-01-27 22:48:51 +01:00
Robert Pelnar 434a723151 Timing functions 'micros' and 'delay' replaced in whole source with 'micros2' and 'delay2' 2019-01-27 17:37:27 +01:00
Robert Pelnar 41b885c537 M907 fix - value in mA (PFW) 2018-11-12 20:39:25 +01:00
Robert Pelnar 3afebcc9cc tmc2130_print_currents fixed (for obsolete M913) 2018-11-09 15:20:25 +01:00
Marek Bel 4b47a74d1d Remove unused declarations from tmc2130.cpp. Move used declaration to Marlin.h. 2018-09-05 18:14:32 +02:00
Marek Bel ac62117d6b Merge remote-tracking branch 'prusa3d/MK3' into MK3_dev 2018-08-13 19:38:55 +02:00
Marek Bel 9271d12bf7 Save 32B of FLASH, fix compiler warning: sketch/tmc2130.cpp:238:6: warning: unused parameter 'last_step_mask' [-Wunused-parameter]. 2018-08-07 16:32:32 +02:00
Marek Bel bf8808ce22 Fix compiler warning sketch/tmc2130.cpp: In function 'void tmc2130_set_wave(uint8_t, uint8_t, uint8_t)':
sketch/tmc2130.cpp:921:32: warning: 'reg' may be used uninitialized in this function [-Wmaybe-uninitialized]

This was completely innocent, as reg was zeroed inside for loop.
2018-08-02 16:50:04 +02:00
Marek Bel 3248d219f2 Restore motor power, after it is disabled in tmc2130_get_wave(). This bug manifested itself as compiler warning:
sketch/tmc2130.cpp:827:10: warning: unused variable 'pwr' [-Wunused-variable]
2018-08-02 16:23:30 +02:00
Marek Bel 9f68681a1b Fix compiler warnings: sketch/tmc2130.cpp: In function 'void tmc2130_goto_step(uint8_t, uint8_t, uint8_t, uint16_t, uint16_t)':
sketch/tmc2130.cpp:795:94: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
sketch/tmc2130.cpp:807:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
sketch/tmc2130.cpp: In function 'void tmc2130_get_wave(uint8_t, uint8_t*, __file*)':
sketch/tmc2130.cpp:839:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2018-08-02 16:21:38 +02:00
Marek Bel a8f73b3915 Merge branch 'Fix_warnings_ledvinap' into fix_compiler_warnings 2018-08-01 17:19:34 +02:00
Marek Bel 97ec616dd1 Merge branch 'Fix_warnings_ledvinap' into fix_compiler_warnings 2018-08-01 17:14:36 +02:00
Marek Bel b7ba0c5f14 Merge branch 'Fix_warnings_ledvinap' into fix_compiler_warnings 2018-08-01 16:50:44 +02:00
Marek Bel 904db96cd1 Fix compiler warning sketch/tmc2130.h:123:3: warning: 'tmc2130_axis_config' defined but not used [-Wunused-variable] 2018-07-25 15:03:38 +02:00
Marek Bel 88cce94cf9 Revert "Revert "Save 80B of flash and 8B of RAM and fix compiler warning:""
This reverts commit 77426b563a.
2018-07-23 13:35:38 +02:00
Petr Ledvina ba8bcf76be Use signed value where appropriate 2018-07-17 17:57:38 +02:00
Petr Ledvina 7bbf9953f2 Fix missing return warnings 2018-07-17 17:57:38 +02:00
Petr Ledvina ceeb97f38c Parentheses around macro argument
Not triggering error in this case
2018-07-17 17:57:38 +02:00
Robert Pelnar 2451455974 LCD menu optimalization - initial lcd update fix 2018-07-16 23:54:46 +02:00
Robert Pelnar 19a72ef9eb LCD menu optimalization - LiquidCrystal_Prusa removed 2018-07-16 23:23:15 +02:00
Robert Pelnar e22d204e8e LCD menu optimalization - print functions
+removed unused code
2018-07-16 19:29:27 +02:00
Robert Pelnar 066c044396 fixed tmc2130_wr_CHOPCONF
backlash - initial implementation (disabled by default)
removed menu "W25x20CL init"
splashscreen displayed before entering optiboot
2018-07-11 20:02:46 +02:00
Robert Pelnar 771cead291 TMC2130 gcodes for live motor tunning:
TMC_SET_WAVE_X..E (linearity correction)
TMC_SET_CHOP_X..E (chopper configuration - 4 args - toff, hstr, hend, tbl)
2018-07-09 16:44:10 +02:00
Robert Pelnar 4567d2feca removed unused cond. trans. for NEW_SPI 2018-06-10 16:11:39 +02:00
Robert Pelnar c0946d8f04 New ML support - w25x20cl spi external flash support
+fixed some messages
+sec lang update test
2018-06-09 01:23:04 +02:00
tarikku 731fef3d32 Fix remaining forgotten comments 2018-05-30 23:15:01 +02:00
Robert Pelnar 15207e4d5e Linearity correction fix - (eeprom storage changed to byte instead of word)
+enabled for XYZ axes
2018-05-28 01:47:08 +02:00
Robert Pelnar 5b015907aa New localization - macro declarations fixed 2018-05-20 13:15:46 +02:00
Robert Pelnar 339d2ebdef Z-axis stealth mode
XYZcal fix
2018-04-03 18:26:39 +02:00
Robert Pelnar 92997204a1 Linearity correction - TMC codes for calibration object, variable stored as uint8, range from 1.03 to 1.20 2018-04-03 12:30:35 +02:00
Robert Pelnar 363a9d24b3 LiquidCrystal class renamed to LiquidCrystal_Prusa 2018-03-29 17:50:43 +02:00
Robert Pelnar 186e630299 New SPI (do not use Arduino SPI class)
saved ~300bytes flash, 4bytes ram
2018-03-29 17:42:41 +02:00
XPila 06d5ec5659
Merge pull request #586 from mkbel/ustep_linearity_2
Ustep linearity
2018-03-28 19:38:34 +02:00
Robert Pelnar bde097cad1 bugfix - PFW233 - first homing in silent mode Y crash. 2018-03-28 19:22:20 +02:00
Marek Bel 397e7d4791 Increase resolution of wave factor. 2018-03-26 15:17:06 +02:00
Robert Pelnar fb8a28d120 bugfix - beltstatus overflow 2018-03-01 14:34:21 +01:00
Robert Pelnar 73b0349898 fix - Z movement speed in selftest
conditional translation for linearity correction and variable resolution
2018-02-23 16:31:24 +01:00
Robert Pelnar 06da2bb915 Accurate homing, fix - enabled after selftest.
Experimantal menu - conditional translation.
2018-02-22 20:50:34 +01:00
Robert Pelnar d91dbc73c9 tmc2130 - optimalization, removed unused code 2018-02-20 17:06:37 +01:00
Robert Pelnar dff8c29362 Microstep linearity correction, optimized wave compression.
Correction factor can be adjusted from 0.9 to 1.25 by 0.005 steps.
2018-02-17 19:58:40 +01:00
Robert Pelnar 57499dc6a0 M350 for E axis (8, 16, 32, 64, 128 microsteps) 2018-02-15 15:40:49 +01:00
Robert Pelnar 79caf3d9c6 tmc2130 optimalization, accurate homing and microstep linearity correction
dcode D12 removed (no longer needed)
homeaxis optimized + xy home calibration support
new eeprom variables
new lcd menu edit types (byte3, mres, wfac), new menu "Experimental"
currents adjusted
2018-02-15 04:17:58 +01:00
Robert Pelnar 1a01282e33 cardreader - new member "paused"
tmc2130 - decreased crash sensitivity for Y
2018-01-31 15:20:27 +01:00
Robert Pelnar 210b97d16d New fail stats (global, last print), crashdetection X and Y separated 2018-01-30 13:10:36 +01:00
Robert Pelnar 39bd5c3a1d Extruder stealthChop and constant-off-time mode.
Extruder different chopper frequency in spreadcycle.
Dcodes (fix)
2018-01-25 05:13:21 +01:00
Robert Pelnar c2710fea63 crashdetection limits changed (X=48, Y=64) 2018-01-16 17:04:21 +01:00
Robert Pelnar 43010b30b4 Build 143f
Crashdetection improoved, blocking temperature ISR fixed, limits for silent mode adjusted.
2018-01-09 19:54:07 +01:00
Robert Pelnar 0a2087c1cb build 143e
Linear advance disabled
Max feedrate reduced to 200mm/s
Silent max accel reduced to 984mm/s^2
some debug logs removed, tmc_init - log message fixed
2018-01-04 18:08:22 +01:00
Robert Pelnar 546314fda7 Removed debug messages from serial comunication (octoprint...).
build 137b
2017-12-27 20:29:24 +01:00
Robert Pelnar 23ed33fc21 disable crashdetection while usb printing 2017-12-23 03:42:19 +01:00
Robert Pelnar c6e10fb903 Removed SG software homming
After Calibration Z enabled minstop (SG and PINDA)
TMC2130 code simplification
2017-12-15 14:10:20 +01:00
Robert Pelnar 4dae6f871e Sg load meassurement durring self test - 'Belt status' 2017-11-27 04:46:58 +01:00
PavelSindler 5e4236dd2e selftest for axis improved (better code readibility) and no crash triggered 2017-11-16 18:02:11 +01:00
Robert Pelnar 877c8a3978 TMC2130 configuration in eeprom (not finished).
Extruder and Z holding currents same as running currents.
M600 filament unload speed = 3500 (PFW-22).
FSensor - algorithm changed (reset error couter instead of decrement)
build number = 106
2017-10-30 15:45:29 +01:00
Robert Pelnar 6a0f8752c3 Endless loop after calibration Z (http://jira.prusa/projects/PFW/issues/PFW-3?filter=allissues)
Buildnumber (http://jira.prusa/projects/PFW/issues/PFW-4?filter=allissues)
2017-10-17 21:05:31 +02:00
Robert Pelnar 40fae26d75 Silent / Hight Power mode switching - wait for standstill
parameter tunning:
PWM_GRAD, PWM_AMPL TCOOLTHRS (XY)
2017-09-26 12:22:58 +02:00
Robert Pelnar 89121e6e34 Maker Faire brainstorm 2.0
Added filament sensor and crash detection to EEPROM
Added crash-detection counters display disable directive
Added Restore/Save print directive
Added crash detection and filament sensor settings to Tune menu
2017-09-26 04:30:10 +02:00
Robert Pelnar 73cc1c9c8a initial state of crash detect and filament sensor is ON
slowed down return speed from crash detect after home
Added babystep apply after return from crash detect (don’t know if it’s accurate)
Added D10 to set machine to XYZ correctly calibrated
Added resume debug directive to mask additional menu item
2017-09-26 03:21:33 +02:00
Robert Pelnar 39f6e746dc Crashdetection tunning. 2017-09-26 01:43:56 +02:00
Robert Pelnar e11ae8bdbf Soft homing + fixed homing in silent mode. 2017-09-23 20:01:37 +02:00
Robert Pelnar 89acf29247 Silent/High Power mode switching with crashdetection. 2017-09-23 15:01:31 +02:00
Robert Pelnar d2ff47dac8 Crashdetection 2017-09-22 23:06:52 +02:00
Robert Pelnar 4805713b8d SG limits adjusted (x=5,y=5), for homing is possible to set different values (x=5,y=5, without filter). 2017-09-22 20:53:00 +02:00
Robert Pelnar df1aa85526 Crashdetection + configuration file. 2017-09-22 19:28:32 +02:00
Robert Pelnar 4cae00741e MAKER FAIRE
filament sensor: runout detection tuning, save/restore print
silent mode: safe mode selection durring printing and after homing
2017-09-21 01:52:28 +02:00
Robert Pelnar 9d91a5d425 TMC2130 XY currents can be over 31 (like Z). 2017-09-19 17:42:43 +02:00
Robert Pelnar 9105de073c Cmdqueue code in separate files, debug codes for read/write eeprom and ram, PWM amplitude for Y axis stealtchop mode increased to 210. 2017-09-14 16:19:49 +02:00
Robert Pelnar 9c324bfeda Stealth chop mode creek fix - TCOOLTHRS must be set to zero, Y-axis current increased. 2017-09-08 21:58:39 +02:00
Robert Pelnar d63045fdb3 TMC2130 stallguard improovment - axis load monitoring, autocalibrate Z. 2017-08-21 13:06:17 +02:00
Robert Pelnar 683784c4c7 PAT9125 I2C, hardware SG homing
separate pin configuration file for each board
changed board codes:
RAMBO =100, MiniRambo1.0 =200, MiniRambo1.3 = 203, Einy03 =303, Einy04 =304
2017-08-17 15:23:34 +02:00
Robert Pelnar a7477673de HW SG homing, SWSPI pins for EINY03/04 2017-07-18 13:54:01 +02:00
Robert Pelnar cd48d5b4ff TMC2130 stallguard SW homing improvement - steps delta instead of delay (loop count), new function tmc2130_home_restart, always enable endstops durring homing. 2017-07-12 17:36:50 +02:00
Robert Pelnar ec7678a25f pat9125 filament sensor
sg homing - bug fix + homing multiple axes simultanously (AXIS_MASK)
2017-07-07 04:45:09 +02:00
Robert Pelnar a21bef25c3 TMC2130 - variable Z current reference (IRUN>31 => vsense = 0, IRUN/=2, IHOLD/=2) 2017-07-06 22:32:21 +02:00
XPila 78f7923ab2 Merge pull request #10 from XPila/MK3
Changed jerks, disabled oversampling, debug code, commands for seting…
2017-07-06 13:07:37 +02:00
Robert Pelnar 2b24e9ceb3 Changed jerks, disabled oversampling, debug code, commands for seting pwm_ampl and pwm_grad (M917, M918), changed configuration files 2017-07-06 13:06:07 +02:00
XPila 458dfa80f6 Merge branch 'MK3' into MK3 2017-07-06 12:55:30 +02:00
Robert Pelnar b8025e63e6 DEBUG defines, variant files for MK3 2017-07-04 16:23:28 +02:00
PavelSindler a8678cb2fd recover print 2017-07-04 11:31:39 +02:00
Robert Pelnar 176c32de91 TMC2130 stallguard homing - sg_thrs_x and sg_thrs_y - command M916, lcd_silent_mode_set_tune 2017-07-03 10:39:56 +02:00
Robert Pelnar e09f0c64c7 TMC2130 tuning, silent/high power mode 2017-07-03 07:43:50 +02:00
Robert Pelnar c4307c7373 TMC2130 tunning, overtemp 2017-07-03 00:11:42 +02:00