Skip to content

Commit 4e1c04f

Browse files
author
Cruz Monrreal
authored
Merge pull request #6734 from codeauroraforum/Fix_LPC54XXX_GPIO
LPC54XXX: Set the pin function to Digital mode
2 parents a19a528 + 2670f79 commit 4e1c04f

File tree

1 file changed

+3
-0
lines changed
  • targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC

1 file changed

+3
-0
lines changed

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC/pinmap.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ void pin_function(PinName pin, int function)
2929
CLOCK_EnableClock(gpio_clocks[port_number]);
3030
CLOCK_EnableClock(kCLOCK_Iocon);
3131

32+
/* Set the DIGIMODE bit */
33+
IOCON->PIO[port_number][pin_number] |= IOCON_PIO_DIGIMODE_MASK;
34+
3235
reg = IOCON->PIO[port_number][pin_number];
3336
reg = (reg & ~0x7) | (function & 0x7);
3437
IOCON->PIO[port_number][pin_number] = reg;

0 commit comments

Comments
 (0)