|
HF-TMC9660 Driver 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC9660
|
Subsystem for motor protection features. More...
#include <tmc9660.hpp>
Classes | |
| struct | ProtectionConfig |
| Configuration structure for protection auto-configuration. More... | |
Public Member Functions | |
| bool | configureVoltage (uint16_t over_volt_threshold, uint16_t under_volt_threshold) noexcept |
| Configure overvoltage and undervoltage protection thresholds. | |
| bool | configureTemperature (float warning_deg_c, float shutdown_deg_c) noexcept |
| Configure over-temperature protection thresholds. | |
| bool | setOvercurrentEnabled (bool enabled) noexcept |
| Enable or disable overcurrent protection on the driver outputs. | |
| bool | configureI2t (uint16_t timeConstant1_ms, float continuousCurrent1_A, uint16_t timeConstant2_ms, float continuousCurrent2_A) noexcept |
| Configure the two I²t monitoring windows for motor current. | |
| bool | resetI2tState () noexcept |
| Reset the integrated I²t sum accumulators. | |
| bool | configureAuto (const ProtectionConfig &config) noexcept |
| Auto-configure protection parameters. | |
Private Member Functions | |
| Protection (TMC9660 &parent) noexcept | |
Private Attributes | |
| TMC9660 & | driver |
Friends | |
| class | TMC9660 |
Subsystem for motor protection features.
|
inlineexplicitprivatenoexcept |
|
noexcept |
Auto-configure protection parameters.
Configures voltage, temperature, overcurrent, and I²t protection based on high-level protection requirements.
| config | Protection configuration (see ProtectionConfig) |
|
noexcept |
Configure the two I²t monitoring windows for motor current.
| timeConstant1_ms | Time constant for first window in milliseconds. |
| continuousCurrent1_A | Continuous current limit for first window in amps. |
| timeConstant2_ms | Time constant for second window in milliseconds. |
| continuousCurrent2_A | Continuous current limit for second window in amps. |
|
noexcept |
Configure over-temperature protection thresholds.
The TMC9660 has an internal temperature sensor and supports an external analog temperature sensor. This function sets warning and shutdown thresholds for the internal sensor.
| warning_deg_c | Warning threshold in °C for chip temperature. |
| shutdown_deg_c | Shutdown (fault) threshold in °C for chip temperature. |
|
noexcept |
Configure overvoltage and undervoltage protection thresholds.
| over_volt_threshold | Over-voltage warning threshold in units of 0.1V. |
| under_volt_threshold | Under-voltage warning threshold in units of 0.1V. |
|
noexcept |
Reset the integrated I²t sum accumulators.
|
noexcept |
Enable or disable overcurrent protection on the driver outputs.
This controls the internal gate driver overcurrent detection (e.g., comparators) for various FETs.
| enabled | True to enable overcurrent protection (shut down drivers on overcurrent), false to disable. |
|
private |