HF-TMC9660 Driver 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC9660
Loading...
Searching...
No Matches
tmc9660::TMC9660< CommType >::Protection Struct Reference

Subsystem for motor protection features. More...

#include <tmc9660.hpp>

Collaboration diagram for tmc9660::TMC9660< CommType >::Protection:
[legend]

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

TMC9660driver
 

Friends

class TMC9660
 

Detailed Description

template<typename CommType>
struct tmc9660::TMC9660< CommType >::Protection

Subsystem for motor protection features.

Constructor & Destructor Documentation

◆ Protection()

template<typename CommType >
tmc9660::TMC9660< CommType >::Protection::Protection ( TMC9660 & parent)
inlineexplicitprivatenoexcept

Member Function Documentation

◆ configureAuto()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Protection::configureAuto ( const ProtectionConfig & config)
noexcept

Auto-configure protection parameters.

Configures voltage, temperature, overcurrent, and I²t protection based on high-level protection requirements.

Parameters
configProtection configuration (see ProtectionConfig)
Returns
true if all configurations succeeded, false otherwise

◆ configureI2t()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Protection::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.

Parameters
timeConstant1_msTime constant for first window in milliseconds.
continuousCurrent1_AContinuous current limit for first window in amps.
timeConstant2_msTime constant for second window in milliseconds.
continuousCurrent2_AContinuous current limit for second window in amps.
Returns
true if configuration was successful.

◆ configureTemperature()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Protection::configureTemperature ( float warning_deg_c,
float shutdown_deg_c )
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.

Parameters
warning_deg_cWarning threshold in °C for chip temperature.
shutdown_deg_cShutdown (fault) threshold in °C for chip temperature.
Returns
true if set successfully.

◆ configureVoltage()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Protection::configureVoltage ( uint16_t over_volt_threshold,
uint16_t under_volt_threshold )
noexcept

Configure overvoltage and undervoltage protection thresholds.

Parameters
over_volt_thresholdOver-voltage warning threshold in units of 0.1V.
under_volt_thresholdUnder-voltage warning threshold in units of 0.1V.
Returns
true if thresholds were set successfully.

◆ resetI2tState()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Protection::resetI2tState ( )
noexcept

Reset the integrated I²t sum accumulators.

Returns
true if reset was successful.

◆ setOvercurrentEnabled()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Protection::setOvercurrentEnabled ( bool enabled)
noexcept

Enable or disable overcurrent protection on the driver outputs.

This controls the internal gate driver overcurrent detection (e.g., comparators) for various FETs.

Parameters
enabledTrue to enable overcurrent protection (shut down drivers on overcurrent), false to disable.
Returns
true if command was sent successfully.

Friends And Related Symbol Documentation

◆ TMC9660

template<typename CommType >
friend class TMC9660
friend

Member Data Documentation

◆ driver

template<typename CommType >
TMC9660& tmc9660::TMC9660< CommType >::Protection::driver
private

The documentation for this struct was generated from the following file: