stm32/boards/NUCLEO_L476RG: Add 5 remaining UARTs.
STM32L476RG MCU of NUCLEO_L476RG board has 6 UART/USART units in total
(USART1, USART2, USART3, UART4, UART5 and LPUART1), but only UART2,
connected to REPL, was defined and available in Python code.
Defined are all 5 remaining UART/USART units including LPUART1.
#define MICROPY_HW_CLK_PLLQ (RCC_PLLQ_DIV2)
#define MICROPY_HW_CLK_PLLR (RCC_PLLR_DIV2)
+#define MICROPY_HW_FLASH_LATENCY FLASH_LATENCY_4
+
// The board has an external 32kHz crystal
#define MICROPY_HW_RTC_USE_LSE (1)
-// UART config
+// USART1 config
+#define MICROPY_HW_UART1_TX (pin_A9)
+#define MICROPY_HW_UART1_RX (pin_A10)
+// USART2 config. Connected to ST-Link
#define MICROPY_HW_UART2_TX (pin_A2)
#define MICROPY_HW_UART2_RX (pin_A3)
-
+#define MICROPY_HW_UART2_RTS (pin_A1)
+#define MICROPY_HW_UART2_CTS (pin_A0)
+// USART3 config
+#define MICROPY_HW_UART3_TX (pin_C4)
+#define MICROPY_HW_UART3_RX (pin_C5)
+#define MICROPY_HW_UART3_RTS (pin_B14)
+#define MICROPY_HW_UART3_CTS (pin_B13)
+// UART4 config
+#define MICROPY_HW_UART4_TX (pin_A0)
+#define MICROPY_HW_UART4_RX (pin_A1)
+// UART5 config
+#define MICROPY_HW_UART5_TX (pin_C12)
+#define MICROPY_HW_UART5_RX (pin_D2)
+// LPUART config
+#define MICROPY_HW_LPUART1_TX (pin_C1)
+#define MICROPY_HW_LPUART1_RX (pin_C0)
+// USART2 is connected to the virtual com port on the ST-Link
#define MICROPY_HW_UART_REPL PYB_UART_2
#define MICROPY_HW_UART_REPL_BAUD 115200
-#define MICROPY_HW_FLASH_LATENCY FLASH_LATENCY_4
-
// I2C busses
#define MICROPY_HW_I2C1_SCL (pin_B8)
#define MICROPY_HW_I2C1_SDA (pin_B9)
