TMCStepper
Library supporting Trinamic Stepper Drivers for Arduino platforms
Loading...
Searching...
No Matches
TMC5161Stepper Class Reference

#include <TMC5161Stepper.h>

Inheritance diagram for TMC5161Stepper:
Collaboration diagram for TMC5161Stepper:

Public Member Functions

 TMC5161Stepper (uint16_t pinCS, float RS=default_RS, int8_t link_index=-1)
 TMC5161Stepper (uint16_t pinCS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK, int8_t link_index=-1)
 TMC5161Stepper (uint16_t pinCS, float RS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK, int8_t link_index=-1)
Public Member Functions inherited from TMC5160Stepper
 TMC5160Stepper (uint16_t pinCS, float RS=default_RS, int8_t link_index=-1)
 TMC5160Stepper (uint16_t pinCS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK, int8_t link_index=-1)
 TMC5160Stepper (uint16_t pinCS, float RS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK, int8_t link_index=-1)
void rms_current (uint16_t mA)
void rms_current (uint16_t mA, float mult)
uint16_t rms_current ()
void defaults ()
void push ()
void recalibrate (bool)
void faststandstill (bool)
void multistep_filt (bool)
bool recalibrate ()
bool faststandstill ()
bool multistep_filt ()
bool drv_enn ()
bool enc_n_dco_cfg6 ()
void ENC_STATUS (uint8_t)
uint8_t ENC_STATUS ()
void ENC_DEVIATION (uint32_t)
uint32_t ENC_DEVIATION ()
uint32_t PWM_AUTO ()
uint8_t pwm_ofs_auto ()
uint8_t pwm_grad_auto ()
void diss2vs (bool)
void tpfd (uint8_t)
bool diss2vs ()
uint8_t tpfd ()
void SHORT_CONF (uint32_t)
uint32_t SHORT_CONF ()
void s2vs_level (uint8_t)
uint8_t s2vs_level ()
void s2g_level (uint8_t)
uint8_t s2g_level ()
void shortfilter (uint8_t)
uint8_t shortfilter ()
void shortdelay (bool)
bool shortdelay ()
void DRV_CONF (uint32_t)
uint32_t DRV_CONF ()
void bbmtime (uint8_t)
uint8_t bbmtime ()
void bbmclks (uint8_t)
uint8_t bbmclks ()
void otselect (uint8_t)
uint8_t otselect ()
void drvstrength (uint8_t)
uint8_t drvstrength ()
void filt_isense (uint8_t)
uint8_t filt_isense ()
void GLOBAL_SCALER (uint8_t)
uint8_t GLOBAL_SCALER ()
uint16_t OFFSET_READ ()
void PWMCONF (uint32_t input)
uint32_t PWMCONF ()
void pwm_ofs (uint8_t B)
uint8_t pwm_ofs ()
void pwm_grad (uint8_t B)
uint8_t pwm_grad ()
void pwm_freq (uint8_t B)
uint8_t pwm_freq ()
void pwm_autoscale (bool B)
bool pwm_autoscale ()
void pwm_autograd (bool B)
bool pwm_autograd ()
void freewheel (uint8_t B)
uint8_t freewheel ()
void pwm_reg (uint8_t B)
uint8_t pwm_reg ()
void pwm_lim (uint8_t B)
uint8_t pwm_lim ()
uint32_t PWM_SCALE ()
uint8_t pwm_scale_sum ()
uint16_t pwm_scale_auto ()
Public Member Functions inherited from TMC5130Stepper
 TMC5130Stepper (uint16_t pinCS, float RS=default_RS, int8_t link_index=-1)
 TMC5130Stepper (uint16_t pinCS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK, int8_t link_index=-1)
 TMC5130Stepper (uint16_t pinCS, float RS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK, int8_t link_index=-1)
