HF-TMC51x0 Driver (TMC5130 & TMC5160) 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC51x0 (TMC5130 & TMC5160)
Loading...
Searching...
No Matches
internal_ramp_comprehensive_test.cpp File Reference

Comprehensive internal ramp test suite for TMC51x0 (single motor) More...

#include "tmc51x0.hpp"
#include "features/tmc51x0_units.hpp"
#include "test_config/esp32_tmc51x0_bus.hpp"
#include "test_config/esp32_tmc51x0_test_config.hpp"
#include "test_config/TestFramework.h"
#include "driver/gpio.h"
#include <memory>
Include dependency graph for internal_ramp_comprehensive_test.cpp:

Classes

struct  TestDriverHandle
 Test driver handle containing SPI interface and driver instance. More...
 

Typedefs

using Motor = tmc51x0_test_config::MotorConfig_17HS4401S
 
using Test = tmc51x0_test_config::TestConfig_17HS4401S
 

Functions

bool test_driver_initialization () noexcept
 Test driver initialization and basic setup verification.
 
bool test_register_read_write () noexcept
 Test register read/write operations.
 
bool test_motor_parameter_settings () noexcept
 Test motor parameter configuration and settings.
 
bool test_ramp_parameter_settings () noexcept
 Test ramp parameter configuration (speed, acceleration, etc.).
 
bool test_global_configuration () noexcept
 Test global configuration settings (GCONF register).
 
bool test_enable_disable () noexcept
 Test motor enable/disable functionality.
 
bool test_current_control () noexcept
 Test motor current control (IRUN/IHOLD settings).
 
bool test_chopper_configuration () noexcept
 Test chopper configuration (SpreadCycle mode).
 
bool test_stealthchop_configuration () noexcept
 Test StealthChop configuration and automatic tuning.
 
bool test_mode_change_speeds () noexcept
 Test mode change speed thresholds (PWM_THRS, COOL_THRS, HIGH_THRS).
 
bool test_global_scaler () noexcept
 Test global scaler configuration.
 
bool test_freewheeling_mode () noexcept
 Test freewheeling mode configuration.
 
bool test_coolstep_configuration () noexcept
 Test CoolStep configuration and operation.
 
bool test_dcstep_configuration () noexcept
 Test DCStep configuration and operation.
 
bool test_microstep_lookup_table () noexcept
 Test microstep lookup table configuration.
 
bool test_motor_setup_from_spec () noexcept
 Test motor setup from specifications (automatic configuration).
 
bool test_ramp_modes () noexcept
 Test ramp mode switching (POSITIONING, VELOCITY_POS, VELOCITY_NEG, HOLD).
 
bool test_position_control () noexcept
 Test position control (target position, current position).
 
bool test_speed_control () noexcept
 Test speed control (max speed, acceleration, deceleration).
 
bool test_ramp_parameters () noexcept
 Test ramp parameters (VSTART, VSTOP, first acceleration, etc.).
 
bool test_reference_switch_configuration () noexcept
 Test reference switch configuration and homing.
 
bool test_unit_conversions () noexcept
 Test unit conversion functions (RPM, degrees, millimeters, etc.).
 
bool test_driver_status () noexcept
 Test driver status reading (GSTAT, DRV_STATUS).
 
bool test_stallguard () noexcept
 Test StallGuard2 configuration and reading.
 
bool test_lost_steps () noexcept
 Test lost steps detection and reading.
 
bool test_phase_currents () noexcept
 Test phase current reading (microstep current diagnostics).
 
bool test_pwm_scale () noexcept
 Test PWM scale reading (PWM_AUTO, PWM_SCALE_SUM).
 
bool test_microstep_diagnostics () noexcept
 Test microstep diagnostics (counter, time between microsteps).
 
bool test_gpio_pins () noexcept
 Test GPIO pin reading functionality.
 
bool test_factory_otp_config () noexcept
 Test factory and OTP configuration reading.
 
bool test_uart_transmission_count () noexcept
 Test UART transmission count reading.
 
bool test_offset_calibration () noexcept
 Test offset calibration reading.
 
bool test_sensorless_homing () noexcept
 Test sensorless homing configuration (StallGuard2-based).
 
bool test_open_load () noexcept
 Test open load detection functionality.
 
bool test_short_circuit_protection () noexcept
 Test short circuit protection configuration.
 
bool test_overtemperature_protection () noexcept
 Test overtemperature protection status reading.
 
