Skip to content

Commit 4a73379

Browse files
authored
Prevent pin glitches on out commutation (MarlinFirmware#16835)
Better for switching from pulled input to output and also set real output (with no input enabled).
1 parent 0fd0554 commit 4a73379

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Marlin/src/HAL/HAL_SAMD51/fastio.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@
8888
const EPortType port = (EPortType)GET_SAMD_PORT(IO); \
8989
const uint32_t pin = GET_SAMD_PIN(IO); \
9090
\
91-
PORT->Group[port].PINCFG[pin].reg = (uint8_t)(PORT_PINCFG_INEN); \
9291
PORT->Group[port].DIRSET.reg = MASK(pin); \
92+
PORT->Group[port].PINCFG[pin].reg = 0; \
9393
}while(0)
9494
// Set pin as output (open drain)
9595
#define SET_OUTPUT_OD(IO) do{ \

0 commit comments

Comments
 (0)