|
HF-TMC51x0 Driver (TMC5130 & TMC5160) 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC51x0 (TMC5130 & TMC5160)
|
Global configuration (GCONF) structure. More...
#include <tmc51x0_types.hpp>
Public Member Functions | |
| GlobalConfig ()=default | |
| Default constructor. | |
Public Attributes | |
| bool | recalibrate {false} |
| Bit 0: Zero crossing recalibration during driver disable. | |
| bool | en_short_standstill_timeout |
| bool | en_stealthchop_mode {true} |
| bool | en_stealthchop_step_filter {true} |
| bool | invert_direction {false} |
| Diag0Config | diag0 |
| DIAG0 pin configuration (bits 5, 6, 7, 12) | |
| Diag1Config | diag1 |
| DIAG1 pin configuration (bits 8, 9, 10, 11, 13) | |
| bool | en_small_step_frequency_hysteresis |
| bool | enca_dcin_sequencer_stop {false} |
| bool | direct_mode {false} |
Global configuration (GCONF) structure.
Configuration for global TMC5160 driver settings. See GCONF_Register documentation for detailed bit descriptions and SD_MODE dependencies.
|
default |
Default constructor.
Initializes with recommended default values. All members use default member initializers, so constructor is empty.
| Diag0Config tmc51x0::GlobalConfig::diag0 |
DIAG0 pin configuration (bits 5, 6, 7, 12)
| Diag1Config tmc51x0::GlobalConfig::diag1 |
DIAG1 pin configuration (bits 8, 9, 10, 11, 13)
| bool tmc51x0::GlobalConfig::direct_mode {false} |
Bit 16: Direct coil control mode. When enabled, motor coil currents and polarity are directly programmed via XTARGET register (0x2D):
| bool tmc51x0::GlobalConfig::en_short_standstill_timeout |
Bit 1: Enable shorter timeout for standstill detection. true = Short timeout (2^18 clocks), false = Normal timeout (2^20 clocks). Shorter timeout detects standstill faster but may be less stable.
| bool tmc51x0::GlobalConfig::en_small_step_frequency_hysteresis |
Bit 14: Enable smaller hysteresis for step frequency comparison. false = Normal hysteresis (1/16), true = Small hysteresis (1/32). Smaller hysteresis provides finer step frequency comparison but may be less stable.
| bool tmc51x0::GlobalConfig::en_stealthchop_mode {true} |
Bit 2: Enable StealthChop voltage PWM mode (switch only in standstill at IHOLD=IRUN). When false, uses SpreadCycle mode.
| bool tmc51x0::GlobalConfig::en_stealthchop_step_filter {true} |
Bit 3: Enable step input filtering for StealthChop optimization with external step source. Filters step pulses to optimize StealthChop performance. Default=true (recommended).
| bool tmc51x0::GlobalConfig::enca_dcin_sequencer_stop {false} |
Bit 15: Enable ENCA_DCIN pin as sequencer stop input. When enabled, ENCA_DCIN pin stops the ramp generator sequencer (motor goes to standstill). Note: This is different from DRV_ENN hardware emergency stop (which cuts all MOSFETs). This stop may maintain holding current depending on configuration. See datasheet Chapter 19 for details.
| bool tmc51x0::GlobalConfig::invert_direction {false} |
Bit 4: Invert motor direction (false=normal, true=inverse). When true, motor rotates in opposite direction for same step/direction inputs.
| bool tmc51x0::GlobalConfig::recalibrate {false} |
Bit 0: Zero crossing recalibration during driver disable.