Group sstep_defs¶
Constants shared by the public API. More...
Public Types¶
| Type | Name |
|---|---|
| enum | sstep_state Driver state. |
| enum | sstep_topology Power stage topology. |
Macros¶
| Type | Name |
|---|---|
| define | SSTEP_ERR_CONFIG (-2)Configuration is consistent field by field but not as a whole (for example rated current above the power stage limit). |
| define | SSTEP_ERR_PARAM (-1)NULL pointer or a value outside its documented range. |
| define | SSTEP_ERR_STATE (-3)Call not allowed in the current state (for example a move while faulted). |
| define | SSTEP_ERR_UNSUPPORTED (-4)Topology not compiled in (see SSTEP_CFG_TOPOLOGY_FULL_BRIDGE ). |
| define | SSTEP_FAULT_EXTERNAL 0x0010UReported by the application through sstep_report_fault() (driver fault pin, over-temperature...). |
| define | SSTEP_FAULT_HAL 0x0008UA hardware callback returned an error. |
| define | SSTEP_FAULT_NONE 0x0000UFault flags reported by sstep_get_status() and the fault callback. |
| define | SSTEP_FAULT_OVERCURRENT 0x0001UMeasured phase current above the configured trip level. |
| define | SSTEP_FAULT_OVERVOLTAGE 0x0002UBus voltage above the configured maximum. |
| define | SSTEP_FAULT_STALL 0x0020UThe rotor does not follow the commanded electrical angle: lost synchronism in motion, or rotor motion while the command is at rest (sensorless back-EMF observer, enabled with sstep_ctrl_cfg::stall_time_ms ). |
| define | SSTEP_FAULT_UNDERVOLTAGE 0x0004UBus voltage below the configured minimum. |
| define | SSTEP_LEGS_MAX 4UNumber of half-bridge legs of the largest supported topology. |
| define | SSTEP_OK 0Success. |
Detailed Description¶
Units. Configuration values are integers in engineering units (milliohm, microhenry, milliampere, millivolt, hertz, nanosecond) so that sstep_init() needs no floating point with the fixed point backend. The unit is part of every field name (r_mohm, l_uh...). Positions are in microsteps, velocities in microsteps per second.
Sign convention. A positive phase voltage drives a positive phase current; positive velocity increases the position. Phase A leads phase B by 90 electrical degrees for positive motion.
Public Types Documentation¶
enum sstep_state¶
Driver state.
enum sstep_state {
SSTEP_STATE_DISABLED = 0,
SSTEP_STATE_HOLDING = 1,
SSTEP_STATE_MOVING = 2,
SSTEP_STATE_FAULT = 3
};
enum sstep_topology¶
Power stage topology.
Macro Definition Documentation¶
define SSTEP_ERR_CONFIG¶
Configuration is consistent field by field but not as a whole (for example rated current above the power stage limit).
define SSTEP_ERR_PARAM¶
NULL pointer or a value outside its documented range.
define SSTEP_ERR_STATE¶
Call not allowed in the current state (for example a move while faulted).
define SSTEP_ERR_UNSUPPORTED¶
Topology not compiled in (see SSTEP_CFG_TOPOLOGY_FULL_BRIDGE ).
define SSTEP_FAULT_EXTERNAL¶
Reported by the application through sstep_report_fault() (driver fault pin, over-temperature...).
define SSTEP_FAULT_HAL¶
A hardware callback returned an error.
define SSTEP_FAULT_NONE¶
Fault flags reported by sstep_get_status() and the fault callback.
A fault switches the outputs off; sstep_clear_faults() re-arms the driver.
define SSTEP_FAULT_OVERCURRENT¶
Measured phase current above the configured trip level.
define SSTEP_FAULT_OVERVOLTAGE¶
Bus voltage above the configured maximum.
define SSTEP_FAULT_STALL¶
The rotor does not follow the commanded electrical angle: lost synchronism in motion, or rotor motion while the command is at rest (sensorless back-EMF observer, enabled with sstep_ctrl_cfg::stall_time_ms ).
define SSTEP_FAULT_UNDERVOLTAGE¶
Bus voltage below the configured minimum.
define SSTEP_LEGS_MAX¶
Number of half-bridge legs of the largest supported topology.
define SSTEP_OK¶
Success.