Changelog¶
What changed in each release of the driver.
[Unreleased]¶
Added¶
- Host unit tests (
-DHF_TMC51X0_BUILD_TESTS=ON) with a register-file model of the chip behind the SPI interface, and a CI workflow that runs them with GCC and Clang.
Changed¶
- Documentation moved to the HardFOC MkDocs platform: new page set (quickstart, hardware, architecture, motion
and units, current and chopper, StallGuard and homing, multi-chip, protocols, TMC5130, API guide, porting,
testing), code snippets compiled by the host build from
tests/docs/, Doxygen under/api/, versioned with mike. The Jekyll site files and the doxygen-awesome submodule are gone.
Fixed¶
TMC51x0DaisyChainandTMC51x0MultiNodecompile: their constructors passed the clock frequency as the daisy-chain position and could not store the drivers;IsDeviceActive()andMultiNode::InitializeAll()returned the wrong types.ProgramSequentially()/ProgramDevice()now drive NAO low after writingNODECONF(TMC5160A datasheet section 5.4, figure 5.1).- TMC5130:
Initialize()reads the chip version before its first chip-specific write and no longer writesSHORT_CONF,DRV_CONForGLOBAL_SCALER; the automatic current calculation uses the TMC5130 formula (RSENSE + 20 mOhm, VFS 0.32 V) instead of assuming aGLOBAL_SCALER, which set too much current.status.VerifySetup()accepts version 0x11. - UART datagrams carry the full 8-bit node address (it was masked to 7 bits).
UartCommInterface::GetNaoPin()calls the port'sGetNaoPin()(it called aGetNaoPin(bool&)overload).Unit::Mmwithout a lead screw or belt returnsINVALID_VALUEfrom the motion, ramp,X_COMPAREand homing calls instead of commanding position or speed 0. NewIsUnitConvertible().motorControl.Enable()/Disable()return the EN (DRV_ENN) GPIO error instead of ignoring it (UNSUPPORTEDis still accepted);Disable()drives EN before touching the bus.GetDriverVersion(),GetDriverVersionMajor/Minor/Patch()andIsInitialized()are public.- Install rules:
tmc51x0.ippis installed next totmc51x0.hpp(included by name, no longer through../src/), the exported target ishf::tmc51x0like the in-tree alias, andinclude/featuresandinclude/registersare on the install interface. MotorControl::IsStealthChopCalibrated()andEncoder::SetNChannelActiveLevel(),SetNChannelSensitivity(),SetClearMode()andSetPrescalerMode()did not compile when used.
Breaking changes¶
Enable()andDisable()now fail when the port'sGpioSet(EN, ...)fails. A port that has no EN pin must returnUNSUPPORTED(as the porting contract says), not another error. The ESP32 example port now does.- Calls that take
Unit::MmreturnINVALID_VALUEwhenDriverConfig::mechanicalhas no lead screw or belt, where they used to succeed and move to 0. - On a TMC5130 the calculated
IRUN/IHOLDchange (lower, matching the requested current). Applications that compensated by callingSetCurrent()afterInitialize()can drop that. - The installed CMake target is
hf::tmc51x0(washf::hf_tmc51x0). - The
f_clkconstructor argument ofTMC51x0DaisyChain/TMC51x0MultiNodeis ignored; the clock comes fromDriverConfig::external_clk_config.