|
|
@ -32,7 +32,7 @@ static const uint8_t tmc5130_defaultRegisterAccess[TMC5130_REGISTER_COUNT] = { |
|
|
|
#define TMC5160_GLOBAL_SCALER_MASK 0xFF
|
|
|
|
#define TMC5160_GLOBAL_SCALER_SHIFT 0
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* 工具�? * |
|
|
|
* 工具�? * |
|
|
|
***********************************************************************************************************************/ |
|
|
|
|
|
|
|
#define FIELD_SET(data, mask, shift, value) (data = (((data) & (~(mask))) | (((value) << (shift)) & (mask))))
|
|
|
@ -243,7 +243,7 @@ void TMC51X0::moveToEnd(int32_t direction, uint32_t velocityMax) { |
|
|
|
// @WARNING:
|
|
|
|
// the motor will stop running(1000RPM) for about 10 minutes
|
|
|
|
// If you really need to use this feature, reset XACTUAL every 30s
|
|
|
|
setXACTUAL(0); |
|
|
|
// setXACTUAL(0);
|
|
|
|
if (direction >= 0) { |
|
|
|
writeInt(TMC5130_RAMPMODE, TMC5130_MODE_POSITION); |
|
|
|
writeInt(TMC5130_VMAX, to_motor_vel(velocityMax)); |
|
|
|