HF-TMC51x0 Driver (TMC5130 & TMC5160) 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC51x0 (TMC5130 & TMC5160)
Loading...
Searching...
No Matches
tmc51x0::TMC51x0< CommType >::PowerStage Struct Reference

Power stage + protection subsystem (DRV_CONF, SHORT_CONF) More...

#include <tmc51x0.hpp>

Collaboration diagram for tmc51x0::TMC51x0< CommType >::PowerStage:
[legend]

Public Member Functions

 PowerStage (TMC51x0 &driver) noexcept
 
Result< void > ConfigurePowerStage (const PowerStageParameters &config) noexcept
 Configure power stage parameters (DRV_CONF register)
 
Result< void > ConfigureShortProtection (const PowerStageParameters &config) noexcept
 Configure short protection levels from PowerStageParameters.
 
Result< void > SetShortProtectionLevels (uint8_t s2vs_level, uint8_t s2g_level, uint8_t shortfilter, uint8_t shortdelay) noexcept
 Set short protection levels.
 

Private Attributes

TMC51x0driver_
 

Detailed Description

template<typename CommType>
struct tmc51x0::TMC51x0< CommType >::PowerStage

Power stage + protection subsystem (DRV_CONF, SHORT_CONF)

Groups board/power-electronics configuration and short protection, keeping motorControl focused on motor drive behavior.

Constructor & Destructor Documentation

◆ PowerStage()

template<typename CommType >
tmc51x0::TMC51x0< CommType >::PowerStage::PowerStage ( TMC51x0 & driver)
inlineexplicitnoexcept

Member Function Documentation

◆ ConfigurePowerStage()

template<typename CommType >
Result< void > tmc51x0::TMC51x0< CommType >::PowerStage::ConfigurePowerStage ( const PowerStageParameters & config)
noexcept

Configure power stage parameters (DRV_CONF register)

Parameters
configPower stage parameters structure
Returns
Result<void> indicating success or error

◆ ConfigureShortProtection()

template<typename CommType >
Result< void > tmc51x0::TMC51x0< CommType >::PowerStage::ConfigureShortProtection ( const PowerStageParameters & config)
noexcept

Configure short protection levels from PowerStageParameters.

Parameters
configPower stage parameters structure (contains short protection fields)
Returns
Result<void> indicating success or error

◆ SetShortProtectionLevels()

template<typename CommType >
Result< void > tmc51x0::TMC51x0< CommType >::PowerStage::SetShortProtectionLevels ( uint8_t s2vs_level,
uint8_t s2g_level,
uint8_t shortfilter,
uint8_t shortdelay )
noexcept

Set short protection levels.

Parameters
s2vs_levelShort to VS detector sensitivity (4-15)
s2g_levelShort to GND detector sensitivity (2-15)
shortfilterSpike filtering bandwidth (0-3)
shortdelayShort detection delay (0-1)
Returns
Result<void> indicating success or error

Member Data Documentation

◆ driver_

template<typename CommType >
TMC51x0& tmc51x0::TMC51x0< CommType >::PowerStage::driver_
private

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