Merge pull request #2346 from leptun/MK3_tmc_settings

Move hardcoded tmc2130 values to variants
This commit is contained in:
DRracer 2019-11-29 14:15:55 +01:00 committed by GitHub
commit 86955c3d36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View File

@ -24,7 +24,7 @@ uint8_t tmc2130_current_h[4] = TMC2130_CURRENTS_H;
uint8_t tmc2130_current_r[4] = TMC2130_CURRENTS_R; uint8_t tmc2130_current_r[4] = TMC2130_CURRENTS_R;
//running currents for homing //running currents for homing
uint8_t tmc2130_current_r_home[4] = {8, 10, 20, 18}; uint8_t tmc2130_current_r_home[4] = TMC2130_CURRENTS_R_HOME;
//pwm_ampl //pwm_ampl
@ -40,7 +40,7 @@ uint8_t tmc2130_mres[4] = {0, 0, 0, 0}; //will be filed at begin of init
uint8_t tmc2130_sg_thr[4] = {TMC2130_SG_THRS_X, TMC2130_SG_THRS_Y, TMC2130_SG_THRS_Z, TMC2130_SG_THRS_E}; uint8_t tmc2130_sg_thr[4] = {TMC2130_SG_THRS_X, TMC2130_SG_THRS_Y, TMC2130_SG_THRS_Z, TMC2130_SG_THRS_E};
uint8_t tmc2130_sg_thr_home[4] = {3, 3, TMC2130_SG_THRS_Z, TMC2130_SG_THRS_E}; uint8_t tmc2130_sg_thr_home[4] = TMC2130_SG_THRS_HOME;
uint8_t tmc2130_sg_homing_axes_mask = 0x00; uint8_t tmc2130_sg_homing_axes_mask = 0x00;

View File

@ -260,11 +260,13 @@
#define TMC2130_SG_THRS_Y 3 // stallguard sensitivity for Y axis #define TMC2130_SG_THRS_Y 3 // stallguard sensitivity for Y axis
#define TMC2130_SG_THRS_Z 4 // stallguard sensitivity for Z axis #define TMC2130_SG_THRS_Z 4 // stallguard sensitivity for Z axis
#define TMC2130_SG_THRS_E 3 // stallguard sensitivity for E axis #define TMC2130_SG_THRS_E 3 // stallguard sensitivity for E axis
#define TMC2130_SG_THRS_HOME {3, 3, TMC2130_SG_THRS_Z, TMC2130_SG_THRS_E}
//new settings is possible for vsense = 1, running current value > 31 set vsense to zero and shift both currents by 1 bit right (Z axis only) //new settings is possible for vsense = 1, running current value > 31 set vsense to zero and shift both currents by 1 bit right (Z axis only)
#define TMC2130_CURRENTS_H {16, 20, 35, 30} // default holding currents for all axes #define TMC2130_CURRENTS_H {16, 20, 35, 30} // default holding currents for all axes
#define TMC2130_CURRENTS_R {16, 20, 35, 30} // default running currents for all axes #define TMC2130_CURRENTS_R {16, 20, 35, 30} // default running currents for all axes
#define TMC2130_UNLOAD_CURRENT_R 12 // lowe current for M600 to protect filament sensor #define TMC2130_CURRENTS_R_HOME {8, 10, 20, 18} // homing running currents for all axes
// #define TMC2130_UNLOAD_CURRENT_R 12 // lower current for M600 to protect filament sensor - Unused
#define TMC2130_STEALTH_Z #define TMC2130_STEALTH_Z

View File

@ -262,11 +262,13 @@
#define TMC2130_SG_THRS_Y 3 // stallguard sensitivity for Y axis #define TMC2130_SG_THRS_Y 3 // stallguard sensitivity for Y axis
#define TMC2130_SG_THRS_Z 4 // stallguard sensitivity for Z axis #define TMC2130_SG_THRS_Z 4 // stallguard sensitivity for Z axis
#define TMC2130_SG_THRS_E 3 // stallguard sensitivity for E axis #define TMC2130_SG_THRS_E 3 // stallguard sensitivity for E axis
#define TMC2130_SG_THRS_HOME {3, 3, TMC2130_SG_THRS_Z, TMC2130_SG_THRS_E}
//new settings is possible for vsense = 1, running current value > 31 set vsense to zero and shift both currents by 1 bit right (Z axis only) //new settings is possible for vsense = 1, running current value > 31 set vsense to zero and shift both currents by 1 bit right (Z axis only)
#define TMC2130_CURRENTS_H {16, 20, 35, 30} // default holding currents for all axes #define TMC2130_CURRENTS_H {16, 20, 35, 30} // default holding currents for all axes
#define TMC2130_CURRENTS_R {16, 20, 35, 30} // default running currents for all axes #define TMC2130_CURRENTS_R {16, 20, 35, 30} // default running currents for all axes
#define TMC2130_UNLOAD_CURRENT_R 12 // lowe current for M600 to protect filament sensor #define TMC2130_CURRENTS_R_HOME {8, 10, 20, 18} // homing running currents for all axes
// #define TMC2130_UNLOAD_CURRENT_R 12 // lower current for M600 to protect filament sensor - Unused
#define TMC2130_STEALTH_Z #define TMC2130_STEALTH_Z