Duet Maestro Driver Sense Resistor Configuration



  • I noticed the maestro is using external sense resistors, for their stepper motor drivers.

    Going back through the TMC2204 datasheet, the driver has an optional internal sense resistor. The datasheet requires a setting --- otp_internalRsense = 0 --- in order to run external sense resistors.

    0_1551311080085_2ba927c8-5110-4aad-92cd-8d9195787fd3-image.png

    (snippet from the TMC2204 datasheet)

    I'm looking back through 2.02 source code, and find that it might not be set to use external sense resistor

    0_1551310804235_93ef4369-c472-4144-b230-29db68b38500-image.png

    Pic above in TMC22xx.cpp (.../src/Movement/StepperDrivers). Release: 2.03beta2

    Am I misinterpreting something or is the source code setting the driver to using the internal sense resistor?



  • This is just selecting the bit in the bitfield and assigning it to a flag called GCONF_INT_RSENSE. It's not setting the value to 1.

    Do you see somewhere in the code this flag is used and setting the value to internal?



  • Oh. I see.

    The settings of the GCONF register is set right after assigning bit flags.

    0_1551385103670_e1e83504-0794-4de1-ab59-2b999a2e2887-image.png

    So, GCONF_INT_RSENSE is set to zero (since it wasn't called at the DefaultGConfReg = ...). Got it.


Log in to reply