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

#include <TMC2209Stepper.h>

Inheritance diagram for TMC2209Stepper:
Collaboration diagram for TMC2209Stepper:

Public Member Functions

 TMC2209Stepper (Stream *SerialPort, float RS, uint8_t addr)
 TMC2209Stepper (uint16_t, uint16_t, float, uint8_t)=delete
void push ()
uint32_t IOIN ()
bool enn ()
bool ms1 ()
bool ms2 ()
bool diag ()
bool pdn_uart ()
bool step ()
bool spread_en ()
bool dir ()
uint8_t version ()
uint32_t TCOOLTHRS ()
void TCOOLTHRS (uint32_t input)
void SGTHRS (uint8_t B)
uint8_t SGTHRS ()
uint16_t SG_RESULT ()
void COOLCONF (uint16_t B)
uint16_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)
uint8_t semin ()
uint8_t seup ()
uint8_t semax ()
uint8_t sedn ()
bool seimin ()
Public Member Functions inherited from TMC2208Stepper
 TMC2208Stepper (Stream *SerialPort, float RS, uint8_t addr, uint16_t mul_pin1, uint16_t mul_pin2)
 TMC2208Stepper (Stream *SerialPort, float RS)
 TMC2208Stepper (uint16_t, uint16_t, float)=delete
void defaults ()
void push ()
void begin ()
void beginSerial (uint32_t)=delete
bool isEnabled ()
void GCONF (uint32_t input)
void I_scale_analog (bool B)
void internal_Rsense (bool B)
void en_spreadCycle (bool B)
void shaft (bool B)
void index_otpw (bool B)
void index_step (bool B)
void pdn_disable (bool B)
void mstep_reg_select (bool B)
void multistep_filt (bool B)
uint32_t GCONF ()
bool I_scale_analog ()
bool internal_Rsense ()
bool en_spreadCycle ()
bool shaft ()
bool index_otpw ()
bool index_step ()
bool pdn_disable ()
bool mstep_reg_select ()
bool multistep_filt ()
uint8_t IFCNT ()
void SLAVECONF (uint16_t input)
uint16_t SLAVECONF ()
void senddelay (uint8_t B)
uint8_t senddelay ()
void OTP_PROG (uint16_t input)
uint32_t OTP_READ ()
uint32_t IOIN ()
bool enn ()
bool ms1 ()
bool ms2 ()
bool diag ()
bool pdn_uart ()
bool step ()
bool sel_a ()
bool dir ()
uint8_t version ()
void FACTORY_CONF (uint16_t input)
uint16_t FACTORY_CONF ()
void fclktrim (uint8_t B)
void ottrim (uint8_t B)
uint8_t fclktrim ()
uint8_t ottrim ()
void VACTUAL (uint32_t input)
uint32_t VACTUAL ()
void CHOPCONF (uint32_t input)
void toff (uint8_t B)
void hstrt (uint8_t B)
void hend (uint8_t B)
void tbl (uint8_t B)
void vsense (bool B)
void mres (uint8_t B)
void intpol (bool B)
void dedge (bool B)
void diss2g (bool B)
void diss2vs (bool B)
uint32_t CHOPCONF ()
uint8_t toff ()
uint8_t hstrt ()
uint8_t hend ()
uint8_t tbl ()
bool vsense ()
uint8_t mres ()
bool intpol ()
bool dedge ()
bool diss2g ()
bool diss2vs ()
uint32_t DRV_STATUS ()
bool otpw ()
bool ot ()
bool s2ga ()
bool s2gb ()
bool s2vsa ()
bool s2vsb ()
bool ola ()
bool olb ()
bool t120 ()
bool t143 ()
bool t150 ()
bool t157 ()
uint16_t cs_actual ()
bool stealth ()
bool stst ()
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 ()
int16_t pwm_scale_auto ()
uint32_t PWM_AUTO ()
uint8_t pwm_ofs_auto ()
uint8_t pwm_grad_auto ()
uint32_t MSCURACT ()
int16_t cur_a ()
int16_t cur_b ()
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 ()

Protected Member Functions

 INIT_REGISTER (TCOOLTHRS)
 INIT2209_REGISTER (SGTHRS)
 INIT2209_REGISTER (COOLCONF)
Protected Member Functions inherited from TMC2208Stepper
 INIT2208_REGISTER (GCONF)
 INIT_REGISTER (SLAVECONF)
 INIT_REGISTER (FACTORY_CONF)
 INIT2208_REGISTER (VACTUAL)
 INIT2208_REGISTER (CHOPCONF)
 INIT2208_REGISTER (PWMCONF)
 TMC2208Stepper (Stream *SerialPort, float RS, uint8_t addr)
int available ()
void preWriteCommunication ()
void preReadCommunication ()
int16_t serial_read ()
uint8_t serial_write (const uint8_t data)
void postWriteCommunication ()
void postReadCommunication ()
void write (uint8_t, uint32_t)
uint32_t read (uint8_t)
uint8_t calcCRC (uint8_t datagram[], uint8_t len)
uint64_t _sendDatagram (uint8_t[], const uint8_t, uint16_t)
Protected Member Functions inherited from TMCStepper
 TMCStepper (float RS)
virtual ~TMCStepper ()=default
 INIT_REGISTER (IHOLD_IRUN)
 INIT_REGISTER (TPOWERDOWN)
 INIT_REGISTER (TPWMTHRS)

Additional Inherited Members

