Skip to content

Struct sstep_ctrl_cfg

ClassList > sstep_ctrl_cfg

Control and motion parameters. More...

  • #include <sstep_ctrl.h>

Public Attributes

Type Name
uint32_t accel
Acceleration [microsteps/s^2].
uint32_t current_bw_hz
Current loop bandwidth [Hz]; the PI gains are computed from R, L and this value.
uint32_t decel
Deceleration [microsteps/s^2]; 0 = same as accel.
enum sstep_drive_mode drive_mode
Current or voltage drive.
uint32_t fast_loop_hz
Rate of sstep_fast_loop() [Hz].
uint32_t hold_delay_ms
Standstill time before switching to i_hold_ma [ms].
uint32_t i_hold_ma
Peak phase current at standstill [mA].
uint32_t i_run_ma
Peak phase current while moving [mA].
uint16_t microsteps
Microsteps per full step (power of two, 1 .
uint32_t slow_loop_hz
Rate of sstep_slow_loop() [Hz].
uint32_t stall_filter_us
Time constant of the back-EMF low-pass filter [us], at least one fast loop period.
uint32_t stall_speed
Slip threshold [microsteps/s]: rotor speed that counts as motion while the command is at rest or slower than this; above it, the synchronism check.
uint16_t stall_sync_pct
Synchronism threshold [%] (1 .
uint32_t stall_time_ms
Stall detection: time the stall condition must persist before SSTEP_FAULT_STALL [ms]; 0 = stall detection off (the other stall_* fields are then ignored).
uint32_t v_max
Maximum velocity [microsteps/s].

Detailed Description

All of them except the loop rates can be changed at run time with the sstep_set_*() functions.

Public Attributes Documentation

variable accel

Acceleration [microsteps/s^2].

uint32_t sstep_ctrl_cfg::accel;


variable current_bw_hz

Current loop bandwidth [Hz]; the PI gains are computed from R, L and this value.

uint32_t sstep_ctrl_cfg::current_bw_hz;


variable decel

Deceleration [microsteps/s^2]; 0 = same as accel.

uint32_t sstep_ctrl_cfg::decel;


variable drive_mode

Current or voltage drive.

enum sstep_drive_mode sstep_ctrl_cfg::drive_mode;


variable fast_loop_hz

Rate of sstep_fast_loop() [Hz].

uint32_t sstep_ctrl_cfg::fast_loop_hz;


variable hold_delay_ms

Standstill time before switching to i_hold_ma [ms].

uint32_t sstep_ctrl_cfg::hold_delay_ms;


variable i_hold_ma

Peak phase current at standstill [mA].

uint32_t sstep_ctrl_cfg::i_hold_ma;


variable i_run_ma

Peak phase current while moving [mA].

uint32_t sstep_ctrl_cfg::i_run_ma;


variable microsteps

Microsteps per full step (power of two, 1 .

uint16_t sstep_ctrl_cfg::microsteps;

. SSTEP_CFG_MICROSTEPS_MAX).


variable slow_loop_hz

Rate of sstep_slow_loop() [Hz].

uint32_t sstep_ctrl_cfg::slow_loop_hz;


variable stall_filter_us

Time constant of the back-EMF low-pass filter [us], at least one fast loop period.

uint32_t sstep_ctrl_cfg::stall_filter_us;


variable stall_speed

Slip threshold [microsteps/s]: rotor speed that counts as motion while the command is at rest or slower than this; above it, the synchronism check.

uint32_t sstep_ctrl_cfg::stall_speed;


variable stall_sync_pct

Synchronism threshold [%] (1 .

uint16_t sstep_ctrl_cfg::stall_sync_pct;

. 100): smallest back-EMF along the commanded motion, relative to Ke * speed.


variable stall_time_ms

Stall detection: time the stall condition must persist before SSTEP_FAULT_STALL [ms]; 0 = stall detection off (the other stall_* fields are then ignored).

uint32_t sstep_ctrl_cfg::stall_time_ms;

Requires SSTEP_DRIVE_CURRENT and ke_uv_s_per_rad > 0.


variable v_max

Maximum velocity [microsteps/s].

uint32_t sstep_ctrl_cfg::v_max;



The documentation for this class was generated from the following file inc/sstep_ctrl.h