More Trinamic cleanup
This commit is contained in:
parent
473c6d3a91
commit
b76344c080
5 changed files with 83 additions and 60 deletions
|
|
@ -184,6 +184,10 @@
|
|||
// Following values from Trinamic's spreadsheet with values for a NEMA17 (42BYGHW609)
|
||||
// https://www.trinamic.com/products/integrated-circuits/details/tmc2130/
|
||||
void tmc2130_init(TMC2130Stepper &st, const uint16_t mA, const uint16_t microsteps, const uint32_t thrs, const float spmm) {
|
||||
#if DISABLED(STEALTHCHOP) || DISABLED(HYBRID_THRESHOLD)
|
||||
UNUSED(thrs);
|
||||
UNUSED(spmm);
|
||||
#endif
|
||||
st.begin();
|
||||
st.setCurrent(mA, R_SENSE, HOLD_MULTIPLIER);
|
||||
st.microsteps(microsteps);
|
||||
|
|
@ -201,9 +205,6 @@
|
|||
st.stealthChop(1);
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
st.stealth_max_speed(12650000UL*microsteps/(256*thrs*spmm));
|
||||
#else
|
||||
UNUSED(thrs);
|
||||
UNUSED(spmm);
|
||||
#endif
|
||||
#elif ENABLED(SENSORLESS_HOMING)
|
||||
st.coolstep_min_speed(1024UL * 1024UL - 1UL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue