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

stallGuard2 value and driver error flags register (DRV_STATUS) More...

#include <tmc51x0_registers.hpp>

Public Attributes

uint32_t value
 
struct { 
 
   uint32_t   sg_result: 10 
 
   uint32_t   reserved1: 2 
 Bits 11..10: Reserved, ignore these bits. More...
 
   uint32_t   s2vsa: 1 
 Bit 12: Short to supply indicator phase A. More...
 
   uint32_t   s2vsb: 1 
 Bit 13: Short to supply indicator phase B. More...
 
   uint32_t   stealth: 1 
 Bit 14: StealthChop indicator. More...
 
   uint32_t   fsactive: 1 
 Bit 15: Full step active indicator. More...
 
   uint32_t   cs_actual: 5 
 
   uint32_t   reserved2: 3 
 21 is also reserved per datasheet) More...
 
   uint32_t   stallguard: 1 
 Bit 24: StallGuard2 status. More...
 
   uint32_t   ot: 1 
 Bit 25: Overtemperature flag. More...
 
   uint32_t   otpw: 1 
 Bit 26: Overtemperature pre-warning flag. More...
 
   uint32_t   s2ga: 1 
 Bit 27: Short to ground indicator phase A. More...
 
   uint32_t   s2gb: 1 
 Bit 28: Short to ground indicator phase B. More...
 
   uint32_t   ola: 1 
 Bit 29: Open load indicator phase A. More...
 
   uint32_t   olb: 1 
 Bit 30: Open load indicator phase B. More...
 
   uint32_t   stst: 1 
 Bit 31: Standstill indicator. More...
 
bits 
 

Detailed Description

stallGuard2 value and driver error flags register (DRV_STATUS)

Status information including stallGuard2 result, driver errors, and motor current.

Bit assignments per datasheet:

  • Bits 9..0: SG_RESULT - StallGuard2 result or PWM on time for coil A in standstill (10 bits) Mechanical load measurement: Higher value means lower mechanical load. Value of 0 signals highest load. Temperature measurement: In standstill, shows chopper on-time for motor coil A.
  • Bits 11..10: Reserved, ignore these bits
  • Bit 12: s2vsa - Short to supply indicator phase A
  • Bit 13: s2vsb - Short to supply indicator phase B
  • Bit 14: stealth - StealthChop indicator (1: Driver operates in StealthChop mode)
  • Bit 15: fsactive - Full step active indicator (1: Driver has switched to fullstep)
  • Bits 20..16: CS_ACTUAL - Actual motor current / smart energy current (5 bits) Actual current control scaling for monitoring smart energy current scaling
  • Bits 23..21: Reserved, ignore these bits
  • Bit 24: stallguard - StallGuard2 status (1: Motor stall detected or DcStep stall)
  • Bit 25: ot - Overtemperature flag (1: Overtemperature limit reached, drivers disabled)
  • Bit 26: otpw - Overtemperature pre-warning flag (1: Pre-warning threshold exceeded)
  • Bit 27: s2ga - Short to ground indicator phase A
  • Bit 28: s2gb - Short to ground indicator phase B
  • Bit 29: ola - Open load indicator phase A
  • Bit 30: olb - Open load indicator phase B
  • Bit 31: stst - Standstill indicator (1: Motor standstill, occurs 2^20 clocks after last step pulse)

Member Data Documentation

◆ [struct]

struct { ... } tmc51x0::DRV_STATUS_Register::bits

◆ cs_actual

uint32_t tmc51x0::DRV_STATUS_Register::cs_actual

Bits 20..16: Actual motor current / smart energy current

◆ fsactive

uint32_t tmc51x0::DRV_STATUS_Register::fsactive

Bit 15: Full step active indicator.

◆ ola

uint32_t tmc51x0::DRV_STATUS_Register::ola

Bit 29: Open load indicator phase A.

◆ olb

uint32_t tmc51x0::DRV_STATUS_Register::olb

Bit 30: Open load indicator phase B.

◆ ot

uint32_t tmc51x0::DRV_STATUS_Register::ot

Bit 25: Overtemperature flag.

◆ otpw

uint32_t tmc51x0::DRV_STATUS_Register::otpw

Bit 26: Overtemperature pre-warning flag.

◆ reserved1

uint32_t tmc51x0::DRV_STATUS_Register::reserved1

Bits 11..10: Reserved, ignore these bits.

◆ reserved2

uint32_t tmc51x0::DRV_STATUS_Register::reserved2

21 is also reserved per datasheet)

Bits 23..21: Reserved, ignore these bits (bit

◆ s2ga

uint32_t tmc51x0::DRV_STATUS_Register::s2ga

Bit 27: Short to ground indicator phase A.

◆ s2gb

uint32_t tmc51x0::DRV_STATUS_Register::s2gb

Bit 28: Short to ground indicator phase B.

◆ s2vsa

uint32_t tmc51x0::DRV_STATUS_Register::s2vsa

Bit 12: Short to supply indicator phase A.

◆ s2vsb

uint32_t tmc51x0::DRV_STATUS_Register::s2vsb

Bit 13: Short to supply indicator phase B.

◆ sg_result

uint32_t tmc51x0::DRV_STATUS_Register::sg_result

Bits 9..0: StallGuard2 result or motor temperature estimation

◆ stallguard

uint32_t tmc51x0::DRV_STATUS_Register::stallguard

Bit 24: StallGuard2 status.

◆ stealth

uint32_t tmc51x0::DRV_STATUS_Register::stealth

Bit 14: StealthChop indicator.

◆ stst

uint32_t tmc51x0::DRV_STATUS_Register::stst

Bit 31: Standstill indicator.

◆ value

uint32_t tmc51x0::DRV_STATUS_Register::value

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