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

coolStep smart current control and stallGuard2 configuration register (COOLCONF) More...

#include <tmc51x0_registers.hpp>

Public Attributes

uint32_t value
 
struct { 
 
   uint32_t   semin: 4 
 
   uint32_t   reserved1: 1 
 Bit 4: Reserved, set to 0. More...
 
   uint32_t   seup: 2 
 Bits 6..5: Current increment step width. More...
 
   uint32_t   reserved2: 1 
 Bit 7: Reserved, set to 0. More...
 
   uint32_t   semax: 4 
 
   uint32_t   reserved3: 1 
 Bit 12: Reserved, set to 0. More...
 
   uint32_t   sedn: 2 
 Bits 14..13: Current decrement step speed. More...
 
   uint32_t   seimin: 1 
 Bit 15: Minimum current for smart current control. More...
 
   int32_t   sgt: 7 
 
   uint32_t   reserved4: 1 
 Bit 23: Reserved, set to 0. More...
 
   uint32_t   sfilt: 1 
 Bit 24: StallGuard2 filter enable. More...
 
   uint32_t   reserved5: 7 
 Bits 31..25: Reserved, set to 0. More...
 
bits 
 

Detailed Description

coolStep smart current control and stallGuard2 configuration register (COOLCONF)

Configuration for smart current control and stallGuard2 stall detection.

Bit assignments per datasheet:

  • Bits 3..0: semin3..semin0 - Minimum StallGuard2 value for smart current control and smart current enable (4 bits) %0000: smart current control CoolStep off %0001...%1111: 1 ... 15
  • Bit 4: Reserved, set to 0
  • Bits 6..5: seup1..seup0 - Current up step width (2 bits) %00...%11: 1, 2, 4, 8
  • Bit 7: Reserved, set to 0
  • Bits 11..8: semax3..semax0 - StallGuard2 hysteresis value for smart current control (4 bits) %0000...%1111: 0 ... 15
  • Bit 12: Reserved, set to 0
  • Bits 14..13: sedn1..sedn0 - Current down step speed (2 bits) %00: For each 32 StallGuard2 values decrease by one %01: For each 8 StallGuard2 values decrease by one %10: For each 2 StallGuard2 values decrease by one %11: For each StallGuard2 value decrease by one
  • Bit 15: seimin - Minimum current for smart current control (1 bit) 0: 1/2 of current setting (IRUN) 1: 1/4 of current setting (IRUN)
  • Bits 22..16: sgt6..sgt0 - StallGuard2 threshold value (7 bits, signed) -64 to +63: A higher value makes StallGuard2 less sensitive Zero (0) is the starting value working with most motors
  • Bit 23: Reserved, set to 0
  • Bit 24: sfilt - StallGuard2 filter enable (1 bit) 0: Standard mode, high time resolution for StallGuard2 1: Filtered mode, StallGuard2 signal updated for each four fullsteps
  • Bits 31..25: Reserved, set to 0

Member Data Documentation

◆ [struct]

struct { ... } tmc51x0::COOLCONF_Register::bits

◆ reserved1

uint32_t tmc51x0::COOLCONF_Register::reserved1

Bit 4: Reserved, set to 0.

◆ reserved2

uint32_t tmc51x0::COOLCONF_Register::reserved2

Bit 7: Reserved, set to 0.

◆ reserved3

uint32_t tmc51x0::COOLCONF_Register::reserved3

Bit 12: Reserved, set to 0.

◆ reserved4

uint32_t tmc51x0::COOLCONF_Register::reserved4

Bit 23: Reserved, set to 0.

◆ reserved5

uint32_t tmc51x0::COOLCONF_Register::reserved5

Bits 31..25: Reserved, set to 0.

◆ sedn

uint32_t tmc51x0::COOLCONF_Register::sedn

Bits 14..13: Current decrement step speed.

◆ seimin

uint32_t tmc51x0::COOLCONF_Register::seimin

Bit 15: Minimum current for smart current control.

◆ semax

uint32_t tmc51x0::COOLCONF_Register::semax

Bits 11..8: StallGuard2 hysteresis value for smart current control

◆ semin

uint32_t tmc51x0::COOLCONF_Register::semin

Bits 3..0: Minimum StallGuard2 value for smart current control

◆ seup

uint32_t tmc51x0::COOLCONF_Register::seup

Bits 6..5: Current increment step width.

◆ sfilt

uint32_t tmc51x0::COOLCONF_Register::sfilt

Bit 24: StallGuard2 filter enable.

◆ sgt

int32_t tmc51x0::COOLCONF_Register::sgt

Bits 22..16: StallGuard2 threshold value (signed -64 to +63)

◆ value

uint32_t tmc51x0::COOLCONF_Register::value

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