bool test_encoder_configuration () noexcept
 Test encoder configuration and setup.
 
bool test_encoder_resolution () noexcept
 Test encoder resolution setting.
 
bool test_encoder_position_reading () noexcept
 Test encoder position reading.
 
bool test_deviation_detection () noexcept
 Test encoder deviation detection and warnings.
 
bool test_latched_position () noexcept
 Test latched position reading (index pulse).
 
uint8_t CalculateCurrentRegister (uint16_t current_ma, uint16_t global_scaler=0, uint32_t sense_resistor_mohm=0)
 Helper to calculate current register value (0-31) from mA.
 
bool verify_mode_pins (const Esp32SPI &spi, const tmc51x0::TMC51x0< Esp32SPI > &driver, tmc51x0::CommMode expected_comm_mode) noexcept
 Verify mode pins match expected communication mode.
 
std::unique_ptr< TestDriverHandlecreate_test_driver (bool enable_ref_switch_stop=false) noexcept
 Create and initialize a test driver instance.
 
void app_main (void)
 

Variables

static const char * TAG = "InternalRamp_Test"
 
static TestResults g_test_results
 
static constexpr tmc51x0_test_config::TestRigType SELECTED_TEST_RIG
 
static constexpr uint8_t TEST_TOFF = Motor::TOFF
 
static constexpr tmc51x0::MicrostepResolution TEST_MRES = Motor::MRES
 
static constexpr float MICROSTEPS = 256.0f
 
static constexpr float STEPS_PER_REV = static_cast<float>(Motor::OUTPUT_FULL_STEPS) * MICROSTEPS
 
static constexpr float LEAD_SCREW_PITCH_MM = 2.0F
 
static constexpr float TEST_MAX_SPEED_RPM = 60.0f
 
static constexpr float TEST_ACCELERATION_REV_S2 = 120.0f
 
static constexpr float TEST_DECELERATION_REV_S2 = 120.0f
 
static constexpr bool ENABLE_INITIALIZATION_TESTS = true
 
static constexpr bool ENABLE_REGISTER_ACCESS_TESTS = true
 
static constexpr bool ENABLE_MOTOR_PARAMETER_TESTS = true
 
static constexpr bool ENABLE_RAMP_PARAMETER_TESTS = true
 
static constexpr bool ENABLE_GLOBAL_CONFIG_TESTS = true
 
static constexpr bool ENABLE_ENABLE_DISABLE_TESTS = true
 
static constexpr bool ENABLE_CURRENT_CONTROL_TESTS = true
 
static constexpr bool ENABLE_CHOPPER_TESTS = true
 
static constexpr bool ENABLE_STEALTHCHOP_TESTS = true
 
static constexpr bool ENABLE_MODE_CHANGE_SPEED_TESTS = true
 
static constexpr bool ENABLE_GLOBAL_SCALER_TESTS = true
 
static constexpr bool ENABLE_FREEWHEELING_TESTS = true
 
static constexpr bool ENABLE_COOLSTEP_TESTS = true
 
static constexpr bool ENABLE_DCSTEP_TESTS = true
 
static constexpr bool ENABLE_LUT_TESTS = true
 
static constexpr bool ENABLE_MOTOR_SETUP_TESTS = true
 
static constexpr bool ENABLE_RAMP_MODE_TESTS = true
 
static constexpr bool ENABLE_POSITION_CONTROL_TESTS = true
 
static constexpr bool ENABLE_SPEED_CONTROL_TESTS = true
 
static constexpr bool ENABLE_RAMP_PARAMETER_TESTS_RAMP = true
 
static constexpr bool ENABLE_REFERENCE_SWITCH_TESTS = true
 
static constexpr bool ENABLE_UNIT_CONVERSION_TESTS = true
 
static constexpr bool ENABLE_DRIVER_STATUS_TESTS = true
 
static constexpr bool ENABLE_STALLGUARD_TESTS = true
 
static constexpr bool ENABLE_LOST_STEPS_TESTS = true
 
static constexpr bool ENABLE_PHASE_CURRENT_TESTS = true
 
static constexpr bool ENABLE_PWM_SCALE_TESTS = true
 
static constexpr bool ENABLE_MICROSTEP_DIAGNOSTICS_TESTS = true
 
static constexpr bool ENABLE_GPIO_TESTS = true
 
static constexpr bool ENABLE_FACTORY_OTP_TESTS = true
 
