|
constexpr uint32_t | PWMCONF_REG (uint32_t PWM_AMPL, uint32_t PWM_GRAD, uint32_t PWM_FREQ, uint32_t PWM_AUTO) |
| Helper function to set bit shifts in one line.
|
|
uint16_t | tmc2130_rd_TSTEP (uint8_t axis) |
|
uint16_t | tmc2130_rd_MSCNT (uint8_t axis) |
|
uint32_t | tmc2130_rd_MSCURACT (uint8_t axis) |
|
static void | tmc2130_tx (uint8_t axis, uint8_t addr, uint32_t wval) |
|
static uint8_t | tmc2130_rx (uint8_t axis, uint8_t addr, uint32_t *rval) |
|
uint16_t | __tcoolthrs (uint8_t axis) |
|
static void | tmc2130_XYZ_reg_init (uint8_t axis) |
|
void | tmc2130_init (TMCInitParams params) |
|
uint8_t | tmc2130_sample_diag () |
|
void | tmc2130_st_isr () |
|
void | crashdet_use_eeprom_setting () |
|
bool | tmc2130_update_sg () |
|
void | tmc2130_home_enter (uint8_t axes_mask) |
|
void | tmc2130_home_exit () |
|
void | tmc2130_sg_measure_start (uint8_t axis) |
|
uint16_t | tmc2130_sg_measure_stop () |
|
bool | tmc2130_wait_standstill_xy (int timeout) |
|
void | tmc2130_check_overtemp () |
|
static constexpr bool | getIntpolBit ([[maybe_unused]]const uint8_t axis, const uint8_t mres) |
| Helper function to determine the value of the CHOPCONF intpol flag.
|
|
static void | SetCurrents (const uint8_t axis, const MotorCurrents &curr) |
|
void | tmc2130_setup_chopper (uint8_t axis, uint8_t mres, const MotorCurrents *curr) |
|
void | tmc2130_print_currents () |
|
void | tmc2130_set_pwm_ampl (uint8_t axis, uint8_t pwm_ampl) |
|
void | tmc2130_set_pwm_grad (uint8_t axis, uint8_t pwm_grad) |
|
void | tmc2130_wr_MSLUTSTART (uint8_t axis, uint8_t start_sin, uint8_t start_sin90) |
|
void | tmc2130_wr_MSLUTSEL (uint8_t axis, uint8_t x1, uint8_t x2, uint8_t x3, uint8_t w0, uint8_t w1, uint8_t w2, uint8_t w3) |
|
void | tmc2130_wr_MSLUT (uint8_t axis, uint8_t i, uint32_t val) |
|
uint8_t | tmc2130_usteps2mres (uint16_t usteps) |
|
void | tmc2130_cs_low (uint8_t axis) |
|
void | tmc2130_cs_high (uint8_t axis) |
|
uint16_t | tmc2130_get_res (uint8_t axis) |
|
void | tmc2130_set_res (uint8_t axis, uint16_t res) |
|
uint8_t | tmc2130_get_pwr (uint8_t axis) |
|
void | tmc2130_set_pwr (uint8_t axis, uint8_t pwr) |
|
uint8_t | tmc2130_get_inv (uint8_t axis) |
|
uint8_t | tmc2130_get_dir (uint8_t axis) |
|
void | tmc2130_set_dir (uint8_t axis, uint8_t dir) |
|
void | tmc2130_do_step (uint8_t axis) |
|
void | tmc2130_do_steps (uint8_t axis, uint16_t steps, uint8_t dir, uint16_t delay_us) |
|
void | tmc2130_goto_step (uint8_t axis, uint8_t step, uint8_t dir, uint16_t delay_us, uint16_t microstep_resolution) |
|
void | tmc2130_get_wave (uint8_t axis, uint8_t *data) |
|
void | tmc2130_set_wave (uint8_t axis, uint8_t amp, uint8_t fac1000) |
|
void | bubblesort_uint8 (uint8_t *data, uint8_t size, uint8_t *data2) |
|
uint8_t | clusterize_uint8 (uint8_t *data, uint8_t size, uint8_t *ccnt, uint8_t *cval, uint8_t tol) |
|
bool | tmc2130_home_calibrate (uint8_t axis) |
|
uint8_t | tmc2130_cur2val (float cur) |
| Translate current to tmc2130 vsense and IHOLD or IRUN. More...
|
|
float | tmc2130_val2cur (uint8_t val) |
|
|
static constexpr uint8_t | default_dedge_bit = 1 |
|
uint8_t | tmc2130_mode = TMC2130_MODE_NORMAL |
|
static constexpr uint8_t | tmc2130_default_current_h [4] = TMC2130_CURRENTS_H |
|
static constexpr uint8_t | tmc2130_default_current_r [4] = TMC2130_CURRENTS_R |
|
static constexpr uint8_t | tmc2130_current_r_home [4] = TMC2130_CURRENTS_R_HOME |
|
static constexpr MotorCurrents homing_currents_P[NUM_AXIS] | PROGMEM |
|
MotorCurrents | currents [NUM_AXIS] |
|
static constexpr uint32_t | PWM_AMPL [NUM_AXIS] = {TMC2130_PWM_AMPL_X, TMC2130_PWM_AMPL_Y, TMC2130_PWM_AMPL_Z, TMC2130_PWM_AMPL_E} |
|
static constexpr uint32_t | PWM_GRAD [NUM_AXIS] = {TMC2130_PWM_GRAD_X, TMC2130_PWM_GRAD_Y, TMC2130_PWM_GRAD_Z, TMC2130_PWM_GRAD_E} |
|
static constexpr uint32_t | PWM_FREQ [NUM_AXIS] = {TMC2130_PWM_FREQ_X, TMC2130_PWM_FREQ_Y, TMC2130_PWM_FREQ_Z, TMC2130_PWM_FREQ_E} |
|
static constexpr uint32_t | PWM_AUTO [NUM_AXIS] = {TMC2130_PWM_AUTO_X, TMC2130_PWM_AUTO_Y, TMC2130_PWM_AUTO_Z, TMC2130_PWM_AUTO_E} |
|
static PWMConfU | pwmconf [NUM_AXIS] |
|
static constexpr PWMConfU | pwmconf_Ecool = PWMConfU(PWMCONF_REG(TMC2130_PWM_AMPL_Ecool, TMC2130_PWM_GRAD_Ecool, PWM_FREQ[E_AXIS], TMC2130_PWM_AUTO_Ecool)) |
|
uint8_t | tmc2130_mres [4] = {0, 0, 0, 0} |
|
uint8_t | tmc2130_sg_thr [4] = {TMC2130_SG_THRS_X, TMC2130_SG_THRS_Y, TMC2130_SG_THRS_Z, TMC2130_SG_THRS_E} |
|
static uint8_t | tmc2130_sg_thr_home [4] = TMC2130_SG_THRS_HOME |
|
uint8_t | tmc2130_sg_homing_axes_mask = 0x00 |
|
static uint8_t | tmc2130_sg_measure = 0xff |
|
static uint32_t | tmc2130_sg_measure_cnt = 0 |
|
static uint32_t | tmc2130_sg_measure_val = 0 |
|
uint8_t | tmc2130_home_enabled = 0 |
|
uint8_t | tmc2130_home_origin [2] = {0, 0} |
|
uint8_t | tmc2130_home_bsteps [2] = {48, 48} |
|
uint8_t | tmc2130_home_fsteps [2] = {48, 48} |
|
uint8_t | tmc2130_wave_fac [4] = {0, 0, 0, 0} |
|
tmc2130_chopper_config_t | tmc2130_chopper_config [NUM_AXIS] |
|
bool | tmc2130_sg_stop_on_crash = true |
|
uint8_t | tmc2130_sg_crash = 0 |
|
static ShortTimer | tmc2130_overtemp_timer |
|