|
HF-TMC9660 Driver
Hardware Agnostic C++ Driver for the TMC9660
|
Subsystem for configuring the MOSFET gate driver. More...
#include <TMC9660.hpp>

Public Member Functions | |
| bool | setOutputPolarity (tmc9660::tmcl::PwmOutputPolarity lowSide, tmc9660::tmcl::PwmOutputPolarity highSide) noexcept |
| Set the gate driver output polarity. | |
| bool | configureBreakBeforeMakeTiming (uint8_t lowSideUVW, uint8_t highSideUVW, uint8_t lowSideY2, uint8_t highSideY2) noexcept |
| Configure the break-before-make timing for the gate driver. | |
| bool | enableAdaptiveDriveTime (bool enableUVW, bool enableY2) noexcept |
| Enable or disable adaptive drive time for UVW and Y2 phases. | |
| bool | configureDriveTimes (uint8_t sinkTimeUVW, uint8_t sourceTimeUVW, uint8_t sinkTimeY2, uint8_t sourceTimeY2) noexcept |
| Configure drive times for UVW and Y2 phases. | |
| bool | configureCurrentLimits (tmc9660::tmcl::GateCurrentSink sinkCurrentUVW, tmc9660::tmcl::GateCurrentSource sourceCurrentUVW, tmc9660::tmcl::GateCurrentSink sinkCurrentY2, tmc9660::tmcl::GateCurrentSource sourceCurrentY2) noexcept |
| Configure gate driver current limits for UVW and Y2 phases. | |
| bool | configureBootstrapCurrentLimit (tmc9660::tmcl::BootstrapCurrentLimit limit) noexcept |
| Configure bootstrap current limit. | |
| bool | configureUndervoltageProtection (tmc9660::tmcl::UndervoltageLevel supplyLevel, tmc9660::tmcl::UndervoltageEnable enableVdrv, tmc9660::tmcl::UndervoltageEnable enableBstUVW, tmc9660::tmcl::UndervoltageEnable enableBstY2) noexcept |
| Configure undervoltage protection settings. | |
| bool | enableOvercurrentProtection (tmc9660::tmcl::OvercurrentEnable enableUVWLowSide, tmc9660::tmcl::OvercurrentEnable enableUVWHighSide, tmc9660::tmcl::OvercurrentEnable enableY2LowSide, tmc9660::tmcl::OvercurrentEnable enableY2HighSide) noexcept |
| Enable or disable overcurrent protection for UVW and Y2 phases. | |
| bool | setOvercurrentThresholds (tmc9660::tmcl::OvercurrentThreshold uvwLowSideThreshold, tmc9660::tmcl::OvercurrentThreshold uvwHighSideThreshold, tmc9660::tmcl::OvercurrentThreshold y2LowSideThreshold, tmc9660::tmcl::OvercurrentThreshold y2HighSideThreshold) noexcept |
| Configure overcurrent protection thresholds for UVW and Y2 phases. | |
| bool | setOvercurrentBlanking (tmc9660::tmcl::OvercurrentTiming uvwLowSideTime, tmc9660::tmcl::OvercurrentTiming uvwHighSideTime, tmc9660::tmcl::OvercurrentTiming y2LowSideTime, tmc9660::tmcl::OvercurrentTiming y2HighSideTime) noexcept |
| Configure the overcurrent protection blanking time for UVW and Y2 phases. | |
| bool | setOvercurrentDeglitch (tmc9660::tmcl::OvercurrentTiming uvwLowSideTime, tmc9660::tmcl::OvercurrentTiming uvwHighSideTime, tmc9660::tmcl::OvercurrentTiming y2LowSideTime, tmc9660::tmcl::OvercurrentTiming y2HighSideTime) noexcept |
| Configure the overcurrent protection deglitch time for UVW and Y2 phases. | |
| bool | enableVdsMonitoringLow (tmc9660::tmcl::VdsUsage uvwEnable, tmc9660::tmcl::VdsUsage y2Enable) noexcept |
| Enable or disable VDS monitoring for overcurrent protection on UVW and Y2 low sides. | |
| bool | configureVgsShortProtectionUVW (tmc9660::tmcl::VgsShortEnable enableLowSideOn, tmc9660::tmcl::VgsShortEnable enableLowSideOff, tmc9660::tmcl::VgsShortEnable enableHighSideOn, tmc9660::tmcl::VgsShortEnable enableHighSideOff) noexcept |
| Configure gate-to-source short protection for UVW phases. | |
| bool | configureVgsShortProtectionY2 (tmc9660::tmcl::VgsShortEnable enableLowSideOn, tmc9660::tmcl::VgsShortEnable enableLowSideOff, tmc9660::tmcl::VgsShortEnable enableHighSideOn, tmc9660::tmcl::VgsShortEnable enableHighSideOff) noexcept |
| Configure gate-to-source short protection for Y2 phase. | |
| bool | setVgsShortBlankingTime (tmc9660::tmcl::VgsBlankingTime uvwTime, tmc9660::tmcl::VgsBlankingTime y2Time) noexcept |
| Set gate-to-source short protection blanking time. | |
| bool | setVgsShortDeglitchTime (tmc9660::tmcl::VgsDeglitchTime uvwTime, tmc9660::tmcl::VgsDeglitchTime y2Time) noexcept |
| Set gate-to-source short protection deglitch time. | |
| bool | setRetryBehavior (tmc9660::tmcl::GdrvRetryBehaviour retryBehavior) noexcept |
| Configure fault retry behavior. | |
| bool | setDriveFaultBehavior (tmc9660::tmcl::DriveFaultBehaviour faultBehavior) noexcept |
| Configure drive fault behavior. | |
| bool | setFaultHandlerRetries (uint8_t retries) noexcept |
| Set the maximum number of retries for fault handling. | |
Private Member Functions | |
| GateDriver (TMC9660 &parent) noexcept | |
Private Attributes | |
| TMC9660 & | driver |
Friends | |
| class | TMC9660 |
Subsystem for configuring the MOSFET gate driver.
|
inlineexplicitprivatenoexcept |
|
noexcept |
Configure bootstrap current limit.
Sets the maximum current for the bootstrap capacitor.
| limit | Bootstrap current limit (BootstrapCurrentLimit enum). |
|
noexcept |
Configure the break-before-make timing for the gate driver.
Sets the timing for switching between high and low sides of the gate driver.
| lowSideUVW | Break-before-make time for UVW low side (0-255, 8.33ns units). |
| highSideUVW | Break-before-make time for UVW high side (0-255, 8.33ns units). |
| lowSideY2 | Break-before-make time for Y2 low side (0-255, 8.33ns units). |
| highSideY2 | Break-before-make time for Y2 high side (0-255, 8.33ns units). |
|
noexcept |
Configure gate driver current limits for UVW and Y2 phases.
Sets the maximum sink and source currents for the gate driver.
| sinkCurrentUVW | Sink current for UVW phases (GateCurrentSink enum). |
| sourceCurrentUVW | Source current for UVW phases (GateCurrentSource enum). |
| sinkCurrentY2 | Sink current for Y2 phase (GateCurrentSink enum). |
| sourceCurrentY2 | Source current for Y2 phase (GateCurrentSource enum). |
|
noexcept |
Configure drive times for UVW and Y2 phases.
Sets the discharge and charge times for the gate driver.
| sinkTimeUVW | Discharge time for UVW phases (0 ... 255). Default: 255. |
| sourceTimeUVW | Charge time for UVW phases (0 ... 255). Default: 255. |
| sinkTimeY2 | Discharge time for Y2 phase (0 ... 255). Default: 255. |
| sourceTimeY2 | Charge time for Y2 phase (0 ... 255). Default: 255. |
|
noexcept |
Configure undervoltage protection settings.
| supplyLevel | Supply voltage (VS) protection level (tmc9660::tmcl::UndervoltageLevel enum). |
| enableVdrv | Enable driver voltage (VDRV) protection (tmc9660::tmcl::UndervoltageEnable enum). |
| enableBstUVW | Enable bootstrap capacitor protection for UVW phases (tmc9660::tmcl::UndervoltageEnable enum). |
| enableBstY2 | Enable bootstrap capacitor protection for Y2 phase (tmc9660::tmcl::UndervoltageEnable enum). |
|
noexcept |
Configure gate-to-source short protection for UVW phases.
| enableLowSideOn | Enable protection for ON transition of low side (tmc9660::tmcl::VgsShortEnable enum). |
| enableLowSideOff | Enable protection for OFF transition of low side (tmc9660::tmcl::VgsShortEnable enum). |
| enableHighSideOn | Enable protection for ON transition of high side (tmc9660::tmcl::VgsShortEnable enum). |
| enableHighSideOff | Enable protection for OFF transition of high side (tmc9660::tmcl::VgsShortEnable enum). |
|
noexcept |
Configure gate-to-source short protection for Y2 phase.
| enableLowSideOn | Enable protection for ON transition of low side (tmc9660::tmcl::VgsShortEnable enum). |
| enableLowSideOff | Enable protection for OFF transition of low side (tmc9660::tmcl::VgsShortEnable enum). |
| enableHighSideOn | Enable protection for ON transition of high side (tmc9660::tmcl::VgsShortEnable enum). |
| enableHighSideOff | Enable protection for OFF transition of high side (tmc9660::tmcl::VgsShortEnable enum). |
|
noexcept |
Enable or disable adaptive drive time for UVW and Y2 phases.
Adaptive drive time shortens the discharge cycle by monitoring gate voltages.
| enableUVW | True to enable adaptive drive time for UVW phases. |
| enableY2 | True to enable adaptive drive time for Y2 phase. |
|
noexcept |
Enable or disable overcurrent protection for UVW and Y2 phases.
| enableUVWLowSide | Enable protection for UVW low side (tmc9660::tmcl::OvercurrentEnable enum). |
| enableUVWHighSide | Enable protection for UVW high side (tmc9660::tmcl::OvercurrentEnable enum). |
| enableY2LowSide | Enable protection for Y2 low side (tmc9660::tmcl::OvercurrentEnable enum). |
| enableY2HighSide | Enable protection for Y2 high side (tmc9660::tmcl::OvercurrentEnable enum). |
|
noexcept |
Enable or disable VDS monitoring for overcurrent protection on UVW and Y2 low sides.
| uvwEnable | True to enable VDS measurement for overcurrent protection on UVW low side (tmc9660::tmcl::VdsUsage enum). |
| y2Enable | True to enable VDS measurement for overcurrent protection on Y2 low side (tmc9660::tmcl::VdsUsage enum). |
|
noexcept |
Configure drive fault behavior.
| faultBehavior | Behavior after all retries fail (tmc9660::tmcl::DriveFaultBehavior enum). |
|
noexcept |
Set the maximum number of retries for fault handling.
| retries | Maximum number of retries (0-255). |
|
noexcept |
Set the gate driver output polarity.
Configures the PWM_L and PWM_H output polarity.
| lowSide | Polarity for the low-side gate outputs (tmc9660::tmcl::PwmOutputPolarity enum). |
| highSide | Polarity for the high-side gate outputs (tmc9660::tmcl::PwmOutputPolarity enum). |
|
noexcept |
Configure the overcurrent protection blanking time for UVW and Y2 phases.
Sets the blanking time for overcurrent protection to filter out transient spikes during switching events.
| uvwLowSideTime | Blanking time for the low side of UVW phases (tmc9660::tmcl::OvercurrentTiming enum). |
| uvwHighSideTime | Blanking time for the high side of UVW phases (tmc9660::tmcl::OvercurrentTiming enum). |
| y2LowSideTime | Blanking time for the low side of Y2 phase (tmc9660::tmcl::OvercurrentTiming enum). |
| y2HighSideTime | Blanking time for the high side of Y2 phase (tmc9660::tmcl::OvercurrentTiming enum). |
|
noexcept |
Configure the overcurrent protection deglitch time for UVW and Y2 phases.
Sets how long an overcurrent condition must persist before triggering protection.
| uvwLowSideTime | Deglitch time for the low side of UVW phases (tmc9660::tmcl::OvercurrentTiming enum). |
| uvwHighSideTime | Deglitch time for the high side of UVW phases (tmc9660::tmcl::OvercurrentTiming enum). |
| y2LowSideTime | Deglitch time for the low side of Y2 phase (tmc9660::tmcl::OvercurrentTiming enum). |
| y2HighSideTime | Deglitch time for the high side of Y2 phase (tmc9660::tmcl::OvercurrentTiming enum). |
|
noexcept |
Configure overcurrent protection thresholds for UVW and Y2 phases.
| uvwLowSideThreshold | Threshold for UVW low side (tmc9660::tmcl::OvercurrentThreshold enum). |
| uvwHighSideThreshold | Threshold for UVW high side (tmc9660::tmcl::OvercurrentThreshold enum). |
| y2LowSideThreshold | Threshold for Y2 low side (tmc9660::tmcl::OvercurrentThreshold enum). |
| y2HighSideThreshold | Threshold for Y2 high side (tmc9660::tmcl::OvercurrentThreshold enum). |
|
noexcept |
Configure fault retry behavior.
| retryBehavior | Retry behavior after a fault (tmc9660::tmcl::GdrvRetryBehaviour enum). |
|
noexcept |
Set gate-to-source short protection blanking time.
| uvwTime | Blanking time for UVW phases (tmc9660::tmcl::VgsBlankingTime enum). |
| y2Time | Blanking time for Y2 phase (tmc9660::tmcl::VgsBlankingTime enum). |
|
noexcept |
Set gate-to-source short protection deglitch time.
| uvwTime | Deglitch time for UVW phases (tmc9660::tmcl::VgsDeglitchTime enum). |
| y2Time | Deglitch time for Y2 phase (tmc9660::tmcl::VgsDeglitchTime enum). |
|
friend |
|
private |