diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-10-15 13:36:41 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-10-15 13:36:41 +0300 |
commit | 00a128178d89cc0fc068e90d369509f0a57ad890 (patch) | |
tree | 31a68006d0d00d041e51ca50d52391623434f1be /src/Platform | |
parent | d3c1f762db0feaa0f43bfa838dd5df03b763c489 (diff) |
Set and leave Z_PROBE_MOD pin low during startup on Duet Maestro
Diffstat (limited to 'src/Platform')
-rw-r--r-- | src/Platform/RepRap.cpp | 4 | ||||
-rw-r--r-- | src/Platform/Tasks.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/Platform/RepRap.cpp b/src/Platform/RepRap.cpp index 188635ff..01c3c138 100644 --- a/src/Platform/RepRap.cpp +++ b/src/Platform/RepRap.cpp @@ -2909,7 +2909,9 @@ void RepRap::StartIap(const char *filename) noexcept } #endif -#if defined(DUET_NG) || defined(DUET_M) +#if defined(DUET_M) + // Leave the Diag LED (aka Z_PROBE_MOD) low, otherwise an attached BLTouch gets confused during its startup sequence +#elif defined(DUET_NG) IoPort::WriteDigital(DiagPin, !DiagOnPolarity); // turn the DIAG LED off #endif diff --git a/src/Platform/Tasks.cpp b/src/Platform/Tasks.cpp index 6cd12a2d..e005f775 100644 --- a/src/Platform/Tasks.cpp +++ b/src/Platform/Tasks.cpp @@ -130,6 +130,8 @@ void *Tasks::GetNVMBuffer(const uint32_t *stk) noexcept // Application entry point [[noreturn]] void AppMain() noexcept { + // Note: on the Duet Maestro the Z_PROB_MOD pin is shared with the Diag pin and often use to control a BLTouch. + // Setting it low here and keeping it low avoids confusing the BLTouch during its startup sequence. pinMode(DiagPin, (DiagOnPolarity) ? OUTPUT_LOW : OUTPUT_HIGH); // set up status LED for debugging and turn it off #ifdef DUET3MINI pinMode(ActLedPin, (ActOnPolarity) ? OUTPUT_LOW : OUTPUT_HIGH); // set up activity LED and turn it off |