Prusa-MMU-Private
PrusaMultiMaterialUpgradev3firmwareforMK3SMK4
Classes | Enumerations | Functions | Variables
hal::tmc2130 Namespace Reference

Classes

struct  MotorParams
 
struct  MotorCurrents
 
class  TMC2130
 TMC2130 interface - instances of this class are hidden in modules::motion::Motion::AxisData. More...
 

Enumerations

enum  MotorMode : uint8_t { Stealth , Normal }
 

Functions

bool __attribute__ ((noinline)) TMC2130
 
struct __attribute__ ((packed)) ErrorFlags
 

Variables

static constexpr uint8_t TOFF_DEFAULT = 3U
 
static constexpr uint8_t TOFF_MASK = 0xFU
 

Detailed Description

TMC2130 interface There are multiple TMC2130 on our board, so there will be multiple instances of this class

Function Documentation

◆ __attribute__() [1/2]

bool hal::tmc2130::__attribute__ ( (noinline)  )

check for compatible tmc driver (IOIN version field)

clear reset_flag as we are (re)initializing

apply chopper parameters

apply currents

instant powerdown ramp

Stallguard parameters

Write stealth mode config and setup diag0 output

stealthChop parameters

TPWMTHRS: switching velocity between stealthChop and spreadCycle. Stallguard is also disabled if the velocity falls below this. Should be set as high as possible when homing.

◆ __attribute__() [2/2]

struct hal::tmc2130::__attribute__ ( (packed)  )

< driver restarted

< undervoltage on charge pump

< short to ground

< over temperature pre-warning

< over temperature hard