From bf136d49e0717fdb5fb8487e3b793d9ed33d0620 Mon Sep 17 00:00:00 2001 From: pmantoine Date: Thu, 25 May 2023 08:34:20 +0800 Subject: [PATCH] Fix Serial ports for Nucleo-144 boards --- DCCTimerSTM32.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/DCCTimerSTM32.cpp b/DCCTimerSTM32.cpp index 944f466..a45c4d4 100644 --- a/DCCTimerSTM32.cpp +++ b/DCCTimerSTM32.cpp @@ -48,14 +48,9 @@ HardwareSerial Serial3(PD2, PC12); // Rx=PC7, Tx=PC6 -- UART5 - F446RE // NB: USART3 and USART6 are available but as yet undefined #elif defined(ARDUINO_NUCLEO_F412ZG) || defined(ARDUINO_NUCLEO_F429ZI) || defined(ARDUINO_NUCLEO_F446ZE) // Nucleo-144 boards don't have Serial1 defined by default -HardwareSerial Serial1(PC11, PC10); // Rx=PC11, Tx=PC10 -- USART3 - F412ZG/F446ZE -HardwareSerial Serial3(PD2, PC12); // Rx=PC7, Tx=PC6 -- UART5 - F412ZG/F446ZE -// Serial2 is defined to use USART2 by default, but is in fact used as the diag console +HardwareSerial Serial1(PG9, PG14); // Rx=PG9, Tx=PG14 -- USART6 +// Serial3 is defined to use USART3 by default, but is in fact used as the diag console // via the debugger on the Nucleo-144. It is therefore unavailable for other DCC-EX uses like WiFi, DFPlayer, etc. -// NB: -// On all of the above, USART3, and USART6 are available but as yet undefined -// On F446ZE and F429ZI, UART4, UART5 are also available but as yet undefined -// On F429ZI, UART7 and UART8 are also available but as yet undefined #else #error STM32 board selected is not yet explicitly supported - so Serial1 peripheral is not defined #endif