void begin ()
void defaults ()
void push ()
void rms_current (uint16_t mA)
void rms_current (uint16_t mA, float mult)
uint16_t rms_current ()
uint8_t IFCNT ()
uint16_t SLAVECONF ()
void SLAVECONF (uint16_t input)
uint32_t IOIN ()
bool refl_step ()
bool refr_dir ()
bool encb_dcen_cfg4 ()
bool enca_dcin_cfg5 ()
bool drv_enn_cfg6 ()
bool enc_n_dco ()
bool sd_mode ()
bool swcomp_in ()
uint8_t version ()
void diag1_poscomp_pushpull (bool B)
bool diag1_poscomp_pushpull ()
uint32_t SW_MODE ()
void SW_MODE (uint32_t input)
void stop_l_enable (bool B)
void stop_r_enable (bool B)
void pol_stop_l (bool B)
void pol_stop_r (bool B)
void swap_lr (bool B)
void latch_l_active (bool B)
void latch_l_inactive (bool B)
void latch_r_active (bool B)
void latch_r_inactive (bool B)
void en_latch_encoder (bool B)
void sg_stop (bool B)
void en_softstop (bool B)
bool stop_r_enable ()
bool pol_stop_l ()
bool pol_stop_r ()
bool swap_lr ()
bool latch_l_active ()
bool latch_l_inactive ()
bool latch_r_active ()
bool latch_r_inactive ()
bool en_latch_encoder ()
bool sg_stop ()
bool en_softstop ()
uint32_t RAMP_STAT ()
bool status_stop_l ()
bool status_stop_r ()
bool status_latch_l ()
bool status_latch_r ()
bool event_stop_l ()
bool event_stop_r ()
bool event_stop_sg ()
bool event_pos_reached ()
bool velocity_reached ()
bool position_reached ()
bool vzero ()
bool t_zerowait_active ()
bool second_move ()
bool status_sg ()
uint32_t ENCMODE ()
void ENCMODE (uint32_t input)
void pol_a (bool B)
void pol_b (bool B)
void pol_n (bool B)
void ignore_ab (bool B)
void clr_cont (bool B)
void clr_once (bool B)
void pos_edge (bool B)
void neg_edge (bool B)
void clr_enc_x (bool B)
void latch_x_act (bool B)
void enc_sel_decimal (bool B)
bool pol_a ()
bool pol_b ()
bool pol_n ()
bool ignore_ab ()
bool clr_cont ()
bool clr_once ()
bool pos_edge ()
bool neg_edge ()
bool clr_enc_x ()
bool latch_x_act ()
bool enc_sel_decimal ()
bool TMC_OUTPUT ()
void TMC_OUTPUT (bool input)
uint32_t X_COMPARE ()
void X_COMPARE (uint32_t input)
uint8_t RAMPMODE ()
void RAMPMODE (uint8_t input)
int32_t XACTUAL ()
void XACTUAL (int32_t input)
int32_t VACTUAL ()
uint32_t VSTART ()
void VSTART (uint32_t input)
uint16_t a1 ()
void a1 (uint16_t input)
uint32_t v1 ()
void v1 (uint32_t input)
uint16_t AMAX ()
void AMAX (uint16_t input)
uint32_t VMAX ()
void VMAX (uint32_t input)
uint16_t DMAX ()
void DMAX (uint16_t input)
uint16_t d1 ()
void d1 (uint16_t input)
uint32_t VSTOP ()
void VSTOP (uint32_t input)
uint16_t TZEROWAIT ()
void TZEROWAIT (uint16_t input)
int32_t XTARGET ()
void XTARGET (int32_t input)
uint32_t XLATCH ()
int32_t X_ENC ()
void X_ENC (int32_t input)
uint32_t ENC_CONST ()
void ENC_CONST (uint32_t input)
bool ENC_STATUS ()
uint32_t ENC_LATCH ()
uint8_t ENCM_CTRL ()
void ENCM_CTRL (uint8_t input)
void PWMCONF (uint32_t value)
uint32_t PWMCONF ()
void pwm_ampl (uint8_t B)
uint8_t pwm_ampl ()
void pwm_grad (uint8_t B)
uint8_t pwm_grad ()
void pwm_freq (uint8_t B)
uint8_t pwm_freq ()
void pwm_autoscale (bool B)
bool pwm_autoscale ()
void pwm_symmetric (bool B)
bool pwm_symmetric ()
void freewheel (uint8_t B)
uint8_t freewheel ()
uint8_t PWM_SCALE ()
Public Member Functions inherited from TMC2160Stepper
 TMC2160Stepper (uint16_t pinCS, float RS=default_RS, int8_t link_index=-1)
 TMC2160Stepper (uint16_t pinCS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK, int8_t link_index=-1)
 TMC2160Stepper (uint16_t pinCS, float RS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK, int8_t link_index=-1)
void begin ()
void defaults ()
void push ()
uint16_t cs2rms (uint8_t CS)
void rms_current (uint16_t mA)
void rms_current (uint16_t mA, float mult)
uint16_t rms_current ()
uint32_t IOIN ()
bool refl_step ()
bool refr_dir ()
bool encb_dcen_cfg4 ()
bool enca_dcin_cfg5 ()
bool drv_enn ()
bool dco_cfg6 ()
uint8_t version ()
void SHORT_CONF (uint32_t)
void s2vs_level (uint8_t)
void s2g_level (uint8_t)
void shortfilter (uint8_t)
void shortdelay (bool)
uint32_t SHORT_CONF ()
uint8_t s2vs_level ()
uint8_t s2g_level ()
uint8_t shortfilter ()
bool shortdelay ()
void DRV_CONF (uint32_t)
void bbmtime (uint8_t)
void bbmclks (uint8_t)
void otselect (uint8_t)
void drvstrength (uint8_t)
void filt_isense (uint8_t)
uint32_t DRV_CONF ()
uint8_t bbmtime ()
uint8_t bbmclks ()
uint8_t otselect ()
uint8_t drvstrength ()
uint8_t filt_isense ()
void GLOBAL_SCALER (uint8_t)
uint8_t GLOBAL_SCALER ()
uint16_t OFFSET_READ ()
void PWMCONF (uint32_t input)
void pwm_ofs (uint8_t B)
void pwm_grad (uint8_t B)
void pwm_freq (uint8_t B)
void pwm_autoscale (bool B)
void pwm_autograd (bool B)
void freewheel (uint8_t B)
void pwm_reg (uint8_t B)
void pwm_lim (uint8_t B)
uint32_t PWMCONF ()
uint8_t pwm_ofs ()
uint8_t pwm_grad ()
uint8_t pwm_freq ()
bool pwm_autoscale ()
bool pwm_autograd ()
uint8_t freewheel ()
uint8_t pwm_reg ()
uint8_t pwm_lim ()
uint32_t PWM_SCALE ()
uint8_t pwm_scale_sum ()
uint16_t pwm_scale_auto ()
Public Member Functions inherited from TMC2130Stepper
 TMC2130Stepper (uint16_t pinCS, float RS=default_RS, int8_t link_index=-1)
 TMC2130Stepper (uint16_t pinCS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK, int8_t link_index=-1)
 TMC2130Stepper (uint16_t pinCS, float RS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK, int8_t link_index=-1)
 ~TMC2130Stepper ()
