Skip to content

Commit 9cd4828

Browse files
mridup0xc0170
authored andcommitted
adding hwflwctl support for NUCLEO_F401RE (#1654)
1 parent 02b197c commit 9cd4828

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/PeripheralPins.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,28 @@ const PinMap PinMap_UART_RX[] = {
147147
{NC, NC, 0}
148148
};
149149

150+
const PinMap PinMap_UART_RTS[] = {
151+
{PA_1, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
152+
{PA_12, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
153+
// {PA_15, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
154+
// {PB_14, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // MEMs
155+
// {PC_8, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)},
156+
// {PD_4, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
157+
// {PD_12, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART3)}, // LED D4
158+
{NC, NC, 0}
159+
};
160+
161+
const PinMap PinMap_UART_CTS[] = {
162+
{PA_0, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
163+
{PA_11, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
164+
// {PB_0, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
165+
// {PB_13, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
166+
// {PC_9, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)},
167+
// {PD_3, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
168+
// {PD_11, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART3)}, // LED D4
169+
{NC, NC, 0}
170+
};
171+
150172
//*** SPI ***
151173

152174
const PinMap PinMap_SPI_MOSI[] = {

libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/device.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#define DEVICE_ANALOGOUT 0 // Not present on this device
4141

4242
#define DEVICE_SERIAL 1
43+
#define DEVICE_SERIAL_FC 1
4344

4445
#define DEVICE_I2C 1
4546
#define DEVICE_I2CSLAVE 1

libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/objects.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ struct serial_s {
6969
uint32_t parity;
7070
PinName pin_tx;
7171
PinName pin_rx;
72+
#if DEVICE_SERIAL_FC
73+
uint32_t hw_flow_ctl;
74+
PinName pin_rts;
75+
PinName pin_cts;
76+
#endif
7277
};
7378

7479
struct spi_s {

0 commit comments

Comments
 (0)