prusa3d / Prusa-Firmware-MMU

Other
35 stars 19 forks source link

Allow runtime config/register motor/axis iRun current #254

Closed DRracer closed 1 year ago

DRracer commented 1 year ago

This commit introduces a new set of registers 0x1e, 0x1f and 0x20 which allow reading and writing iRun current values for each axis/motor.

Please note the register contains raw TMC2130 iRun value which needs to be translated into mA to be understandable by people. Translation table of iRun -> mA is present in tmc2130.cpp for now.

Technically I had to create a runtime MotorCurrents data structure (+9B in RAM) which is now used where the original axisParams[].currents has been used.

CPUFLASH: +44B RAM: +9B