void begin ()
void defaults ()
void setSPISpeed (uint32_t speed)
void switchCSpin (bool state)
bool isEnabled ()
void push ()
void sg_current_decrease (uint8_t value)
uint8_t sg_current_decrease ()
uint32_t GCONF ()
void GCONF (uint32_t value)
void I_scale_analog (bool B)
void internal_Rsense (bool B)
void en_pwm_mode (bool B)
void enc_commutation (bool B)
void shaft (bool B)
void diag0_error (bool B)
void diag0_otpw (bool B)
void diag0_stall (bool B)
void diag1_stall (bool B)
void diag1_index (bool B)
void diag1_onstate (bool B)
void diag1_steps_skipped (bool B)
void diag0_int_pushpull (bool B)
void diag1_pushpull (bool B)
void small_hysteresis (bool B)
void stop_enable (bool B)
void direct_mode (bool B)
bool I_scale_analog ()
bool internal_Rsense ()
bool en_pwm_mode ()
bool enc_commutation ()
bool shaft ()
bool diag0_error ()
bool diag0_otpw ()
bool diag0_stall ()
bool diag1_stall ()
bool diag1_index ()
bool diag1_onstate ()
bool diag1_steps_skipped ()
bool diag0_int_pushpull ()
bool diag1_pushpull ()
bool small_hysteresis ()
bool stop_enable ()
bool direct_mode ()
uint32_t IOIN ()
bool step ()
bool dir ()
bool dcen_cfg4 ()
bool dcin_cfg5 ()
bool drv_enn_cfg6 ()
bool dco ()
uint8_t version ()
uint32_t TCOOLTHRS ()
void TCOOLTHRS (uint32_t input)
uint32_t THIGH ()
void THIGH (uint32_t input)
uint32_t XDIRECT ()
void XDIRECT (uint32_t input)
void coil_A (int16_t B)
void coil_B (int16_t B)
int16_t coil_A ()
int16_t coil_B ()
uint32_t VDCMIN ()
void VDCMIN (uint32_t input)
uint32_t CHOPCONF ()
void CHOPCONF (uint32_t value)
void toff (uint8_t B)
void hstrt (uint8_t B)
void hend (uint8_t B)
void disfdcc (bool B)
void rndtf (bool B)
void chm (bool B)
void tbl (uint8_t B)
void vsense (bool B)
void vhighfs (bool B)
void vhighchm (bool B)
void sync (uint8_t B)
void mres (uint8_t B)
void intpol (bool B)
void dedge (bool B)
void diss2g (bool B)
uint8_t toff ()
uint8_t hstrt ()
uint8_t hend ()
bool disfdcc ()
bool rndtf ()
bool chm ()
uint8_t tbl ()
bool vsense ()
bool vhighfs ()
bool vhighchm ()
uint8_t sync ()
uint8_t mres ()
bool intpol ()
bool dedge ()
bool diss2g ()
void COOLCONF (uint32_t value)
uint32_t COOLCONF ()
void semin (uint8_t B)
void seup (uint8_t B)
void semax (uint8_t B)
void sedn (uint8_t B)
void seimin (bool B)
void sgt (int8_t B)
void sfilt (bool B)
uint8_t semin ()
uint8_t seup ()
uint8_t semax ()
uint8_t sedn ()
bool seimin ()
int8_t sgt ()
bool sfilt ()
void DCCTRL (uint32_t input)
void dc_time (uint16_t input)
void dc_sg (uint8_t input)
uint32_t DCCTRL ()
uint16_t dc_time ()
uint8_t dc_sg ()
uint32_t DRV_STATUS ()
uint16_t sg_result ()
bool fsactive ()
uint8_t cs_actual ()
bool stallguard ()
bool ot ()
bool otpw ()
bool s2ga ()
bool s2gb ()
bool ola ()
bool olb ()
bool stst ()
void PWMCONF (uint32_t value)
uint32_t PWMCONF ()
void pwm_ampl (uint8_t B)
void pwm_grad (uint8_t B)
void pwm_freq (uint8_t B)
void pwm_autoscale (bool B)
void pwm_symmetric (bool B)
void freewheel (uint8_t B)
uint8_t pwm_ampl ()
uint8_t pwm_grad ()
uint8_t pwm_freq ()
bool pwm_autoscale ()
bool pwm_symmetric ()
uint8_t freewheel ()
uint8_t PWM_SCALE ()
uint8_t ENCM_CTRL ()
void ENCM_CTRL (uint8_t input)
void inv (bool B)
void maxspeed (bool B)
bool inv ()
bool maxspeed ()
uint32_t LOST_STEPS ()
Public Member Functions inherited from TMCStepper
uint16_t cs2rms (uint8_t CS)
void rms_current (uint16_t mA)
void rms_current (uint16_t mA, float mult)
uint16_t rms_current ()
void hold_multiplier (float val)
float hold_multiplier ()
uint8_t test_connection ()
void microsteps (uint16_t ms)
uint16_t microsteps ()
void blank_time (uint8_t value)
uint8_t blank_time ()
void hysteresis_end (int8_t value)
int8_t hysteresis_end ()
void hysteresis_start (uint8_t value)
uint8_t hysteresis_start ()
void GSTAT (uint8_t input)
uint8_t GSTAT ()
bool reset ()
bool drv_err ()
bool uv_cp ()
void IHOLD_IRUN (uint32_t input)
uint32_t IHOLD_IRUN ()
void ihold (uint8_t B)
void irun (uint8_t B)
void iholddelay (uint8_t B)
uint8_t ihold ()
uint8_t irun ()
uint8_t iholddelay ()
uint8_t TPOWERDOWN ()
void TPOWERDOWN (uint8_t input)
uint32_t TSTEP ()
uint32_t TPWMTHRS ()
void TPWMTHRS (uint32_t input)
uint16_t MSCNT ()

Additional Inherited Members

Public Attributes inherited from TMC2130Stepper
uint8_t status_response
Protected Member Functions inherited from TMC5160Stepper
 INIT_REGISTER (ENC_DEVIATION)
bool drv_enn_cfg6 ()
bool enc_n_dco ()
uint8_t ENCM_CTRL ()
void ENCM_CTRL (uint8_t input)
Protected Member Functions inherited from TMC5130Stepper
 INIT_REGISTER (SLAVECONF)
 INIT_REGISTER (OUTPUT)
 INIT_REGISTER (X_COMPARE)
 INIT_REGISTER (RAMPMODE)
 INIT_REGISTER (XACTUAL)
 INIT_REGISTER (VSTART)
 INIT_REGISTER (A1)
 INIT_REGISTER (V1)
 INIT_REGISTER (AMAX)
 INIT_REGISTER (VMAX)
 INIT_REGISTER (DMAX)
 INIT_REGISTER (D1)
 INIT_REGISTER (VSTOP)
 INIT_REGISTER (TZEROWAIT)
 INIT_REGISTER (SW_MODE)
 INIT_REGISTER (ENCMODE)
 INIT_REGISTER (ENC_CONST)