static constexpr bool ENABLE_UART_COUNT_TESTS = true
 
static constexpr bool ENABLE_OFFSET_CALIBRATION_TESTS = true
 
static constexpr bool ENABLE_SENSORLESS_HOMING_TESTS = true
 
static constexpr bool ENABLE_OPEN_LOAD_TESTS = true
 
static constexpr bool ENABLE_SHORT_CIRCUIT_TESTS = true
 
static constexpr bool ENABLE_OVERTEMPERATURE_TESTS = true
 
static constexpr bool ENABLE_ENCODER_CONFIG_TESTS = true
 
static constexpr bool ENABLE_ENCODER_RESOLUTION_TESTS = true
 
static constexpr bool ENABLE_ENCODER_POSITION_TESTS = true
 
static constexpr bool ENABLE_DEVIATION_DETECTION_TESTS = true
 
static constexpr bool ENABLE_LATCHED_POSITION_TESTS = true
 

Detailed Description

Comprehensive internal ramp test suite for TMC51x0 (single motor)

This file contains comprehensive testing for TMC51x0 driver covering:

  • Core initialization and basic setup
  • Motor control features (enable/disable, current, chopper, StealthChop, etc.)
  • Ramp control features (positioning, velocity, ramp parameters)
  • Diagnostics features (status, StallGuard2, lost steps, phase currents, etc.)
  • Protection features (short circuit, overtemperature)

Hardware Requirements:

  • ESP32 development board
  • TMC51x0 stepper motor driver (Evaluation Board)
  • 17HS4401S-PG518 geared stepper motor (5.18:1 gearbox)
  • AS5047U encoder
  • Two reference switches (endstops)
  • SPI connection between ESP32 and TMC51x0

Configuration:

  • Motor: 17HS4401S-PG518 (gearbox)
  • Board: TMC51x0 Evaluation Kit
  • Platform: Test Rig (with encoder and reference switches)
  • Communication Mode: SPI Internal Ramp (SPI_MODE=HIGH, SD_MODE=LOW)
Note
Reference switches are configured but do NOT stop the motor unless directly testing that feature (test_reference_switch_configuration).
Author
Nebiyu Tadesse
Date
2025

Typedef Documentation

◆ Motor

◆ Test

Function Documentation

◆ app_main()

void app_main ( void )
Here is the call graph for this function:

◆ CalculateCurrentRegister()

uint8_t CalculateCurrentRegister ( uint16_t current_ma,
uint16_t global_scaler = 0,
uint32_t sense_resistor_mohm = 0 )

Helper to calculate current register value (0-31) from mA.

Converts target current in mA to IRUN/IHOLD register value (0-31) using the TMC51x0 current calculation formula: I_RMS = (GLOBAL_SCALER/256) * ((CS+1)/32) * (VFS/RSENSE) * (1/√2)

Reversed: CS = (I_RMS * 256 * 32) / (GLOBAL_SCALER * (VFS/RSENSE) * (1/√2)) - 1

NOTE: This is a TEST HELPER function, not part of the TMC51x0 driver API. The driver's SetCurrent() method takes register values (0-31) directly. The driver's SetupMotorFromSpec() handles mA-to-register conversion automatically during initialization, but tests need fine-grained control over specific mA values, hence this helper function.

Parameters
current_maTarget current in mA
global_scalerGlobal scaler value (32-256). If 0, uses 256 (full scale)
sense_resistor_mohmSense resistor value in mOhm. If 0, uses board config default
Returns
uint8_t Register value (0-31), clamped to valid range
Here is the caller graph for this function:

◆ create_test_driver()

std::unique_ptr< TestDriverHandle > create_test_driver ( bool enable_ref_switch_stop = false)
noexcept

Create and initialize a test driver instance.

This helper function creates a fully configured TMC51x0 driver instance with the selected motor, board, and platform configuration.

Note
Reference switches are configured but with stop_enable disabled unless explicitly testing that feature. This prevents the motor from stopping during normal tests.
Returns
Unique pointer to TestDriverHandle, or nullptr on failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_chopper_configuration()

bool test_chopper_configuration ( )
noexcept

Test chopper configuration (SpreadCycle mode).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_coolstep_configuration()

bool test_coolstep_configuration ( )
noexcept

Test CoolStep configuration and operation.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_current_control()

bool test_current_control ( )
noexcept

