Merge pull request #10102 from thinkyhead/bf2_eeprom_M913
[2.0.x] More complete Trinamic driver options
This commit is contained in:
@ -88,6 +88,11 @@ void Power::check() {
|
||||
void Power::power_on() {
|
||||
lastPowerOn = millis();
|
||||
PSU_PIN_ON();
|
||||
|
||||
#if HAS_TRINAMIC
|
||||
delay(100); // Wait for power to settle
|
||||
restore_stepper_drivers();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Power::power_off() {
|
||||
|
@ -331,6 +331,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(HAVE_TMC2208)
|
||||
static void tmc_status(TMC2208Stepper &st, const TMC_debug_enum i) {
|
||||
switch (i) {
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
extern bool report_tmc_status;
|
||||
|
||||
enum TMC_AxisEnum : char { TMC_X, TMC_X2, TMC_Y, TMC_Y2, TMC_Z, TMC_Z2, TMC_E0, TMC_E1, TMC_E2, TMC_E3, TMC_E4 };
|
||||
enum TMC_AxisEnum : char { TMC_X, TMC_Y, TMC_Z, TMC_X2, TMC_Y2, TMC_Z2, TMC_E0, TMC_E1, TMC_E2, TMC_E3, TMC_E4 };
|
||||
|
||||
constexpr uint32_t _tmc_thrs(const uint16_t msteps, const int32_t thrs, const uint32_t spmm) {
|
||||
return 12650000UL * msteps / (256 * thrs * spmm);
|
||||
@ -55,7 +55,6 @@ void tmc_get_current(TMC &st, const TMC_AxisEnum axis) {
|
||||
template<typename TMC>
|
||||
void tmc_set_current(TMC &st, const TMC_AxisEnum axis, const int mA) {
|
||||
st.setCurrent(mA, R_SENSE, HOLD_MULTIPLIER);
|
||||
tmc_get_current(st, axis);
|
||||
}
|
||||
template<typename TMC>
|
||||
void tmc_report_otpw(TMC &st, const TMC_AxisEnum axis) {
|
||||
@ -73,7 +72,6 @@ void tmc_get_pwmthrs(TMC &st, const TMC_AxisEnum axis, const uint16_t spmm) {
|
||||
template<typename TMC>
|
||||
void tmc_set_pwmthrs(TMC &st, const TMC_AxisEnum axis, const int32_t thrs, const uint32_t spmm) {
|
||||
st.TPWMTHRS(_tmc_thrs(st.microsteps(), thrs, spmm));
|
||||
tmc_get_pwmthrs(st, axis, spmm);
|
||||
}
|
||||
template<typename TMC>
|
||||
void tmc_get_sgt(TMC &st, const TMC_AxisEnum axis) {
|
||||
@ -82,7 +80,6 @@ void tmc_get_sgt(TMC &st, const TMC_AxisEnum axis) {
|
||||
template<typename TMC>
|
||||
void tmc_set_sgt(TMC &st, const TMC_AxisEnum axis, const int8_t sgt_val) {
|
||||
st.sgt(sgt_val);
|
||||
tmc_get_sgt(st, axis);
|
||||
}
|
||||
|
||||
void monitor_tmc_driver();
|
||||
|
Reference in New Issue
Block a user