Skip to content

Commit 90172d5

Browse files
Adrian Negreanumbrossard
authored andcommitted
lpc4322 (SWO): configure the SWO GPIO port as input
1 parent 2998341 commit 90172d5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

source/hic_hal/nxp/lpc4322/RTE_Device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@
11611161
#endif
11621162
// <o> RX <0=>Not used <1=>P1_14 <2=>P3_5 <3=>P5_7 <4=>PC_14 <5=>PE_12
11631163
// <i> UART1 Serial Input pin
1164-
#define RTE_UART1_RX_ID 0
1164+
#define RTE_UART1_RX_ID 1
11651165
#if (RTE_UART1_RX_ID == 0)
11661166
#define RTE_UART1_RX_PIN_EN 0
11671167
#elif (RTE_UART1_RX_ID == 1)

source/hic_hal/nxp/lpc4322/gpio.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ void gpio_init(void)
7575
LPC_SCU->PINTSEL0 &= ~0xff;
7676
LPC_SCU->PINTSEL0 |= (PORT_nRESET << 5) | (PIN_nRESET_IN_BIT);
7777

78+
#if (SWO_UART != 0)
79+
/* Configure: SWO as input */
80+
LPC_GPIO_PORT->DIR[PORT_SWO] &= ~(1 << PIN_SWO_IN_BIT);
81+
#endif
82+
7883
busy_wait(10000);
7984
}
8085

0 commit comments

Comments
 (0)