Test motor current control (IRUN/IHOLD settings).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_dcstep_configuration()

bool test_dcstep_configuration ( )
noexcept

Test DCStep configuration and operation.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_deviation_detection()

bool test_deviation_detection ( )
noexcept

Test encoder deviation detection and warnings.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_driver_initialization()

bool test_driver_initialization ( )
noexcept

Test driver initialization and basic setup verification.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_driver_status()

bool test_driver_status ( )
noexcept

Test driver status reading (GSTAT, DRV_STATUS).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_enable_disable()

bool test_enable_disable ( )
noexcept

Test motor enable/disable functionality.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_encoder_configuration()

bool test_encoder_configuration ( )
noexcept

Test encoder configuration and setup.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_encoder_position_reading()

bool test_encoder_position_reading ( )
noexcept

Test encoder position reading.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_encoder_resolution()

bool test_encoder_resolution ( )
noexcept

Test encoder resolution setting.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_factory_otp_config()

bool test_factory_otp_config ( )
noexcept

Test factory and OTP configuration reading.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_freewheeling_mode()

bool test_freewheeling_mode ( )
noexcept

Test freewheeling mode configuration.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_global_configuration()

bool test_global_configuration ( )
noexcept

Test global configuration settings (GCONF register).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_global_scaler()

bool test_global_scaler ( )
noexcept

Test global scaler configuration.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_gpio_pins()

bool test_gpio_pins ( )
noexcept

Test GPIO pin reading functionality.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_latched_position()

bool test_latched_position ( )
noexcept

Test latched position reading (index pulse).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_lost_steps()

bool test_lost_steps ( )
noexcept

Test lost steps detection and reading.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_microstep_diagnostics()

bool test_microstep_diagnostics ( )
noexcept

Test microstep diagnostics (counter, time between microsteps).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_microstep_lookup_table()

bool test_microstep_lookup_table ( )
noexcept

Test microstep lookup table configuration.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_mode_change_speeds()

bool test_mode_change_speeds ( )
noexcept

Test mode change speed thresholds (PWM_THRS, COOL_THRS, HIGH_THRS).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_motor_parameter_settings()

bool test_motor_parameter_settings ( )
noexcept

Test motor parameter configuration and settings.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_motor_setup_from_spec()

bool test_motor_setup_from_spec ( )
noexcept

Test motor setup from specifications (automatic configuration).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_offset_calibration()

bool test_offset_calibration ( )
noexcept

Test offset calibration reading.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_open_load()

bool test_open_load ( )
noexcept

Test open load detection functionality.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_overtemperature_protection()

bool test_overtemperature_protection ( )
noexcept

Test overtemperature protection status reading.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_phase_currents()

bool test_phase_currents ( )
noexcept

Test phase current reading (microstep current diagnostics).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_position_control()

bool test_position_control ( )
noexcept

Test position control (target position, current position).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_pwm_scale()

bool test_pwm_scale ( )
noexcept

Test PWM scale reading (PWM_AUTO, PWM_SCALE_SUM).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_ramp_modes()

bool test_ramp_modes ( )
noexcept

Test ramp mode switching (POSITIONING, VELOCITY_POS, VELOCITY_NEG, HOLD).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_ramp_parameter_settings()

bool test_ramp_parameter_settings ( )
noexcept

Test ramp parameter configuration (speed, acceleration, etc.).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_ramp_parameters()

bool test_ramp_parameters ( )
noexcept

Test ramp parameters (VSTART, VSTOP, first acceleration, etc.).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_reference_switch_configuration()

bool test_reference_switch_configuration ( )
noexcept

Test reference switch configuration and homing.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_register_read_write()

bool test_register_read_write ( )
noexcept

Test register read/write operations.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_sensorless_homing()

bool test_sensorless_homing ( )
noexcept

Test sensorless homing configuration (StallGuard2-based).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_short_circuit_protection()

bool test_short_circuit_protection ( )
noexcept

Test short circuit protection configuration.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_speed_control()

bool test_speed_control ( )
noexcept

Test speed control (max speed, acceleration, deceleration).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_stallguard()

bool test_stallguard ( )
noexcept

Test StallGuard2 configuration and reading.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_stealthchop_configuration()

bool test_stealthchop_configuration ( )
noexcept

Test StealthChop configuration and automatic tuning.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_uart_transmission_count()

bool test_uart_transmission_count ( )
noexcept

