|
TMCStepper
Library supporting Trinamic Stepper Drivers for Arduino platforms
|
TMC2240 36V 2.1A RMS stepper driver with integrated current sensing (SPI). More...
#include <TMC2240Stepper.h>
Classes | |
| struct | IFCNT_t |
| struct | TSTEP_t |
| struct | MSCNT_t |
Public Member Functions | |
| TMC2240Stepper (uint16_t pinCS, int8_t link_index=-1) | |
| TMC2240Stepper (uint16_t pinCS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK, int8_t link_index=-1) | |
| void | begin () |
| void | defaults () |
| void | setSPISpeed (uint32_t speed) |
| void | switchCSpin (bool state) |
| bool | isEnabled () |
| void | push () |
| void | GCONF (uint32_t input) |
| void | fast_standstill (bool B) |
| void | en_pwm_mode (bool B) |
| void | multistep_filt (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 | diag0_pushpull (bool B) |
| void | diag1_pushpull (bool B) |
| void | small_hysteresis (bool B) |
| void | stop_enable (bool B) |
| void | direct_mode (bool B) |
| uint32_t | GCONF () |
| bool | fast_standstill () |
| bool | en_pwm_mode () |
| bool | multistep_filt () |
| bool | shaft () |
| bool | diag0_error () |
| bool | diag0_otpw () |
| bool | diag0_stall () |
| bool | diag1_stall () |
| bool | diag1_index () |
| bool | diag1_onstate () |
| bool | diag0_pushpull () |
| bool | diag1_pushpull () |
| bool | small_hysteresis () |
| bool | stop_enable () |
| bool | direct_mode () |
| void | GSTAT (uint8_t input) |
| uint8_t | GSTAT () |
| bool | reset () |
| bool | drv_err () |
| bool | uv_cp () |
| bool | register_reset () |
| bool | vm_uvlo () |
| uint8_t | IFCNT () |
| void | NODECONF (uint16_t input) |
| uint16_t | NODECONF () |
| uint16_t | SLAVECONF () |
| void | SLAVECONF (uint16_t input) |
| void | senddelay (uint8_t B) |
| uint8_t | senddelay () |
| void | nodeaddr (uint8_t B) |
| uint8_t | nodeaddr () |
| void | slaveaddr (uint8_t B) |
| uint8_t | slaveaddr () |
| uint32_t | IOIN () |
| bool | step () |
| bool | dir () |
| bool | encb () |
| bool | enca () |
| bool | drv_enn () |
| bool | encn () |
| bool | uart_en () |
| bool | comp_a () |
| bool | comp_b () |
| bool | comp_a1_a2 () |
| bool | comp_b1_b2 () |
| bool | output () |
| bool | ext_res_det () |
| bool | ext_clk () |
| bool | adc_err () |
| uint8_t | silicon_rv () |
| uint8_t | version () |
| void | DRV_CONF (uint32_t input) |
| void | current_range (uint8_t) |
| uint8_t | current_range () |
| void | slope_control (uint8_t) |
| uint8_t | slope_control () |
| uint32_t | DRV_CONF () |
| void | GLOBAL_SCALER (uint8_t input) |
| uint8_t | GLOBAL_SCALER () |
| 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) |
| void | irundelay (uint8_t B) |
| uint8_t | ihold () |
| uint8_t | irun () |
| uint8_t | iholddelay () |
| uint8_t | irundelay () |
| uint32_t | TCOOLTHRS () |
| void | TCOOLTHRS (uint32_t input) |
| uint32_t | THIGH () |
| void | THIGH (uint32_t input) |
| void | CHOPCONF (uint32_t input) |
| void | toff (uint8_t B) |
| void | hstrt (uint8_t B) |
| void | hend (uint8_t B) |
| void | fd3 (bool B) |
| void | disfdcc (bool B) |
| void | chm (bool B) |
| void | TBL (uint8_t B) |
| void | vhighfs (bool B) |
| void | vhighchm (bool B) |
| void | tpfd (uint8_t 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 () |
| bool | fd3 () |
| bool | disfdcc () |
| bool | chm () |
| uint8_t | TBL () |
| bool | vhighfs () |
| bool | vhighchm () |
| uint8_t | tpfd () |
| uint8_t | mres () |
| bool | intpol () |
| bool | dedge () |
| bool | diss2g () |
| bool | diss2vs () |
| void | COOLCONF (uint32_t B) |
| 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 | 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_meas_sd_enable (bool B) |
| void | pwm_dis_reg_stst (bool 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 () |
| bool | pwm_meas_sd_enable () |
| bool | pwm_dis_reg_stst () |
| 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 () |
| uint32_t | DRV_STATUS () |
| uint32_t | SG_RESULT () |
| bool | s2vsa () |
| bool | s2vsb () |
| bool | stealth () |
| bool | fsactive () |
| uint16_t | CS_ACTUAL () |
| bool | stallguard () |
| bool | ot () |
| bool | otpw () |
| bool | s2ga () |
| bool | s2gb () |
| bool | ola () |
| bool | olb () |
| bool | stst () |
| void | microsteps (uint16_t ms) |
| uint16_t | microsteps () |
| uint8_t | test_connection () |
| uint16_t | MSCNT () |
| 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 | hysteresis_end (int8_t value) |
| int8_t | hysteresis_end () |
| void | hysteresis_start (uint8_t value) |
| uint8_t | hysteresis_start () |
| uint8_t | TPOWERDOWN () |
| void | TPOWERDOWN (uint8_t input) |
| uint32_t | TPWMTHRS () |
| void | TPWMTHRS (uint32_t input) |
| uint32_t | TSTEP () |
| uint32_t | SG4_THRS () |
| void | SG4_THRS (uint32_t input) |
| uint8_t | sg4_thrs () |
| void | sg4_thrs (uint8_t B) |
| bool | sg4_filt_en () |
| void | sg4_filt_en (bool B) |
| uint8_t | sg4_angle_offset () |
| void | sg4_angle_offset (uint8_t B) |
| uint32_t | SG4_RESULT () |
| uint16_t | sg4_result () |
| uint32_t | ADC_VSUPPLY_AIN () |
| uint32_t | ADC_TEMP () |
| uint32_t | OTW_OV_VTH () |
| void | OTW_OV_VTH (uint32_t input) |
| float | get_ain_voltage () |
| float | get_vsupply_voltage () |
| float | get_chip_temperature () |
| float | get_overtemp_prewarn_celsius () |
| void | set_overtemp_prewarn_celsius (float tempC) |
| float | get_overvoltage_threshold_voltage () |
| void | set_overvoltage_threshold_voltage (float volts) |
Public Attributes | |
| uint32_t | Rref = 12000 |
| uint16_t | bytesWritten = 0 |
| bool | CRCerror = false |
| uint8_t | status_response |
Protected Member Functions | |
| INIT2240_REGISTER (GCONF) | |
| INIT2240_REGISTER (GSTAT) | |
| INIT2240_REGISTER (NODECONF) | |
| INIT2240_REGISTER (DRV_CONF) | |
| INIT2240_REGISTER (GLOBAL_SCALER) | |
| INIT2240_REGISTER (IHOLD_IRUN) | |
| INIT2240_REGISTER (TPOWERDOWN) | |
| INIT2240_REGISTER (TPWMTHRS) | |
| INIT2240_REGISTER (TCOOLTHRS) | |
| INIT2240_REGISTER (THIGH) | |
| INIT2240_REGISTER (CHOPCONF) | |
| INIT2240_REGISTER (COOLCONF) | |
| INIT2240_REGISTER (PWMCONF) | |
| INIT2240_REGISTER (SG4_THRS) | |
| INIT2240_REGISTER (OTW_OV_VTH) | |
| float | calc_IFS_current_RMS () |
| uint32_t | set_globalscaler (float current, float IFS_current_RMS) |
| 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) |
| uint64_t | _sendDatagram (uint8_t[], const uint8_t, uint16_t) |
Protected Attributes | |
| SSwitch * | sswitch = nullptr |
| float | holdMultiplier = 0.5 |
| const uint16_t | _pinCS |
| SW_SPIClass * | TMC_SW_SPI = nullptr |
| int8_t | link_index |
Static Protected Attributes | |
| static constexpr uint8_t | TMC_READ = 0x00 |
| static constexpr uint8_t | TMC_WRITE = 0x80 |
| static constexpr uint8_t | TMC2240_SYNC = 0x05 |
| static constexpr uint8_t | replyDelay = 2 |
| static constexpr uint8_t | abort_window = 5 |
| static constexpr uint8_t | max_retries = 2 |
| static uint32_t | spi_speed = 16000000/8 |
| static constexpr float | default_RS = 0.11 |
| static int8_t | chain_length = 0 |
TMC2240 36V 2.1A RMS stepper driver with integrated current sensing (SPI).
The TMC2240 chip has SPI and single-wire UART interfaces, selected by its UART_EN pin. This class implements SPI only (40-bit datagrams, SPI mode 3), with optional daisy-chaining. UART is not implemented yet because no UART hardware has been available for testing. examples/TMC2240_UART shows the intended usage and is untested. Driver modules ship configured for SPI, for example:
There are no sense resistors. The full-scale current is set by the resistor on the IREF pin (Rref, 12k-60kΩ) and DRV_CONF.current_range: I_FS(peak) = K_IFS / Rref, where K_IFS = 11.75, 24, 36, 36 A·kΩ for current_range 0-3 (1A, 2A, 3A, 3A at 12kΩ).
Motion comes from the STEP/DIR inputs. There is no internal ramp generator or VACTUAL.
StallGuard4 (SG4_THRS, SG4_RESULT) works with StealthChop2. StallGuard2 (COOLCONF.sgt, SG_RESULT) works with SpreadCycle. DRV_STATUS.stallguard reports a stall from either one.
Reference: Analog Devices TMC2240 datasheet, Rev 2 (11/23)
Definition at line 36 of file TMC2240Stepper.h.
| TMC2240Stepper::TMC2240Stepper | ( | uint16_t | pinCS, |
| int8_t | link_index = -1 ) |
| TMC2240Stepper::TMC2240Stepper | ( | uint16_t | pinCS, |
| uint16_t | pinMOSI, | ||
| uint16_t | pinMISO, | ||
| uint16_t | pinSCK, | ||
| int8_t | link_index = -1 ) |
|
protected |
| bool TMC2240Stepper::adc_err | ( | ) |
| uint32_t TMC2240Stepper::ADC_TEMP | ( | ) |
Definition at line 440 of file TMC2240Stepper.cpp.
| uint32_t TMC2240Stepper::ADC_VSUPPLY_AIN | ( | ) |
Definition at line 435 of file TMC2240Stepper.cpp.
| void TMC2240Stepper::begin | ( | ) |
|
protected |
|
protected |
| bool TMC2240Stepper::chm | ( | ) |
| void TMC2240Stepper::chm | ( | bool | B | ) |
Definition at line 112 of file CHOPCONF.cpp.
| uint32_t TMC2240Stepper::CHOPCONF | ( | ) |
Definition at line 102 of file CHOPCONF.cpp.
| void TMC2240Stepper::CHOPCONF | ( | uint32_t | input | ) |
Definition at line 103 of file CHOPCONF.cpp.
| bool TMC2240Stepper::comp_a | ( | ) |
| bool TMC2240Stepper::comp_a1_a2 | ( | ) |
| bool TMC2240Stepper::comp_b | ( | ) |
| bool TMC2240Stepper::comp_b1_b2 | ( | ) |
| uint32_t TMC2240Stepper::COOLCONF | ( | ) |
| void TMC2240Stepper::COOLCONF | ( | uint32_t | B | ) |
| uint16_t TMC2240Stepper::cs2rms | ( | uint8_t | CS | ) |
0:1A 1:2A 2:3A 3:3A ('rref', 12000, minval=12000, maxval=60000)
Definition at line 282 of file TMC2240Stepper.cpp.
| uint16_t TMC2240Stepper::CS_ACTUAL | ( | ) |
Definition at line 63 of file DRV_STATUS.cpp.
| int16_t TMC2240Stepper::cur_a | ( | ) |
| int16_t TMC2240Stepper::cur_b | ( | ) |
| uint8_t TMC2240Stepper::current_range | ( | ) |
| void TMC2240Stepper::current_range | ( | uint8_t | B | ) |
Definition at line 43 of file DRV_CONF.cpp.
| bool TMC2240Stepper::dedge | ( | ) |
| void TMC2240Stepper::dedge | ( | bool | B | ) |
Definition at line 119 of file CHOPCONF.cpp.
| void TMC2240Stepper::defaults | ( | ) |
| bool TMC2240Stepper::diag0_error | ( | ) |
| void TMC2240Stepper::diag0_error | ( | bool | B | ) |
| bool TMC2240Stepper::diag0_otpw | ( | ) |
| void TMC2240Stepper::diag0_otpw | ( | bool | B | ) |
| bool TMC2240Stepper::diag0_pushpull | ( | ) |
| void TMC2240Stepper::diag0_pushpull | ( | bool | B | ) |
| bool TMC2240Stepper::diag0_stall | ( | ) |
| void TMC2240Stepper::diag0_stall | ( | bool | B | ) |
| bool TMC2240Stepper::diag1_index | ( | ) |
| void TMC2240Stepper::diag1_index | ( | bool | B | ) |
| bool TMC2240Stepper::diag1_onstate | ( | ) |
| void TMC2240Stepper::diag1_onstate | ( | bool | B | ) |
| bool TMC2240Stepper::diag1_pushpull | ( | ) |
| void TMC2240Stepper::diag1_pushpull | ( | bool | B | ) |
| bool TMC2240Stepper::diag1_stall | ( | ) |
| void TMC2240Stepper::diag1_stall | ( | bool | B | ) |
| bool TMC2240Stepper::dir | ( | ) |
| bool TMC2240Stepper::direct_mode | ( | ) |
| void TMC2240Stepper::direct_mode | ( | bool | B | ) |
| bool TMC2240Stepper::disfdcc | ( | ) |
| void TMC2240Stepper::disfdcc | ( | bool | B | ) |
Definition at line 111 of file CHOPCONF.cpp.
| bool TMC2240Stepper::diss2g | ( | ) |
| void TMC2240Stepper::diss2g | ( | bool | B | ) |
Definition at line 120 of file CHOPCONF.cpp.
| bool TMC2240Stepper::diss2vs | ( | ) |
| void TMC2240Stepper::diss2vs | ( | bool | B | ) |
Definition at line 121 of file CHOPCONF.cpp.
| uint32_t TMC2240Stepper::DRV_CONF | ( | ) |
| void TMC2240Stepper::DRV_CONF | ( | uint32_t | input | ) |
Definition at line 38 of file DRV_CONF.cpp.
| bool TMC2240Stepper::drv_enn | ( | ) |
| bool TMC2240Stepper::drv_err | ( | ) |
| uint32_t TMC2240Stepper::DRV_STATUS | ( | ) |
Definition at line 55 of file DRV_STATUS.cpp.
| bool TMC2240Stepper::en_pwm_mode | ( | ) |
| void TMC2240Stepper::en_pwm_mode | ( | bool | B | ) |
| bool TMC2240Stepper::enca | ( | ) |
| bool TMC2240Stepper::encb | ( | ) |
| bool TMC2240Stepper::encn | ( | ) |
|
protected |
| bool TMC2240Stepper::ext_clk | ( | ) |
| bool TMC2240Stepper::ext_res_det | ( | ) |
| bool TMC2240Stepper::fast_standstill | ( | ) |
| void TMC2240Stepper::fast_standstill | ( | bool | B | ) |
| bool TMC2240Stepper::fd3 | ( | ) |
| void TMC2240Stepper::fd3 | ( | bool | B | ) |
Definition at line 110 of file CHOPCONF.cpp.
| uint8_t TMC2240Stepper::freewheel | ( | ) |
| void TMC2240Stepper::freewheel | ( | uint8_t | B | ) |
Definition at line 113 of file PWMCONF.cpp.
| bool TMC2240Stepper::fsactive | ( | ) |
Definition at line 62 of file DRV_STATUS.cpp.
| uint32_t TMC2240Stepper::GCONF | ( | ) |
| void TMC2240Stepper::GCONF | ( | uint32_t | input | ) |
| float TMC2240Stepper::get_ain_voltage | ( | ) |
| float TMC2240Stepper::get_chip_temperature | ( | ) |
| float TMC2240Stepper::get_overtemp_prewarn_celsius | ( | ) |
| float TMC2240Stepper::get_overvoltage_threshold_voltage | ( | ) |
| float TMC2240Stepper::get_vsupply_voltage | ( | ) |
| uint8_t TMC2240Stepper::GLOBAL_SCALER | ( | ) |
| void TMC2240Stepper::GLOBAL_SCALER | ( | uint8_t | input | ) |
Definition at line 24 of file GLOBAL_SCALER.cpp.
| uint8_t TMC2240Stepper::GSTAT | ( | ) |
Definition at line 355 of file TMC2240Stepper.cpp.
| void TMC2240Stepper::GSTAT | ( | uint8_t | input | ) |
Definition at line 356 of file TMC2240Stepper.cpp.
| uint8_t TMC2240Stepper::hend | ( | ) |
Definition at line 125 of file CHOPCONF.cpp.
| void TMC2240Stepper::hend | ( | uint8_t | B | ) |
Definition at line 109 of file CHOPCONF.cpp.
| uint8_t TMC2240Stepper::hstrt | ( | ) |
Definition at line 124 of file CHOPCONF.cpp.
| void TMC2240Stepper::hstrt | ( | uint8_t | B | ) |
Definition at line 108 of file CHOPCONF.cpp.
| int8_t TMC2240Stepper::hysteresis_end | ( | ) |
| void TMC2240Stepper::hysteresis_end | ( | int8_t | value | ) |
| uint8_t TMC2240Stepper::hysteresis_start | ( | ) |
| void TMC2240Stepper::hysteresis_start | ( | uint8_t | value | ) |
| uint8_t TMC2240Stepper::IFCNT | ( | ) |
| uint8_t TMC2240Stepper::ihold | ( | ) |
Definition at line 45 of file IHOLD_IRUN.cpp.
| void TMC2240Stepper::ihold | ( | uint8_t | B | ) |
Definition at line 40 of file IHOLD_IRUN.cpp.
| uint32_t TMC2240Stepper::IHOLD_IRUN | ( | ) |
| void TMC2240Stepper::IHOLD_IRUN | ( | uint32_t | input | ) |
Definition at line 35 of file IHOLD_IRUN.cpp.
| uint8_t TMC2240Stepper::iholddelay | ( | ) |
| void TMC2240Stepper::iholddelay | ( | uint8_t | B | ) |
Definition at line 42 of file IHOLD_IRUN.cpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| bool TMC2240Stepper::intpol | ( | ) |
| void TMC2240Stepper::intpol | ( | bool | B | ) |
Definition at line 118 of file CHOPCONF.cpp.
| uint32_t TMC2240Stepper::IOIN | ( | ) |
| uint8_t TMC2240Stepper::irun | ( | ) |
Definition at line 46 of file IHOLD_IRUN.cpp.
| void TMC2240Stepper::irun | ( | uint8_t | B | ) |
Definition at line 41 of file IHOLD_IRUN.cpp.
| uint8_t TMC2240Stepper::irundelay | ( | ) |
| void TMC2240Stepper::irundelay | ( | uint8_t | B | ) |
Definition at line 43 of file IHOLD_IRUN.cpp.
| bool TMC2240Stepper::isEnabled | ( | ) |
| uint16_t TMC2240Stepper::microsteps | ( | ) |
| void TMC2240Stepper::microsteps | ( | uint16_t | ms | ) |
| uint8_t TMC2240Stepper::mres | ( | ) |
Definition at line 133 of file CHOPCONF.cpp.
| void TMC2240Stepper::mres | ( | uint8_t | B | ) |
Definition at line 117 of file CHOPCONF.cpp.
| uint16_t TMC2240Stepper::MSCNT | ( | ) |
| uint32_t TMC2240Stepper::MSCURACT | ( | ) |
Definition at line 509 of file TMC2240Stepper.cpp.
| bool TMC2240Stepper::multistep_filt | ( | ) |
| void TMC2240Stepper::multistep_filt | ( | bool | B | ) |
| uint8_t TMC2240Stepper::nodeaddr | ( | ) |
Definition at line 35 of file SLAVECONF.cpp.
| void TMC2240Stepper::nodeaddr | ( | uint8_t | B | ) |
Definition at line 36 of file SLAVECONF.cpp.
| uint16_t TMC2240Stepper::NODECONF | ( | ) |
| void TMC2240Stepper::NODECONF | ( | uint16_t | input | ) |
Definition at line 31 of file SLAVECONF.cpp.
| bool TMC2240Stepper::ola | ( | ) |
Definition at line 69 of file DRV_STATUS.cpp.
| bool TMC2240Stepper::olb | ( | ) |
Definition at line 70 of file DRV_STATUS.cpp.
| bool TMC2240Stepper::ot | ( | ) |
Definition at line 65 of file DRV_STATUS.cpp.
| bool TMC2240Stepper::otpw | ( | ) |
Definition at line 66 of file DRV_STATUS.cpp.
| uint32_t TMC2240Stepper::OTW_OV_VTH | ( | ) |
Definition at line 445 of file TMC2240Stepper.cpp.
| void TMC2240Stepper::OTW_OV_VTH | ( | uint32_t | input | ) |
| bool TMC2240Stepper::output | ( | ) |
| void TMC2240Stepper::push | ( | ) |
| uint32_t TMC2240Stepper::PWM_AUTO | ( | ) |
Definition at line 249 of file TMC2240Stepper.cpp.
| bool TMC2240Stepper::pwm_autograd | ( | ) |
| void TMC2240Stepper::pwm_autograd | ( | bool | B | ) |
Definition at line 112 of file PWMCONF.cpp.
| bool TMC2240Stepper::pwm_autoscale | ( | ) |
| void TMC2240Stepper::pwm_autoscale | ( | bool | B | ) |
Definition at line 111 of file PWMCONF.cpp.
| bool TMC2240Stepper::pwm_dis_reg_stst | ( | ) |
| void TMC2240Stepper::pwm_dis_reg_stst | ( | bool | B | ) |
| uint8_t TMC2240Stepper::pwm_freq | ( | ) |
| void TMC2240Stepper::pwm_freq | ( | uint8_t | B | ) |
Definition at line 110 of file PWMCONF.cpp.
| uint8_t TMC2240Stepper::pwm_grad | ( | ) |
| void TMC2240Stepper::pwm_grad | ( | uint8_t | B | ) |
Definition at line 109 of file PWMCONF.cpp.
| uint8_t TMC2240Stepper::pwm_grad_auto | ( | ) |
| uint8_t TMC2240Stepper::pwm_lim | ( | ) |
| void TMC2240Stepper::pwm_lim | ( | uint8_t | B | ) |
Definition at line 117 of file PWMCONF.cpp.
| bool TMC2240Stepper::pwm_meas_sd_enable | ( | ) |
| void TMC2240Stepper::pwm_meas_sd_enable | ( | bool | B | ) |
| uint8_t TMC2240Stepper::pwm_ofs | ( | ) |
| void TMC2240Stepper::pwm_ofs | ( | uint8_t | B | ) |
Definition at line 108 of file PWMCONF.cpp.
| uint8_t TMC2240Stepper::pwm_ofs_auto | ( | ) |
| uint8_t TMC2240Stepper::pwm_reg | ( | ) |
| void TMC2240Stepper::pwm_reg | ( | uint8_t | B | ) |
Definition at line 116 of file PWMCONF.cpp.
| uint32_t TMC2240Stepper::PWM_SCALE | ( | ) |
Definition at line 226 of file TMC2240Stepper.cpp.
| int16_t TMC2240Stepper::pwm_scale_auto | ( | ) |
| uint8_t TMC2240Stepper::pwm_scale_sum | ( | ) |
| uint32_t TMC2240Stepper::PWMCONF | ( | ) |
| void TMC2240Stepper::PWMCONF | ( | uint32_t | input | ) |
Definition at line 103 of file PWMCONF.cpp.
|
protected |
| bool TMC2240Stepper::register_reset | ( | ) |
| bool TMC2240Stepper::reset | ( | ) |
| uint16_t TMC2240Stepper::rms_current | ( | ) |
Definition at line 320 of file TMC2240Stepper.cpp.
| void TMC2240Stepper::rms_current | ( | uint16_t | mA | ) |
| void TMC2240Stepper::rms_current | ( | uint16_t | mA, |
| float | mult ) |
| bool TMC2240Stepper::s2ga | ( | ) |
Definition at line 67 of file DRV_STATUS.cpp.
| bool TMC2240Stepper::s2gb | ( | ) |
Definition at line 68 of file DRV_STATUS.cpp.
| bool TMC2240Stepper::s2vsa | ( | ) |
Definition at line 59 of file DRV_STATUS.cpp.
| bool TMC2240Stepper::s2vsb | ( | ) |
Definition at line 60 of file DRV_STATUS.cpp.
| uint8_t TMC2240Stepper::sedn | ( | ) |
| void TMC2240Stepper::sedn | ( | uint8_t | B | ) |
| bool TMC2240Stepper::seimin | ( | ) |
| void TMC2240Stepper::seimin | ( | bool | B | ) |
| uint8_t TMC2240Stepper::semax | ( | ) |
| void TMC2240Stepper::semax | ( | uint8_t | B | ) |
| uint8_t TMC2240Stepper::semin | ( | ) |
| void TMC2240Stepper::semin | ( | uint8_t | B | ) |
| uint8_t TMC2240Stepper::senddelay | ( | ) |
| void TMC2240Stepper::senddelay | ( | uint8_t | B | ) |
Definition at line 38 of file SLAVECONF.cpp.
|
protected |
Definition at line 294 of file TMC2240Stepper.cpp.
| void TMC2240Stepper::set_overtemp_prewarn_celsius | ( | float | tempC | ) |
| void TMC2240Stepper::set_overvoltage_threshold_voltage | ( | float | volts | ) |
| void TMC2240Stepper::setSPISpeed | ( | uint32_t | speed | ) |
| uint8_t TMC2240Stepper::seup | ( | ) |
| void TMC2240Stepper::seup | ( | uint8_t | B | ) |
| bool TMC2240Stepper::sfilt | ( | ) |
| void TMC2240Stepper::sfilt | ( | bool | B | ) |
| uint8_t TMC2240Stepper::sg4_angle_offset | ( | ) |
SG4_THRS[9] sg_angle_offset 1: Use SG4_RESULT to compensate for the phase jump when switching between StealthChop2 and SpreadCycle.
Definition at line 424 of file TMC2240Stepper.cpp.
| void TMC2240Stepper::sg4_angle_offset | ( | uint8_t | B | ) |
| bool TMC2240Stepper::sg4_filt_en | ( | ) |
SG4_THRS[8] sg4_filt_en 0: SG4_RESULT updates with each fullstep. 1: SG4_RESULT is the average of the last four SG4_IND_x measurements.
Definition at line 419 of file TMC2240Stepper.cpp.
| void TMC2240Stepper::sg4_filt_en | ( | bool | B | ) |
| uint32_t TMC2240Stepper::SG4_RESULT | ( | ) |
R: SG4_RESULT (0x75) StallGuard4 load measurement sg4_result() returns 0-510. A lower value means a higher load.
Definition at line 431 of file TMC2240Stepper.cpp.
| uint16_t TMC2240Stepper::sg4_result | ( | ) |
| uint32_t TMC2240Stepper::SG4_THRS | ( | ) |
RW: SG4_THRS (0x74) StallGuard4 configuration
StallGuard4 works with StealthChop2 (en_pwm_mode = 1). The stall output (DIAG, DRV_STATUS.stallguard) is active when TCOOLTHRS >= TSTEP.
Definition at line 409 of file TMC2240Stepper.cpp.
| void TMC2240Stepper::SG4_THRS | ( | uint32_t | input | ) |
| uint8_t TMC2240Stepper::sg4_thrs | ( | ) |
SG4_THRS[7:0] StallGuard4 threshold (0-255). A stall is signaled when SG4_RESULT falls below this value, so a higher value is more sensitive.
Definition at line 414 of file TMC2240Stepper.cpp.
| void TMC2240Stepper::sg4_thrs | ( | uint8_t | B | ) |
| uint32_t TMC2240Stepper::SG_RESULT | ( | ) |
Definition at line 71 of file DRV_STATUS.cpp.
| int8_t TMC2240Stepper::sgt | ( | ) |
Definition at line 69 of file COOLCONF.cpp.
| void TMC2240Stepper::sgt | ( | int8_t | B | ) |
Definition at line 68 of file COOLCONF.cpp.
| bool TMC2240Stepper::shaft | ( | ) |
| void TMC2240Stepper::shaft | ( | bool | B | ) |
| uint8_t TMC2240Stepper::silicon_rv | ( | ) |
|
inline |
|
inline |
|
inline |
Definition at line 102 of file TMC2240Stepper.h.
|
inline |
| uint8_t TMC2240Stepper::slope_control | ( | ) |
| void TMC2240Stepper::slope_control | ( | uint8_t | B | ) |
Definition at line 44 of file DRV_CONF.cpp.
| bool TMC2240Stepper::small_hysteresis | ( | ) |
| void TMC2240Stepper::small_hysteresis | ( | bool | B | ) |
| bool TMC2240Stepper::stallguard | ( | ) |
Definition at line 64 of file DRV_STATUS.cpp.
| bool TMC2240Stepper::stealth | ( | ) |
Definition at line 61 of file DRV_STATUS.cpp.
| bool TMC2240Stepper::step | ( | ) |
| bool TMC2240Stepper::stop_enable | ( | ) |
| void TMC2240Stepper::stop_enable | ( | bool | B | ) |
| bool TMC2240Stepper::stst | ( | ) |
Definition at line 72 of file DRV_STATUS.cpp.
| void TMC2240Stepper::switchCSpin | ( | bool | state | ) |
| uint8_t TMC2240Stepper::TBL | ( | ) |
| void TMC2240Stepper::TBL | ( | uint8_t | B | ) |
Definition at line 113 of file CHOPCONF.cpp.
| uint32_t TMC2240Stepper::TCOOLTHRS | ( | ) |
| void TMC2240Stepper::TCOOLTHRS | ( | uint32_t | input | ) |
| uint8_t TMC2240Stepper::test_connection | ( | ) |
| uint32_t TMC2240Stepper::THIGH | ( | ) |
| void TMC2240Stepper::THIGH | ( | uint32_t | input | ) |
| uint8_t TMC2240Stepper::toff | ( | ) |
Definition at line 123 of file CHOPCONF.cpp.
| void TMC2240Stepper::toff | ( | uint8_t | B | ) |
Definition at line 107 of file CHOPCONF.cpp.
| uint8_t TMC2240Stepper::tpfd | ( | ) |
| void TMC2240Stepper::tpfd | ( | uint8_t | B | ) |
Definition at line 116 of file CHOPCONF.cpp.
| uint8_t TMC2240Stepper::TPOWERDOWN | ( | ) |
| void TMC2240Stepper::TPOWERDOWN | ( | uint8_t | input | ) |
| uint32_t TMC2240Stepper::TPWMTHRS | ( | ) |
| void TMC2240Stepper::TPWMTHRS | ( | uint32_t | input | ) |
|
protected |
|
protected |
| uint32_t TMC2240Stepper::TSTEP | ( | ) |
| bool TMC2240Stepper::uart_en | ( | ) |
| bool TMC2240Stepper::uv_cp | ( | ) |
| uint8_t TMC2240Stepper::version | ( | ) |
| bool TMC2240Stepper::vhighchm | ( | ) |
| void TMC2240Stepper::vhighchm | ( | bool | B | ) |
Definition at line 115 of file CHOPCONF.cpp.
| bool TMC2240Stepper::vhighfs | ( | ) |
| void TMC2240Stepper::vhighfs | ( | bool | B | ) |
Definition at line 114 of file CHOPCONF.cpp.
| bool TMC2240Stepper::vm_uvlo | ( | ) |
|
protected |
|
protected |
Definition at line 412 of file TMC2240Stepper.h.
|
staticconstexprprotected |
Definition at line 405 of file TMC2240Stepper.h.
| uint16_t TMC2240Stepper::bytesWritten = 0 |
Definition at line 270 of file TMC2240Stepper.h.
|
staticprotected |
TMCStepper library by @teemuatlut TMC2240Stepper.cpp
Definition at line 417 of file TMC2240Stepper.h.
| bool TMC2240Stepper::CRCerror = false |
Definition at line 271 of file TMC2240Stepper.h.
|
staticconstexprprotected |
Definition at line 414 of file TMC2240Stepper.h.
|
protected |
Definition at line 409 of file TMC2240Stepper.h.
|
protected |
Definition at line 416 of file TMC2240Stepper.h.
|
staticconstexprprotected |
Definition at line 406 of file TMC2240Stepper.h.
|
staticconstexprprotected |
Definition at line 404 of file TMC2240Stepper.h.
| uint32_t TMC2240Stepper::Rref = 12000 |
('rref', 12000, minval=12000, maxval=60000)
Definition at line 44 of file TMC2240Stepper.h.
|
staticprotected |
Definition at line 411 of file TMC2240Stepper.h.
|
protected |
Definition at line 401 of file TMC2240Stepper.h.
| uint8_t TMC2240Stepper::status_response |
Definition at line 353 of file TMC2240Stepper.h.
|
staticconstexprprotected |
Definition at line 403 of file TMC2240Stepper.h.
|
staticconstexprprotected |
Definition at line 399 of file TMC2240Stepper.h.
|
protected |
Definition at line 413 of file TMC2240Stepper.h.
|
staticprotected |
Definition at line 399 of file TMC2240Stepper.h.