Closed vintagepc closed 2 years ago
@vintagepc very good, even now it looks almost perfect :+1: . The architecture of this module matches the rest of the FW.
@vintagepc tests are failing on:
src/logic/hw_sanity.h:5:10: fatal error: config/axis.h: No such file or directory
Ah, whoops, probably a missing ../
. Still need to do the unit test stuff anyway once I figure out why IOIN isn't working right.
This PR checks the TMC driver IOIN against the actual state of the step/dir/en pins to confirm the hardware is working properly. Failure is indicated on the LED readout and likely means that attempting to print with the MMU will be unreliable (random failures of motors to move, and similar shenanigans one might expect if the digital inputs aren't right).
This check is performed briefly at every reset.
Example:
Readback/diagnostic indicators: /// LED indicators during the test execution: /// Slots 1-3: Pin states for STEP, DIR, and ENA - G: Set value matches readback, R: Readback disagrees. /// Slot 4: Axis under test - G: Idler, R: Selector, RG: Pully. /// Slot 5: G: Blinking to indicate test progression. R: Solid to indicate completed test w/ fault. /// Indicators at test end (fault condition): /// Slots 1-3 now indicate pins for Idler/Selector/Pulley, respectively: /// - Off: No faults detected. /// - G: STEP fault /// - R: DIR fault /// - RG: EN fault. /// - Blinking R/G: Multiple fault, e.g both an EN fault together with STEP and/or DIR. /// Slot 4: Reserved /// Slot 5: R: Solid