Test UART transmission count reading.

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_unit_conversions()

bool test_unit_conversions ( )
noexcept

Test unit conversion functions (RPM, degrees, millimeters, etc.).

Returns
true if test passed, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ verify_mode_pins()

bool verify_mode_pins ( const Esp32SPI & spi,
const tmc51x0::TMC51x0< Esp32SPI > & driver,
tmc51x0::CommMode expected_comm_mode )
noexcept

Verify mode pins match expected communication mode.

Parameters
spiSPI communication interface
driverTMC51x0 driver instance
expected_comm_modeExpected communication mode (SPI or UART)
Returns
true if verification passed or pins not configured, false on mismatch
Here is the caller graph for this function:

Variable Documentation

◆ ENABLE_CHOPPER_TESTS

constexpr bool ENABLE_CHOPPER_TESTS = true
staticconstexpr

◆ ENABLE_COOLSTEP_TESTS

constexpr bool ENABLE_COOLSTEP_TESTS = true
staticconstexpr

◆ ENABLE_CURRENT_CONTROL_TESTS

constexpr bool ENABLE_CURRENT_CONTROL_TESTS = true
staticconstexpr

◆ ENABLE_DCSTEP_TESTS

constexpr bool ENABLE_DCSTEP_TESTS = true
staticconstexpr

◆ ENABLE_DEVIATION_DETECTION_TESTS

constexpr bool ENABLE_DEVIATION_DETECTION_TESTS = true
staticconstexpr

◆ ENABLE_DRIVER_STATUS_TESTS

constexpr bool ENABLE_DRIVER_STATUS_TESTS = true
staticconstexpr

◆ ENABLE_ENABLE_DISABLE_TESTS

constexpr bool ENABLE_ENABLE_DISABLE_TESTS = true
staticconstexpr

◆ ENABLE_ENCODER_CONFIG_TESTS

constexpr bool ENABLE_ENCODER_CONFIG_TESTS = true
staticconstexpr

◆ ENABLE_ENCODER_POSITION_TESTS

constexpr bool ENABLE_ENCODER_POSITION_TESTS = true
staticconstexpr

◆ ENABLE_ENCODER_RESOLUTION_TESTS

constexpr bool ENABLE_ENCODER_RESOLUTION_TESTS = true
staticconstexpr

◆ ENABLE_FACTORY_OTP_TESTS

constexpr bool ENABLE_FACTORY_OTP_TESTS = true
staticconstexpr

◆ ENABLE_FREEWHEELING_TESTS

constexpr bool ENABLE_FREEWHEELING_TESTS = true
staticconstexpr

◆ ENABLE_GLOBAL_CONFIG_TESTS

constexpr bool ENABLE_GLOBAL_CONFIG_TESTS = true
staticconstexpr

◆ ENABLE_GLOBAL_SCALER_TESTS

constexpr bool ENABLE_GLOBAL_SCALER_TESTS = true
staticconstexpr

◆ ENABLE_GPIO_TESTS

constexpr bool ENABLE_GPIO_TESTS = true
staticconstexpr

◆ ENABLE_INITIALIZATION_TESTS

constexpr bool ENABLE_INITIALIZATION_TESTS = true
staticconstexpr

◆ ENABLE_LATCHED_POSITION_TESTS

constexpr bool ENABLE_LATCHED_POSITION_TESTS = true
staticconstexpr

◆ ENABLE_LOST_STEPS_TESTS

constexpr bool ENABLE_LOST_STEPS_TESTS = true
staticconstexpr

◆ ENABLE_LUT_TESTS

constexpr bool ENABLE_LUT_TESTS = true
staticconstexpr

◆ ENABLE_MICROSTEP_DIAGNOSTICS_TESTS

constexpr bool ENABLE_MICROSTEP_DIAGNOSTICS_TESTS = true
staticconstexpr

◆ ENABLE_MODE_CHANGE_SPEED_TESTS

constexpr bool ENABLE_MODE_CHANGE_SPEED_TESTS = true
staticconstexpr

◆ ENABLE_MOTOR_PARAMETER_TESTS

constexpr bool ENABLE_MOTOR_PARAMETER_TESTS = true
staticconstexpr

◆ ENABLE_MOTOR_SETUP_TESTS

constexpr bool ENABLE_MOTOR_SETUP_TESTS = true
staticconstexpr

◆ ENABLE_OFFSET_CALIBRATION_TESTS

