Skip to content

Commit 6bc840e

Browse files
committed
boards/common/nucleo144: fix Arduino D0/D1 config for L4, L5, U5 family
On Nucleo144 boards for L4, L5, U5 Arduino connector pins D0/D1 have a different configuration. According to the User manuals for - [L4 boards]( https://www.st.com/resource/en/user_manual/um2179-stm32-nucleo144-boards-mb1312-stmicroelectronics.pdf), D0/D1 are GPIOs PD9/PD8 - [L5 boards](https://www.st.com/resource/en/user_manual/um2581-stm32l5-nucleo144-board-mb1361-stmicroelectronics.pdf), D0/D1 are GPIOs PD9/PD8 - [U5 boards](https://www.st.com/resource/en/user_manual/um2861-stm32u5-nucleo144-board-mb1549-stmicroelectronics.pdf), D0/D1 are GPIOs PG8/PG7
1 parent 543714f commit 6bc840e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

boards/common/nucleo144/include/arduino_iomap.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,17 @@ extern "C" {
3030
* @{
3131
*/
3232
#if defined(CPU_MODEL_STM32F303ZE)
33-
#define ARDUINO_PIN_0 GPIO_PIN(PORT_C, 5)
34-
#define ARDUINO_PIN_1 GPIO_PIN(PORT_C, 4)
33+
# define ARDUINO_PIN_0 GPIO_PIN(PORT_C, 5)
34+
# define ARDUINO_PIN_1 GPIO_PIN(PORT_C, 4)
35+
#elif defined(CPU_FAM_STM32L4) || defined(CPU_FAM_STM32L5)
36+
# define ARDUINO_PIN_0 GPIO_PIN(PORT_D, 9)
37+
# define ARDUINO_PIN_1 GPIO_PIN(PORT_D, 8)
38+
#elif defined(CPU_FAM_STM32U5)
39+
# define ARDUINO_PIN_0 GPIO_PIN(PORT_G, 8)
40+
# define ARDUINO_PIN_1 GPIO_PIN(PORT_G, 7)
3541
#else
36-
#define ARDUINO_PIN_0 GPIO_PIN(PORT_G, 9)
37-
#define ARDUINO_PIN_1 GPIO_PIN(PORT_G, 14)
42+
# define ARDUINO_PIN_0 GPIO_PIN(PORT_G, 9)
43+
# define ARDUINO_PIN_1 GPIO_PIN(PORT_G, 14)
3844
#endif
3945
#define ARDUINO_PIN_2 GPIO_PIN(PORT_F, 15)
4046
#define ARDUINO_PIN_3 GPIO_PIN(PORT_E, 13)

0 commit comments

Comments
 (0)