From 4a733796bdd11e429f117e652c0edb74c33c9e49 Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Tue, 11 Feb 2020 17:43:28 +0100 Subject: [PATCH] Prevent pin glitches on out commutation (#16835) Better for switching from pulled input to output and also set real output (with no input enabled). --- Marlin/src/HAL/HAL_SAMD51/fastio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/HAL/HAL_SAMD51/fastio.h b/Marlin/src/HAL/HAL_SAMD51/fastio.h index c91965e19e..e00fa77a7c 100644 --- a/Marlin/src/HAL/HAL_SAMD51/fastio.h +++ b/Marlin/src/HAL/HAL_SAMD51/fastio.h @@ -88,8 +88,8 @@ const EPortType port = (EPortType)GET_SAMD_PORT(IO); \ const uint32_t pin = GET_SAMD_PIN(IO); \ \ - PORT->Group[port].PINCFG[pin].reg = (uint8_t)(PORT_PINCFG_INEN); \ PORT->Group[port].DIRSET.reg = MASK(pin); \ + PORT->Group[port].PINCFG[pin].reg = 0; \ }while(0) // Set pin as output (open drain) #define SET_OUTPUT_OD(IO) do{ \