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

stealthChop voltage PWM mode chopper configuration register (PWMCONF) More...

#include <tmc51x0_registers.hpp>

Public Attributes

uint32_t value
 
struct { 
 
   uint32_t   pwm_ofs: 8 
 Bits 7..0: User defined PWM amplitude (offset) More...
 
   uint32_t   pwm_grad: 8 
 Bits 15..8: User defined PWM amplitude (gradient) More...
 
   uint32_t   pwm_freq: 2 
 Bits 17..16: PWM frequency selection. More...
 
   uint32_t   pwm_autoscale: 1 
 Bit 18: Enable PWM automatic amplitude scaling. More...
 
   uint32_t   pwm_autograd: 1 
 Bit 19: PWM automatic gradient adaptation. More...
 
   uint32_t   freewheel: 2 
 Bits 21..20: Stand still option when I_HOLD=0. More...
 
   uint32_t   reserved1: 2 
 Bits 23..22: Reserved, set to 0. More...
 
   uint32_t   pwm_reg: 4 
 Bits 27..24: Regulation loop gradient. More...
 
   uint32_t   pwm_lim: 4 
 
bits 
 

Detailed Description

stealthChop voltage PWM mode chopper configuration register (PWMCONF)

Configuration for stealthChop PWM mode operation.

Bit assignments per datasheet:

  • Bits 7..0: PWM_OFS - User defined amplitude (offset) (8 bits) User defined PWM amplitude offset (0-255) related to full motor current (CS_ACTUAL=31) in stand still Reset default = 30
  • Bits 15..8: PWM_GRAD - User defined amplitude gradient (8 bits) Velocity dependent gradient for PWM amplitude: PWM_GRAD * 256 / TSTEP
  • Bits 17..16: pwm_freq1..pwm_freq0 - PWM frequency selection (2 bits) %00: fPWM=2/1024 fCLK (Reset default) %01: fPWM=2/683 fCLK %10: fPWM=2/512 fCLK %11: fPWM=2/410 fCLK
  • Bit 18: pwm_autoscale - PWM automatic amplitude scaling (1 bit) 0: User defined feed forward PWM amplitude 1: Enable automatic current control (Reset default)
  • Bit 19: pwm_autograd - PWM automatic gradient adaptation (1 bit) 0: Fixed value for PWM_GRAD 1: Automatic tuning (only with pwm_autoscale=1) (Reset default)
  • Bits 21..20: freewheel1..freewheel0 - Stand still option when motor current setting is zero (I_HOLD=0) (2 bits) %00: Normal operation %01: Freewheeling %10: Coil shorted using LS drivers %11: Coil shorted using HS drivers
  • Bits 23..22: Reserved, set to 0
  • Bits 27..24: PWM_REG - Regulation loop gradient (4 bits) User defined maximum PWM amplitude change per half wave when using pwm_autoscale=1 (1...15) 1: 0.5 increments (slowest regulation) 2: 1 increment 4: 2 increments (Reset default) 15: 7.5 increments (fastest regulation)
  • Bits 31..28: PWM_LIM - PWM automatic scale amplitude limit when switching on (4 bits) Limit for PWM_SCALE_AUTO when switching back from SpreadCycle to StealthChop (Default = 12)

Member Data Documentation

◆ [struct]

struct { ... } tmc51x0::PWMCONF_Register::bits

◆ freewheel

uint32_t tmc51x0::PWMCONF_Register::freewheel

Bits 21..20: Stand still option when I_HOLD=0.

◆ pwm_autograd

uint32_t tmc51x0::PWMCONF_Register::pwm_autograd

Bit 19: PWM automatic gradient adaptation.

◆ pwm_autoscale

uint32_t tmc51x0::PWMCONF_Register::pwm_autoscale

Bit 18: Enable PWM automatic amplitude scaling.

◆ pwm_freq

uint32_t tmc51x0::PWMCONF_Register::pwm_freq

Bits 17..16: PWM frequency selection.

◆ pwm_grad

uint32_t tmc51x0::PWMCONF_Register::pwm_grad

Bits 15..8: User defined PWM amplitude (gradient)

◆ pwm_lim

uint32_t tmc51x0::PWMCONF_Register::pwm_lim

Bits 31..28: PWM automatic scale amplitude limit when switching on

◆ pwm_ofs

uint32_t tmc51x0::PWMCONF_Register::pwm_ofs

Bits 7..0: User defined PWM amplitude (offset)

◆ pwm_reg

uint32_t tmc51x0::PWMCONF_Register::pwm_reg

Bits 27..24: Regulation loop gradient.

◆ reserved1

uint32_t tmc51x0::PWMCONF_Register::reserved1

Bits 23..22: Reserved, set to 0.

◆ value

uint32_t tmc51x0::PWMCONF_Register::value

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