Subsystem for reading various telemetry and status information from the driver.
More...
#include <TMC9660.hpp>
Subsystem for reading various telemetry and status information from the driver.
◆ Telemetry()
| TMC9660::Telemetry::Telemetry |
( |
TMC9660 & |
parent | ) |
|
|
explicitprivatenoexcept |
◆ clearADCStatusFlags()
| bool TMC9660::Telemetry::clearADCStatusFlags |
( |
uint32_t |
mask | ) |
|
|
noexcept |
Clear bits in the ADC_STATUS_FLAGS register (write-1-to-clear).
- Parameters
-
| mask | Bit mask of clipping flags to clear. |
- Returns
- true if the mask was written successfully.
◆ clearGateDriverErrorFlags()
| bool TMC9660::Telemetry::clearGateDriverErrorFlags |
( |
uint32_t |
mask | ) |
|
|
noexcept |
Clear bits in the GDRV_ERROR_FLAGS register.
- Parameters
-
| mask | Bit mask of flags to clear (write-1-to-clear). |
- Returns
- true if the mask was written successfully.
◆ clearGeneralErrorFlags()
| bool TMC9660::Telemetry::clearGeneralErrorFlags |
( |
uint32_t |
mask | ) |
|
|
noexcept |
Clear bits in the GENERAL_ERROR_FLAGS register.
- Parameters
-
| mask | Bit mask of flags to clear (write-1-to-clear). |
- Returns
- true if the mask was written successfully.
◆ getActualPosition()
| int32_t TMC9660::Telemetry::getActualPosition |
( |
| ) |
|
|
noexcept |
Read the measured actual position of the motor.
- Returns
- The actual position in internal units. Returns 0 if not available.
◆ getActualVelocity()
| int32_t TMC9660::Telemetry::getActualVelocity |
( |
| ) |
|
|
noexcept |
Read the measured actual velocity of the motor.
- Returns
- The actual velocity in internal units. Returns 0 if not available.
◆ getADCStatusFlags()
| bool TMC9660::Telemetry::getADCStatusFlags |
( |
uint32_t & |
flags | ) |
|
|
noexcept |
Read the ADC_STATUS_FLAGS register (clipped ADC channels).
- Parameters
-
| [out] | flags | Bit mask of clipping status. |
- Returns
- true if read successfully.
◆ getChipTemperature()
| float TMC9660::Telemetry::getChipTemperature |
( |
| ) |
|
|
noexcept |
Read the internal chip temperature.
- Returns
- Chip temperature in degrees Celsius. Returns a negative value (e.g. -273) on read error. Formula: T(°C) = raw * 0.01615 - 268.15
◆ getExternalTemperature()
| uint16_t TMC9660::Telemetry::getExternalTemperature |
( |
| ) |
|
|
noexcept |
Read the external temperature sensor raw value.
- Returns
- Raw external temperature. Returns 0 if unable to read.
◆ getGateDriverErrorFlags()
| bool TMC9660::Telemetry::getGateDriverErrorFlags |
( |
uint32_t & |
flags | ) |
|
|
noexcept |
Read the GDRV_ERROR_FLAGS register.
- Parameters
-
| [out] | flags | Bit mask of current gate driver error flags. |
- Returns
- true if the flags were read successfully.
◆ getGeneralErrorFlags()
| bool TMC9660::Telemetry::getGeneralErrorFlags |
( |
uint32_t & |
flags | ) |
|
|
noexcept |
Read the GENERAL_ERROR_FLAGS register.
- Parameters
-
| [out] | flags | Bit mask of current error flags. |
- Returns
- true if the flags were read successfully.
◆ getGeneralStatusFlags()
| bool TMC9660::Telemetry::getGeneralStatusFlags |
( |
uint32_t & |
flags | ) |
|
|
noexcept |
Read the GENERAL_STATUS_FLAGS register.
- Parameters
-
| [out] | flags | Bit mask of current status flags. |
- Returns
- true if the flags were read successfully.
◆ getMotorCurrent()
| int16_t TMC9660::Telemetry::getMotorCurrent |
( |
| ) |
|
|
noexcept |
Read the current motor current (torque current).
- Returns
- Motor current in milliamps (mA). Returns 0 if unable to read.
◆ getSupplyVoltage()
| float TMC9660::Telemetry::getSupplyVoltage |
( |
| ) |
|
|
noexcept |
Read the current supply (bus) voltage.
- Returns
- Supply voltage in volts. Returns a negative value if unable to read.
◆ TMC9660
◆ driver
| TMC9660& TMC9660::Telemetry::driver |
|
private |
The documentation for this struct was generated from the following files: