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

Switch mode configuration register (SW_MODE) More...

#include <tmc51x0_registers.hpp>

Public Attributes

uint32_t value
 
struct { 
 
   uint32_t   stop_l_enable: 1 
 
   uint32_t   stop_r_enable: 1 
 
   uint32_t   pol_stop_l: 1 
 
   uint32_t   pol_stop_r: 1 
 
   uint32_t   swap_lr: 1 
 Swap the left and the right reference switch inputs. More...
 
   uint32_t   latch_l_active: 1 
 
   uint32_t   latch_l_inactive: 1 
 
   uint32_t   latch_r_active: 1 
 
   uint32_t   latch_r_inactive: 1 
 
   uint32_t   en_latch_encoder: 1 
 
   uint32_t   sg_stop: 1 
 
   uint32_t   en_softstop: 1 
 
   uint32_t   reserved: 20 
 Reserved bits. More...
 
bits 
 

Detailed Description

Switch mode configuration register (SW_MODE)

Configuration for reference switches and stop events.

Bit assignments per datasheet:

  • Bit 0: stop_l_enable - Enable automatic motor stop during active left reference switch input
  • Bit 1: stop_r_enable - Enable automatic motor stop during active right reference switch input
  • Bit 2: pol_stop_l - Sets the active polarity of the left reference switch input (0=non-inverted/high active, 1=inverted/low active)
  • Bit 3: pol_stop_r - Sets the active polarity of the right reference switch input (0=non-inverted/high active, 1=inverted/low active)
  • Bit 4: swap_lr - Swap the left and the right reference switch input REFL and REFR
  • Bit 5: latch_l_active - Activate latching of the position to XLATCH upon an active going edge on REFL
  • Bit 6: latch_l_inactive - Activate latching of the position to XLATCH upon an inactive going edge on REFL
  • Bit 7: latch_r_active - Activate latching of the position to XLATCH upon an active going edge on REFR
  • Bit 8: latch_r_inactive - Activate latching of the position to XLATCH upon an inactive going edge on REFR
  • Bit 9: en_latch_encoder - Latch encoder position to ENC_LATCH upon reference switch event
  • Bit 10: sg_stop - Enable stop by StallGuard2 (also available in DcStep mode)
  • Bit 11: en_softstop - Enable soft stop upon a stop event (uses deceleration ramp settings)

Member Data Documentation

◆ [struct]

struct { ... } tmc51x0::SW_MODE_Register::bits

◆ en_latch_encoder

uint32_t tmc51x0::SW_MODE_Register::en_latch_encoder

Latch encoder position to ENC_LATCH upon reference switch event

◆ en_softstop

uint32_t tmc51x0::SW_MODE_Register::en_softstop

Enable soft stop upon a stop event (uses the deceleration ramp settings)

◆ latch_l_active

uint32_t tmc51x0::SW_MODE_Register::latch_l_active

Activate latching of the position to XLATCH upon an active going edge on REFL

◆ latch_l_inactive

uint32_t tmc51x0::SW_MODE_Register::latch_l_inactive

Activate latching of the position to XLATCH upon an inactive going edge on REFL

◆ latch_r_active

uint32_t tmc51x0::SW_MODE_Register::latch_r_active

Activate latching of the position to XLATCH upon an active going edge on REFR

◆ latch_r_inactive

uint32_t tmc51x0::SW_MODE_Register::latch_r_inactive

Activate latching of the position to XLATCH upon an inactive going edge on REFR

◆ pol_stop_l

uint32_t tmc51x0::SW_MODE_Register::pol_stop_l

Sets the active polarity of the left reference switch input (1=inverted, low active)

◆ pol_stop_r

uint32_t tmc51x0::SW_MODE_Register::pol_stop_r

Sets the active polarity of the right reference switch input (1=inverted, low active)

◆ reserved

uint32_t tmc51x0::SW_MODE_Register::reserved

Reserved bits.

◆ sg_stop

uint32_t tmc51x0::SW_MODE_Register::sg_stop

Enable stop by stallGuard2 (also available in dcStep mode)

◆ stop_l_enable

uint32_t tmc51x0::SW_MODE_Register::stop_l_enable

Enable automatic motor stop during active left reference switch input

◆ stop_r_enable

uint32_t tmc51x0::SW_MODE_Register::stop_r_enable

Enable automatic motor stop during active right reference switch input

◆ swap_lr

uint32_t tmc51x0::SW_MODE_Register::swap_lr

Swap the left and the right reference switch inputs.

◆ value

uint32_t tmc51x0::SW_MODE_Register::value

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