constexpr bool ENABLE_OFFSET_CALIBRATION_TESTS = true
staticconstexpr

◆ ENABLE_OPEN_LOAD_TESTS

constexpr bool ENABLE_OPEN_LOAD_TESTS = true
staticconstexpr

◆ ENABLE_OVERTEMPERATURE_TESTS

constexpr bool ENABLE_OVERTEMPERATURE_TESTS = true
staticconstexpr

◆ ENABLE_PHASE_CURRENT_TESTS

constexpr bool ENABLE_PHASE_CURRENT_TESTS = true
staticconstexpr

◆ ENABLE_POSITION_CONTROL_TESTS

constexpr bool ENABLE_POSITION_CONTROL_TESTS = true
staticconstexpr

◆ ENABLE_PWM_SCALE_TESTS

constexpr bool ENABLE_PWM_SCALE_TESTS = true
staticconstexpr

◆ ENABLE_RAMP_MODE_TESTS

constexpr bool ENABLE_RAMP_MODE_TESTS = true
staticconstexpr

◆ ENABLE_RAMP_PARAMETER_TESTS

constexpr bool ENABLE_RAMP_PARAMETER_TESTS = true
staticconstexpr

◆ ENABLE_RAMP_PARAMETER_TESTS_RAMP

constexpr bool ENABLE_RAMP_PARAMETER_TESTS_RAMP = true
staticconstexpr

◆ ENABLE_REFERENCE_SWITCH_TESTS

constexpr bool ENABLE_REFERENCE_SWITCH_TESTS = true
staticconstexpr

◆ ENABLE_REGISTER_ACCESS_TESTS

constexpr bool ENABLE_REGISTER_ACCESS_TESTS = true
staticconstexpr

◆ ENABLE_SENSORLESS_HOMING_TESTS

constexpr bool ENABLE_SENSORLESS_HOMING_TESTS = true
staticconstexpr

◆ ENABLE_SHORT_CIRCUIT_TESTS

constexpr bool ENABLE_SHORT_CIRCUIT_TESTS = true
staticconstexpr

◆ ENABLE_SPEED_CONTROL_TESTS

constexpr bool ENABLE_SPEED_CONTROL_TESTS = true
staticconstexpr

◆ ENABLE_STALLGUARD_TESTS

constexpr bool ENABLE_STALLGUARD_TESTS = true
staticconstexpr

◆ ENABLE_STEALTHCHOP_TESTS

constexpr bool ENABLE_STEALTHCHOP_TESTS = true
staticconstexpr

◆ ENABLE_UART_COUNT_TESTS

constexpr bool ENABLE_UART_COUNT_TESTS = true
staticconstexpr

◆ ENABLE_UNIT_CONVERSION_TESTS

constexpr bool ENABLE_UNIT_CONVERSION_TESTS = true
staticconstexpr

◆ g_test_results

TestResults g_test_results
static

◆ LEAD_SCREW_PITCH_MM

constexpr float LEAD_SCREW_PITCH_MM = 2.0F
staticconstexpr

◆ MICROSTEPS

constexpr float MICROSTEPS = 256.0f
staticconstexpr

◆ SELECTED_TEST_RIG

constexpr tmc51x0_test_config::TestRigType SELECTED_TEST_RIG
staticconstexpr
Initial value:
=
@ TEST_RIG_CORE_DRIVER
Core driver test rig (17HS4401S motor, TMC51x0 EVAL board, reference switches, encoder)

◆ STEPS_PER_REV

constexpr float STEPS_PER_REV = static_cast<float>(Motor::OUTPUT_FULL_STEPS) * MICROSTEPS
staticconstexpr

◆ TAG

const char* TAG = "InternalRamp_Test"
static

◆ TEST_ACCELERATION_REV_S2

constexpr float TEST_ACCELERATION_REV_S2 = 120.0f
staticconstexpr

◆ TEST_DECELERATION_REV_S2

constexpr float TEST_DECELERATION_REV_S2 = 120.0f
staticconstexpr

◆ TEST_MAX_SPEED_RPM

constexpr float TEST_MAX_SPEED_RPM = 60.0f
staticconstexpr

◆ TEST_MRES

constexpr tmc51x0::MicrostepResolution TEST_MRES = Motor::MRES
staticconstexpr

◆ TEST_TOFF

constexpr uint8_t TEST_TOFF = Motor::TOFF
staticconstexpr