Public Attributes inherited from TMC2208Stepper
uint16_t bytesWritten = 0
float Rsense = 0.11
bool CRCerror = false
Protected Attributes inherited from TMC2208Stepper
StreamHWSerial = nullptr
SSwitchsswitch = nullptr
const uint8_t slave_address
Protected Attributes inherited from TMCStepper
const float Rsense
float holdMultiplier = 0.5
Static Protected Attributes inherited from TMC2208Stepper
static constexpr uint8_t TMC2208_SYNC = 0x05
static constexpr uint8_t TMC2208_SLAVE_ADDR = 0x00
static constexpr uint8_t replyDelay = 2
static constexpr uint8_t abort_window = 8
static constexpr uint8_t max_retries = 2
Static Protected Attributes inherited from TMCStepper
static constexpr uint8_t TMC_READ = 0x00
static constexpr uint8_t TMC_WRITE = 0x80

Detailed Description

Definition at line 11 of file TMC2209Stepper.h.

Constructor & Destructor Documentation

◆ TMC2209Stepper() [1/2]

TMC2209Stepper::TMC2209Stepper ( Stream * SerialPort,
float RS,
uint8_t addr )
inline

Definition at line 13 of file TMC2209Stepper.h.

Here is the call graph for this function:

◆ TMC2209Stepper() [2/2]

TMC2209Stepper::TMC2209Stepper ( uint16_t ,
uint16_t ,
float ,
uint8_t  )
delete

Member Function Documentation

◆ COOLCONF() [1/2]

uint16_t TMC2209Stepper::COOLCONF ( )

Definition at line 46 of file COOLCONF.cpp.

Here is the caller graph for this function:

◆ COOLCONF() [2/2]

void TMC2209Stepper::COOLCONF ( uint16_t B)

Definition at line 47 of file COOLCONF.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ diag()

bool TMC2209Stepper::diag ( )

Definition at line 64 of file IOIN.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dir()

bool TMC2209Stepper::dir ( )

Definition at line 68 of file IOIN.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enn()

bool TMC2209Stepper::enn ( )

Definition at line 61 of file IOIN.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ INIT2209_REGISTER() [1/2]

TMC2209Stepper::INIT2209_REGISTER ( COOLCONF )
protected
Here is the call graph for this function:

◆ INIT2209_REGISTER() [2/2]

TMC2209Stepper::INIT2209_REGISTER ( SGTHRS )
protected
Here is the call graph for this function:

◆ INIT_REGISTER()

TMC2209Stepper::INIT_REGISTER ( TCOOLTHRS )
protected
Here is the call graph for this function:

◆ IOIN()

uint32_t TMC2209Stepper::IOIN ( )

Definition at line 60 of file IOIN.cpp.

Here is the call graph for this function:

◆ ms1()

bool TMC2209Stepper::ms1 ( )

Definition at line 62 of file IOIN.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ms2()

bool TMC2209Stepper::ms2 ( )

Definition at line 63 of file IOIN.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pdn_uart()

bool TMC2209Stepper::pdn_uart ( )

Definition at line 65 of file IOIN.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ push()

void TMC2209Stepper::push ( )

TMCStepper library by @teemuatlut TMC2209Stepper.cpp Implementing methods for TMC2209 (TMC2224)

Definition at line 8 of file TMC2209Stepper.cpp.

Here is the call graph for this function:

◆ sedn() [1/2]

uint8_t TMC2209Stepper::sedn ( )

Definition at line 61 of file COOLCONF.cpp.

Here is the call graph for this function:

◆ sedn() [2/2]

void TMC2209Stepper::sedn ( uint8_t B)

Definition at line 55 of file COOLCONF.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ seimin() [1/2]

bool TMC2209Stepper::seimin ( )

Definition at line 62 of file COOLCONF.cpp.

Here is the call graph for this function:

◆ seimin() [2/2]

void TMC2209Stepper::seimin ( bool B)

Definition at line 56 of file COOLCONF.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ semax() [1/2]

uint8_t TMC2209Stepper::semax ( )

Definition at line 60 of file COOLCONF.cpp.

Here is the call graph for this function:

◆ semax() [2/2]

void TMC2209Stepper::semax ( uint8_t B)

Definition at line 54 of file COOLCONF.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ semin() [1/2]

uint8_t TMC2209Stepper::semin ( )

Definition at line 58 of file COOLCONF.cpp.

Here is the call graph for this function:

◆ semin() [2/2]

void TMC2209Stepper::semin ( uint8_t B)

Definition at line 52 of file COOLCONF.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ seup() [1/2]

uint8_t TMC2209Stepper::seup ( )

Definition at line 59 of file COOLCONF.cpp.

Here is the call graph for this function:

◆ seup() [2/2]

void TMC2209Stepper::seup ( uint8_t B)

Definition at line 53 of file COOLCONF.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SG_RESULT()

uint16_t TMC2209Stepper::SG_RESULT ( )

Definition at line 35 of file TMC2209Stepper.cpp.

Here is the call graph for this function:

◆ SGTHRS() [1/2]

uint8_t TMC2209Stepper::SGTHRS ( )

Definition at line 22 of file TMC2209Stepper.cpp.

Here is the caller graph for this function:

◆ SGTHRS() [2/2]

void TMC2209Stepper::SGTHRS ( uint8_t B)

Definition at line 23 of file TMC2209Stepper.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ spread_en()

bool TMC2209Stepper::spread_en ( )

Definition at line 67 of file IOIN.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ step()

bool TMC2209Stepper::step ( )

Definition at line 66 of file IOIN.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TCOOLTHRS() [1/2]

uint32_t TMC2209Stepper::TCOOLTHRS ( )

Definition at line 29 of file TMC2209Stepper.cpp.

Here is the caller graph for this function:

◆ TCOOLTHRS() [2/2]

void TMC2209Stepper::TCOOLTHRS ( uint32_t input)

Definition at line 30 of file TMC2209Stepper.cpp.

Here is the call graph for this function:

◆ version()

uint8_t TMC2209Stepper::version ( )

Definition at line 69 of file IOIN.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

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