Commit Graph

106 Commits

Author SHA1 Message Date
DRracer
42311db5f1
Merge pull request #2789 from wavexx/MK3_TMC2130_DEDGE
Use/enable TMC2130 DEDGE support in MK3/MK3S
2021-01-29 11:13:09 +01:00
Yuri D'Elia
4fed728e08 Elide delayMicroseconds for TMC2130 in non-DEDGE mode
Introduce new macros TMC2130_MINIMUM_DELAY/STEPPER_MINIMUM_DELAY for
blocking pauses.

If MINIMUM_PULSE has defined to be zero, avoid the delay call entirely.
2021-01-26 16:02:53 +01:00
Voinea Dragos
da21916473 Change printf_P without format arguments and NL to puts_P only 2021-01-22 18:56:05 +02:00
Yuri D'Elia
e6b182aa9f Implement proper step/delay pauses in tmc2130 functions
Add constants for the various required delays in tmc2130.h,
which will come in handy for stepper.cpp as well.

Move the delays in the _set functions and remove the pauses
from the various calling points and macros.

Note that the hard-coded pause wouldn't cut it for the stepper ISR,
but it's fine for other use cases.
2020-06-24 17:58:43 +02:00
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