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

DIAG1 pin configuration structure. More...

#include <tmc51x0_types.hpp>

Public Member Functions

 Diag1Config ()=default
 Default constructor.
 

Public Attributes

bool stall_dir {false}
 Bit 8: (SD_MODE=1) DIAG1 on stall, (SD_MODE=0) DIAG1 as DIR output.
 
bool index {false}
 Bit 9: Enable DIAG1 on index position (microstep LUT position 0) - SD_MODE=1 only.
 
bool onstate {false}
 Bit 10: Enable DIAG1 when chopper is on (second half of fullstep) - SD_MODE=1 only.
 
bool steps_skipped {false}
 Bit 11: Enable output toggle when steps skipped in dcStep mode - SD_MODE=1 only.
 
bool pushpull {false}
 Bit 13: Output mode (false=open collector active low, true=push pull active high)
 

Detailed Description

DIAG1 pin configuration structure.

Configuration for DIAG1 diagnostic output pin functionality. DIAG1 pin behavior depends on SD_MODE setting:

  • SD_MODE=1 (External step/dir): Diagnostic outputs (stall, index, onstate, steps_skipped)
  • SD_MODE=0 (Internal ramp): Can be used as DIR output or position compare signal
Note
steps_skipped should not be enabled with other DIAG1 options (mutually exclusive).

Constructor & Destructor Documentation

◆ Diag1Config()

tmc51x0::Diag1Config::Diag1Config ( )
default

Default constructor.

Initializes with all diagnostic features disabled (default).

Note
steps_skipped should not be enabled with other DIAG1 options.

Member Data Documentation

◆ index

bool tmc51x0::Diag1Config::index {false}

Bit 9: Enable DIAG1 on index position (microstep LUT position 0) - SD_MODE=1 only.

◆ onstate

bool tmc51x0::Diag1Config::onstate {false}

Bit 10: Enable DIAG1 when chopper is on (second half of fullstep) - SD_MODE=1 only.

◆ pushpull

bool tmc51x0::Diag1Config::pushpull {false}

Bit 13: Output mode (false=open collector active low, true=push pull active high)

◆ stall_dir

bool tmc51x0::Diag1Config::stall_dir {false}

Bit 8: (SD_MODE=1) DIAG1 on stall, (SD_MODE=0) DIAG1 as DIR output.

◆ steps_skipped

bool tmc51x0::Diag1Config::steps_skipped {false}

Bit 11: Enable output toggle when steps skipped in dcStep mode - SD_MODE=1 only.


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