void SHORT_CONF (uint32_t)
uint32_t SHORT_CONF ()
void s2vs_level (uint8_t)
uint8_t s2vs_level ()
void s2g_level (uint8_t)
uint8_t s2g_level ()
void shortfilter (uint8_t)
uint8_t shortfilter ()
void shortdelay (bool)
bool shortdelay ()
void DRV_CONF (uint32_t)
uint32_t DRV_CONF ()
void bbmtime (uint8_t)
uint8_t bbmtime ()
void bbmclks (uint8_t)
uint8_t bbmclks ()
void otselect (uint8_t)
uint8_t otselect ()
void drvstrength (uint8_t)
uint8_t drvstrength ()
void filt_isense (uint8_t)
uint8_t filt_isense ()
void GLOBAL_SCALER (uint8_t)
uint8_t GLOBAL_SCALER ()
uint16_t OFFSET_READ ()
void pwm_ofs (uint8_t B)
uint8_t pwm_ofs ()
void pwm_autograd (bool B)
bool pwm_autograd ()
void pwm_reg (uint8_t B)
uint8_t pwm_reg ()
void pwm_lim (uint8_t B)
uint8_t pwm_lim ()
uint8_t pwm_scale_sum ()
uint16_t pwm_scale_auto ()
Protected Member Functions inherited from TMC2160Stepper
 INIT_REGISTER (SHORT_CONF)
 INIT_REGISTER (DRV_CONF)
 INIT_REGISTER (GLOBAL_SCALER)
 INIT2160_REGISTER (PWMCONF)
uint8_t ENCM_CTRL ()
void ENCM_CTRL (uint8_t input)
void pwm_ampl (uint8_t B)
uint8_t pwm_ampl ()
void pwm_symmetric (bool B)
bool pwm_symmetric ()
Protected Member Functions inherited from TMC2130Stepper
void beginTransaction ()
void endTransaction ()
uint8_t transfer (const uint8_t data)
void transferEmptyBytes (const uint8_t n)
void write (uint8_t addressByte, uint32_t config)
uint32_t read (uint8_t addressByte)
 INIT_REGISTER (GCONF)
 INIT_REGISTER (TCOOLTHRS)
 INIT_REGISTER (THIGH)
 INIT_REGISTER (XDIRECT)
 INIT_REGISTER (VDCMIN)
 INIT_REGISTER (CHOPCONF)
 INIT_REGISTER (COOLCONF)
 INIT_REGISTER (DCCTRL)
 INIT_REGISTER (PWMCONF)
 INIT_REGISTER (ENCM_CTRL)
Protected Member Functions inherited from TMCStepper
 TMCStepper (float RS)
virtual ~TMCStepper ()=default
 INIT_REGISTER (IHOLD_IRUN)
 INIT_REGISTER (TPOWERDOWN)
 INIT_REGISTER (TPWMTHRS)
Protected Attributes inherited from TMC2130Stepper
const uint16_t _pinCS
SW_SPIClassTMC_SW_SPI = nullptr
int8_t link_index
Protected Attributes inherited from TMCStepper
const float Rsense
float holdMultiplier = 0.5
Static Protected Attributes inherited from TMC5160Stepper
static constexpr float default_RS = 0.075
Static Protected Attributes inherited from TMC5130Stepper
static constexpr float default_RS = 0.15
Static Protected Attributes inherited from TMC2160Stepper
static constexpr float default_RS = 0.075
Static Protected Attributes inherited from TMC2130Stepper
static uint32_t spi_speed = 16000000/8
static constexpr float default_RS = 0.11
static int8_t chain_length = 0
Static Protected Attributes inherited from TMCStepper
static constexpr uint8_t TMC_READ = 0x00
static constexpr uint8_t TMC_WRITE = 0x80

Detailed Description

TMCStepper library by @teemuatlut

TMC5161Stepper.h Individual header for class TMC5161Stepper

Definition at line 9 of file TMC5161Stepper.h.

Constructor & Destructor Documentation

◆ TMC5161Stepper() [1/3]

TMC5161Stepper::TMC5161Stepper ( uint16_t pinCS,
float RS = default_RS,
int8_t link_index = -1 )
inline

Definition at line 11 of file TMC5161Stepper.h.

Here is the call graph for this function:

◆ TMC5161Stepper() [2/3]

TMC5161Stepper::TMC5161Stepper ( uint16_t pinCS,
uint16_t pinMOSI,
uint16_t pinMISO,
uint16_t pinSCK,
int8_t link_index = -1 )
inline

Definition at line 12 of file TMC5161Stepper.h.

Here is the call graph for this function:

◆ TMC5161Stepper() [3/3]

TMC5161Stepper::TMC5161Stepper ( uint16_t pinCS,
float RS,
uint16_t pinMOSI,
uint16_t pinMISO,
uint16_t pinSCK,
int8_t link_index = -1 )
inline

Definition at line 14 of file TMC5161Stepper.h.

Here is the call graph for this function:

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