|
HF-TMC51x0 Driver (TMC5130 & TMC5160) 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC51x0 (TMC5130 & TMC5160)
|
StallGuard2 subsystem (COOLCONF/DRV_STATUS + SW_MODE interactions) More...
#include <tmc51x0.hpp>
Public Member Functions | |
| StallGuard (TMC51x0 &driver) noexcept | |
| Result< uint16_t > | GetStallGuard () noexcept |
| Read StallGuard2 value (SG_RESULT) | |
| Result< uint16_t > | GetStallGuardResult () noexcept |
| Read StallGuard2 result from DRV_STATUS (SG_RESULT) | |
| Result< void > | ConfigureStallGuard (const StallGuardConfig &config) noexcept |
| Configure StallGuard2 parameters (COOLCONF) | |
| Result< void > | EnableStopOnStall (bool enable) noexcept |
| Enable/disable stop-on-stall behavior. | |
| Result< bool > | IsStopOnStallEnabled () noexcept |
| Check whether stop-on-stall is enabled. | |
| Result< void > | SetSoftStop (bool enable) noexcept |
| Enable/disable soft-stop behavior (instead of hard stop) | |
| Result< bool > | IsSoftStopEnabled () noexcept |
| Check whether soft-stop is enabled. | |
| Result< void > | ClearStallFlag () noexcept |
| Clear stall event flag (RAMP_STAT) | |
| Result< bool > | IsStallDetected () noexcept |
| Check if stall has been detected (RAMP_STAT) | |
Private Attributes | |
| TMC51x0 & | driver_ |
| Set StallGuard/CoolStep threshold velocity (TCOOLTHRS, unit-aware) | |
StallGuard2 subsystem (COOLCONF/DRV_STATUS + SW_MODE interactions)
Owns StallGuard configuration and control signals that affect motion behavior (stop-on-stall, soft-stop), keeping diagnostics focused on monitoring.
|
inlineexplicitnoexcept |
|
noexcept |
Clear stall event flag (RAMP_STAT)
|
noexcept |
Configure StallGuard2 parameters (COOLCONF)
| config | StallGuard configuration |
|
noexcept |
Enable/disable stop-on-stall behavior.
| enable | True to enable stop on stall |
|
noexcept |
Read StallGuard2 value (SG_RESULT)
|
noexcept |
Read StallGuard2 result from DRV_STATUS (SG_RESULT)
|
noexcept |
Check whether soft-stop is enabled.
|
noexcept |
Check if stall has been detected (RAMP_STAT)
|
noexcept |
Check whether stop-on-stall is enabled.
|
noexcept |
Enable/disable soft-stop behavior (instead of hard stop)
| enable | True to enable soft stop |
|
private |
Set StallGuard/CoolStep threshold velocity (TCOOLTHRS, unit-aware)
| threshold | Threshold velocity |
| unit | Unit of threshold |