This is an automated email from the ASF dual-hosted git repository.

simbit18 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 0efe8c4f42e boards/stm32g4: migrate to new pinmap
0efe8c4f42e is described below

commit 0efe8c4f42e5b5f982d7644fe9dc90afb8f67a31
Author: raiden00pl <[email protected]>
AuthorDate: Thu Apr 23 12:51:05 2026 +0200

    boards/stm32g4: migrate to new pinmap
    
    migrate stm32g4 to new pinmap
    
    Signed-off-by: raiden00pl <[email protected]>
---
 .../b-g474e-dpow1/configs/buckboost/defconfig      |  1 +
 .../arm/stm32/b-g474e-dpow1/configs/nsh/defconfig  |  1 +
 .../stm32/b-g474e-dpow1/configs/ostest/defconfig   |  1 +
 boards/arm/stm32/b-g474e-dpow1/include/board.h     |  7 +++++
 boards/arm/stm32/b-g474e-dpow1/src/stm32_smps.c    |  4 +--
 .../arm/stm32/nucleo-g431kb/configs/comp/defconfig |  1 +
 .../arm/stm32/nucleo-g431kb/configs/nsh/defconfig  |  1 +
 .../arm/stm32/nucleo-g431kb/configs/pwm/defconfig  |  1 +
 boards/arm/stm32/nucleo-g431kb/include/board.h     |  2 +-
 .../arm/stm32/nucleo-g431rb/configs/adc/defconfig  |  1 +
 .../arm/stm32/nucleo-g431rb/configs/can/defconfig  |  1 +
 .../stm32/nucleo-g431rb/configs/cansock/defconfig  |  1 +
 .../stm32/nucleo-g431rb/configs/cordic/defconfig   |  1 +
 .../nucleo-g431rb/configs/ihm16m1_b16/defconfig    |  1 +
 .../nucleo-g431rb/configs/ihm16m1_f32/defconfig    |  1 +
 .../arm/stm32/nucleo-g431rb/configs/nsh/defconfig  |  1 +
 .../arm/stm32/nucleo-g431rb/configs/pwm/defconfig  |  1 +
 .../stm32/nucleo-g431rb/configs/qenco/defconfig    |  1 +
 boards/arm/stm32/nucleo-g431rb/include/board.h     | 30 +++++++++++-----------
 boards/arm/stm32/nucleo-g431rb/src/stm32_adc.c     | 18 ++++++-------
 .../stm32/nucleo-g431rb/src/stm32_foc_ihm16m1.c    | 10 ++++----
 .../nucleo-g474re/configs/lpuartnsh/defconfig      |  1 +
 .../arm/stm32/nucleo-g474re/configs/nsh/defconfig  |  1 +
 .../nucleo-g474re/configs/usbserial/defconfig      |  1 +
 24 files changed, 57 insertions(+), 32 deletions(-)

diff --git a/boards/arm/stm32/b-g474e-dpow1/configs/buckboost/defconfig 
b/boards/arm/stm32/b-g474e-dpow1/configs/buckboost/defconfig
index d4b0d8d1820..a05d45e4a25 100644
--- a/boards/arm/stm32/b-g474e-dpow1/configs/buckboost/defconfig
+++ b/boards/arm/stm32/b-g474e-dpow1/configs/buckboost/defconfig
@@ -6,6 +6,7 @@
 # modifications.
 #
 # CONFIG_ARCH_LEDS is not set
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ADC=y
 CONFIG_ANALOG=y
 CONFIG_ARCH="arm"
diff --git a/boards/arm/stm32/b-g474e-dpow1/configs/nsh/defconfig 
b/boards/arm/stm32/b-g474e-dpow1/configs/nsh/defconfig
index 862d0444ae9..f21f315c9bb 100644
--- a/boards/arm/stm32/b-g474e-dpow1/configs/nsh/defconfig
+++ b/boards/arm/stm32/b-g474e-dpow1/configs/nsh/defconfig
@@ -7,6 +7,7 @@
 #
 # CONFIG_ARCH_LEDS is not set
 # CONFIG_DISABLE_OS_API is not set
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ARCH="arm"
 CONFIG_ARCH_BOARD="b-g474e-dpow1"
 CONFIG_ARCH_BOARD_B_G474E_DPOW1=y
diff --git a/boards/arm/stm32/b-g474e-dpow1/configs/ostest/defconfig 
b/boards/arm/stm32/b-g474e-dpow1/configs/ostest/defconfig
index 0259379cd25..e2559af6cb5 100644
--- a/boards/arm/stm32/b-g474e-dpow1/configs/ostest/defconfig
+++ b/boards/arm/stm32/b-g474e-dpow1/configs/ostest/defconfig
@@ -7,6 +7,7 @@
 #
 # CONFIG_ARCH_LEDS is not set
 # CONFIG_DISABLE_OS_API is not set
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ARCH="arm"
 CONFIG_ARCH_BOARD="b-g474e-dpow1"
 CONFIG_ARCH_BOARD_B_G474E_DPOW1=y
diff --git a/boards/arm/stm32/b-g474e-dpow1/include/board.h 
b/boards/arm/stm32/b-g474e-dpow1/include/board.h
index f3b1205ea28..03a0e8edd1a 100644
--- a/boards/arm/stm32/b-g474e-dpow1/include/board.h
+++ b/boards/arm/stm32/b-g474e-dpow1/include/board.h
@@ -246,4 +246,11 @@
 
 #endif /* CONFIG_EXAMPLES_SMPS */
 
+/* HRTIM */
+
+#define GPIO_HRTIM1_CHC1   GPIO_HRTIM1_CHC1_0
+#define GPIO_HRTIM1_CHC2   GPIO_HRTIM1_CHC2_0
+#define GPIO_HRTIM1_CHD1   GPIO_HRTIM1_CHD1_0
+#define GPIO_HRTIM1_CHD2   GPIO_HRTIM1_CHD2_0
+
 #endif /* __BOARDS_ARM_STM32_B_G474E_DPOW1_INCLUDE_BOARD_H */
diff --git a/boards/arm/stm32/b-g474e-dpow1/src/stm32_smps.c 
b/boards/arm/stm32/b-g474e-dpow1/src/stm32_smps.c
index 1f7f8445163..3b8f492a895 100644
--- a/boards/arm/stm32/b-g474e-dpow1/src/stm32_smps.c
+++ b/boards/arm/stm32/b-g474e-dpow1/src/stm32_smps.c
@@ -308,8 +308,8 @@ static const uint8_t g_adc1chan[ADC1_NCHANNELS] =
 
 static const uint32_t g_adc1pins[ADC1_NCHANNELS] =
 {
-  GPIO_ADC1_IN2,                /* PA1 - V_IN */
-  GPIO_ADC1_IN4,                /* PA3 - V_OUT */
+  GPIO_ADC1_IN2_0,                /* PA1 - V_IN */
+  GPIO_ADC1_IN4_0,                /* PA3 - V_OUT */
 };
 
 /****************************************************************************
diff --git a/boards/arm/stm32/nucleo-g431kb/configs/comp/defconfig 
b/boards/arm/stm32/nucleo-g431kb/configs/comp/defconfig
index f3b26313ec2..2c4172a3ebc 100644
--- a/boards/arm/stm32/nucleo-g431kb/configs/comp/defconfig
+++ b/boards/arm/stm32/nucleo-g431kb/configs/comp/defconfig
@@ -5,6 +5,7 @@
 # You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
 # modifications.
 #
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ANALOG=y
 CONFIG_ARCH="arm"
 CONFIG_ARCH_BOARD="nucleo-g431kb"
diff --git a/boards/arm/stm32/nucleo-g431kb/configs/nsh/defconfig 
b/boards/arm/stm32/nucleo-g431kb/configs/nsh/defconfig
index 413ff8b06f3..73f45523640 100644
--- a/boards/arm/stm32/nucleo-g431kb/configs/nsh/defconfig
+++ b/boards/arm/stm32/nucleo-g431kb/configs/nsh/defconfig
@@ -10,6 +10,7 @@
 # CONFIG_NSH_CMDOPT_HEXDUMP is not set
 # CONFIG_NSH_DISABLE_IFCONFIG is not set
 # CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ARCH="arm"
 CONFIG_ARCH_BOARD="nucleo-g431kb"
 CONFIG_ARCH_BOARD_NUCLEO_G431KB=y
diff --git a/boards/arm/stm32/nucleo-g431kb/configs/pwm/defconfig 
b/boards/arm/stm32/nucleo-g431kb/configs/pwm/defconfig
index 91c892595e9..c68b6694533 100644
--- a/boards/arm/stm32/nucleo-g431kb/configs/pwm/defconfig
+++ b/boards/arm/stm32/nucleo-g431kb/configs/pwm/defconfig
@@ -5,6 +5,7 @@
 # You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
 # modifications.
 #
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ARCH="arm"
 CONFIG_ARCH_BOARD="nucleo-g431kb"
 CONFIG_ARCH_BOARD_NUCLEO_G431KB=y
diff --git a/boards/arm/stm32/nucleo-g431kb/include/board.h 
b/boards/arm/stm32/nucleo-g431kb/include/board.h
index 7c3a12b16ed..c5e339abd03 100644
--- a/boards/arm/stm32/nucleo-g431kb/include/board.h
+++ b/boards/arm/stm32/nucleo-g431kb/include/board.h
@@ -240,7 +240,7 @@
 
 /* TIM1 PWM */
 
-#define GPIO_TIM1_CH1OUT  GPIO_TIM1_CH1OUT_1  /* PA8 */
+#define GPIO_TIM1_CH1OUT  (GPIO_TIM1_CH1OUT_1|GPIO_SPEED_50MHz)  /* PA8 */
 
 /* Comparators configuration ************************************************/
 
diff --git a/boards/arm/stm32/nucleo-g431rb/configs/adc/defconfig 
b/boards/arm/stm32/nucleo-g431rb/configs/adc/defconfig
index ef15025a1b5..8b824a0bb97 100644
--- a/boards/arm/stm32/nucleo-g431rb/configs/adc/defconfig
+++ b/boards/arm/stm32/nucleo-g431rb/configs/adc/defconfig
@@ -7,6 +7,7 @@
 #
 # CONFIG_ARCH_FPU is not set
 # CONFIG_LIBC_LONG_LONG is not set
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 # CONFIG_SYSTEM_DD is not set
 CONFIG_ADC=y
 CONFIG_ANALOG=y
diff --git a/boards/arm/stm32/nucleo-g431rb/configs/can/defconfig 
b/boards/arm/stm32/nucleo-g431rb/configs/can/defconfig
index 7cc16beb1e0..e8dc81283f5 100644
--- a/boards/arm/stm32/nucleo-g431rb/configs/can/defconfig
+++ b/boards/arm/stm32/nucleo-g431rb/configs/can/defconfig
@@ -10,6 +10,7 @@
 # CONFIG_NSH_CMDOPT_HEXDUMP is not set
 # CONFIG_NSH_DISABLE_IFCONFIG is not set
 # CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ARCH="arm"
 CONFIG_ARCH_BOARD="nucleo-g431rb"
 CONFIG_ARCH_BOARD_NUCLEO_G431RB=y
diff --git a/boards/arm/stm32/nucleo-g431rb/configs/cansock/defconfig 
b/boards/arm/stm32/nucleo-g431rb/configs/cansock/defconfig
index 89860edf04d..e0d9a634a33 100644
--- a/boards/arm/stm32/nucleo-g431rb/configs/cansock/defconfig
+++ b/boards/arm/stm32/nucleo-g431rb/configs/cansock/defconfig
@@ -7,6 +7,7 @@
 #
 # CONFIG_NET_ETHERNET is not set
 # CONFIG_NET_IPv4 is not set
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ALLOW_BSD_COMPONENTS=y
 CONFIG_ARCH="arm"
 CONFIG_ARCH_BOARD="nucleo-g431rb"
diff --git a/boards/arm/stm32/nucleo-g431rb/configs/cordic/defconfig 
b/boards/arm/stm32/nucleo-g431rb/configs/cordic/defconfig
index 1a147fd8956..ead5e4e83f6 100644
--- a/boards/arm/stm32/nucleo-g431rb/configs/cordic/defconfig
+++ b/boards/arm/stm32/nucleo-g431rb/configs/cordic/defconfig
@@ -10,6 +10,7 @@
 # CONFIG_NSH_CMDOPT_HEXDUMP is not set
 # CONFIG_NSH_DISABLE_IFCONFIG is not set
 # CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ARCH="arm"
 CONFIG_ARCH_BOARD="nucleo-g431rb"
 CONFIG_ARCH_BOARD_NUCLEO_G431RB=y
diff --git a/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_b16/defconfig 
b/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_b16/defconfig
index 85b2bacc479..b417c731674 100644
--- a/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_b16/defconfig
+++ b/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_b16/defconfig
@@ -7,6 +7,7 @@
 #
 # CONFIG_DISABLE_MQUEUE is not set
 # CONFIG_DISABLE_PTHREAD is not set
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ADC=y
 CONFIG_ADC_FIFOSIZE=3
 CONFIG_ANALOG=y
diff --git a/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_f32/defconfig 
b/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_f32/defconfig
index f624a8a363c..ebee546e5a7 100644
--- a/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_f32/defconfig
+++ b/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_f32/defconfig
@@ -7,6 +7,7 @@
 #
 # CONFIG_DISABLE_MQUEUE is not set
 # CONFIG_DISABLE_PTHREAD is not set
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ADC=y
 CONFIG_ADC_FIFOSIZE=3
 CONFIG_ANALOG=y
diff --git a/boards/arm/stm32/nucleo-g431rb/configs/nsh/defconfig 
b/boards/arm/stm32/nucleo-g431rb/configs/nsh/defconfig
index 6b2c0c9aa21..81e6008dced 100644
--- a/boards/arm/stm32/nucleo-g431rb/configs/nsh/defconfig
+++ b/boards/arm/stm32/nucleo-g431rb/configs/nsh/defconfig
@@ -10,6 +10,7 @@
 # CONFIG_NSH_CMDOPT_HEXDUMP is not set
 # CONFIG_NSH_DISABLE_IFCONFIG is not set
 # CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ARCH="arm"
 CONFIG_ARCH_BOARD="nucleo-g431rb"
 CONFIG_ARCH_BOARD_NUCLEO_G431RB=y
diff --git a/boards/arm/stm32/nucleo-g431rb/configs/pwm/defconfig 
b/boards/arm/stm32/nucleo-g431rb/configs/pwm/defconfig
index 968f011802d..b3e2f85e2fa 100644
--- a/boards/arm/stm32/nucleo-g431rb/configs/pwm/defconfig
+++ b/boards/arm/stm32/nucleo-g431rb/configs/pwm/defconfig
@@ -5,6 +5,7 @@
 # You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
 # modifications.
 #
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ARCH="arm"
 CONFIG_ARCH_BOARD="nucleo-g431rb"
 CONFIG_ARCH_BOARD_NUCLEO_G431RB=y
diff --git a/boards/arm/stm32/nucleo-g431rb/configs/qenco/defconfig 
b/boards/arm/stm32/nucleo-g431rb/configs/qenco/defconfig
index 4e03c01cc28..7f5474f7ce4 100644
--- a/boards/arm/stm32/nucleo-g431rb/configs/qenco/defconfig
+++ b/boards/arm/stm32/nucleo-g431rb/configs/qenco/defconfig
@@ -10,6 +10,7 @@
 # CONFIG_NSH_CMDOPT_HEXDUMP is not set
 # CONFIG_NSH_DISABLE_IFCONFIG is not set
 # CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ARCH="arm"
 CONFIG_ARCH_BOARD="nucleo-g431rb"
 CONFIG_ARCH_BOARD_COMMON=y
diff --git a/boards/arm/stm32/nucleo-g431rb/include/board.h 
b/boards/arm/stm32/nucleo-g431rb/include/board.h
index b17ee0d8aaa..d0276b130af 100644
--- a/boards/arm/stm32/nucleo-g431rb/include/board.h
+++ b/boards/arm/stm32/nucleo-g431rb/include/board.h
@@ -320,8 +320,8 @@
 
 /* TIM2 input ***************************************************************/
 
-#define GPIO_TIM2_CH1IN (GPIO_TIM2_CH1IN_3 | GPIO_PULLUP) /* PA15 */
-#define GPIO_TIM2_CH2IN (GPIO_TIM2_CH2IN_2 | GPIO_PULLUP) /* PB3 */
+#define GPIO_TIM2_CH1IN (GPIO_TIM2_CH1IN_3 | GPIO_PULLUP | GPIO_SPEED_50MHz) 
/* PA15 */
+#define GPIO_TIM2_CH2IN (GPIO_TIM2_CH2IN_2 | GPIO_PULLUP | GPIO_SPEED_50MHz) 
/* PB3 */
 
 /* USART2 (STLINK Virtual COM Port) */
 
@@ -332,18 +332,18 @@
 
 /* TIM1 PWM */
 
-#define GPIO_TIM1_CH1OUT  GPIO_TIM1_CH1OUT_1  /* PA8 */
-#define GPIO_TIM1_CH1NOUT GPIO_TIM1_CH1NOUT_2 /* PA11 */
-#define GPIO_TIM1_CH2OUT  GPIO_TIM1_CH2OUT_1  /* PA9 */
-#define GPIO_TIM1_CH2NOUT GPIO_TIM1_CH2NOUT_1 /* PA12 */
-#define GPIO_TIM1_CH3OUT  GPIO_TIM1_CH3OUT_1  /* PA10 */
-#define GPIO_TIM1_CH3NOUT GPIO_TIM1_CH3NOUT_1 /* PB1 */
-#define GPIO_TIM1_CH4OUT  GPIO_TIM1_CH4OUT_2  /* PC3 */
+#define GPIO_TIM1_CH1OUT  (GPIO_TIM1_CH1OUT_1|GPIO_SPEED_50MHz)  /* PA8 */
+#define GPIO_TIM1_CH1NOUT (GPIO_TIM1_CH1NOUT_2|GPIO_SPEED_50MHz) /* PA11 */
+#define GPIO_TIM1_CH2OUT  (GPIO_TIM1_CH2OUT_1|GPIO_SPEED_50MHz)  /* PA9 */
+#define GPIO_TIM1_CH2NOUT (GPIO_TIM1_CH2NOUT_1|GPIO_SPEED_50MHz) /* PA12 */
+#define GPIO_TIM1_CH3OUT  (GPIO_TIM1_CH3OUT_1|GPIO_SPEED_50MHz)  /* PA10 */
+#define GPIO_TIM1_CH3NOUT (GPIO_TIM1_CH3NOUT_1|GPIO_SPEED_50MHz) /* PB1 */
+#define GPIO_TIM1_CH4OUT  (GPIO_TIM1_CH4OUT_2|GPIO_SPEED_50MHz)  /* PC3 */
 
 /* CAN configuration ********************************************************/
 
-#define GPIO_FDCAN1_RX GPIO_FDCAN1_RX_2 /* PB8 */
-#define GPIO_FDCAN1_TX GPIO_FDCAN1_TX_2 /* PB9 */
+#define GPIO_FDCAN1_RX (GPIO_FDCAN1_RX_2|GPIO_SPEED_50MHz) /* PB8 */
+#define GPIO_FDCAN1_TX (GPIO_FDCAN1_TX_2|GPIO_SPEED_50MHz) /* PB9 */
 
 /* DMA channels *************************************************************/
 
@@ -364,10 +364,10 @@
 
 /* TIM1 configuration *******************************************************/
 
-#  define GPIO_TIM1_CH1OUT   GPIO_TIM1_CH1OUT_1 /* TIM1 CH1  - PA8  - U high */
-#  define GPIO_TIM1_CH2OUT   GPIO_TIM1_CH2OUT_1 /* TIM1 CH2  - PA9  - V high */
-#  define GPIO_TIM1_CH3OUT   GPIO_TIM1_CH3OUT_1 /* TIM1 CH3  - PA10 - W high */
-#  define GPIO_TIM1_CH4OUT   0                  /* not used as output */
+#  define GPIO_TIM1_CH1OUT   (GPIO_TIM1_CH1OUT_1|GPIO_SPEED_50MHz) /* TIM1 CH1 
 - PA8  - U high */
+#  define GPIO_TIM1_CH2OUT   (GPIO_TIM1_CH2OUT_1|GPIO_SPEED_50MHz) /* TIM1 CH2 
 - PA9  - V high */
+#  define GPIO_TIM1_CH3OUT   (GPIO_TIM1_CH3OUT_1|GPIO_SPEED_50MHz) /* TIM1 CH3 
 - PA10 - W high */
+#  define GPIO_TIM1_CH4OUT   0                                     /* not used 
as output */
 
 /* UVW ENABLE */
 
diff --git a/boards/arm/stm32/nucleo-g431rb/src/stm32_adc.c 
b/boards/arm/stm32/nucleo-g431rb/src/stm32_adc.c
index be6f702ebc7..c2b993d18fe 100644
--- a/boards/arm/stm32/nucleo-g431rb/src/stm32_adc.c
+++ b/boards/arm/stm32/nucleo-g431rb/src/stm32_adc.c
@@ -89,9 +89,9 @@ static const uint8_t g_chanlist1[3] =
 
 static const uint32_t g_pinlist1[3]  =
 {
-  GPIO_ADC1_IN1,                /* PA0/A0 */
-  GPIO_ADC1_IN2,                /* PA1/A1 */
-  GPIO_ADC1_IN15,               /* PB0/A3 */
+  GPIO_ADC1_IN1_0,                /* PA0/A0 */
+  GPIO_ADC1_IN2_0,                /* PA1/A1 */
+  GPIO_ADC1_IN15_0,               /* PB0/A3 */
 };
 
 #elif DEV1_PORT == 2
@@ -111,9 +111,9 @@ static const uint8_t g_chanlist1[3] =
 
 static const uint32_t g_pinlist1[3] =
 {
-  GPIO_ADC2_IN17,               /* PA4/A2 */
-  GPIO_ADC2_IN7,                /* PC1/A4 */
-  GPIO_ADC2_IN6,                /* PC0/A5 */
+  GPIO_ADC2_IN17_0,               /* PA4/A2 */
+  GPIO_ADC2_IN7_0,                /* PC1/A4 */
+  GPIO_ADC2_IN6_0,                /* PC0/A5 */
 };
 
 #endif /* DEV1_PORT == 1 */
@@ -139,9 +139,9 @@ static const uint8_t g_chanlist2[3] =
 
 static const uint32_t g_pinlist2[3] =
 {
-  GPIO_ADC2_IN17,               /* PA4/A2 */
-  GPIO_ADC2_IN7,                /* PC1/A4 */
-  GPIO_ADC2_IN6,                /* PC0/A5 */
+  GPIO_ADC2_IN17_0,               /* PA4/A2 */
+  GPIO_ADC2_IN7_0,                /* PC1/A4 */
+  GPIO_ADC2_IN6_0,                /* PC0/A5 */
 };
 
 #endif /* DEV2_PORT == 2 */
diff --git a/boards/arm/stm32/nucleo-g431rb/src/stm32_foc_ihm16m1.c 
b/boards/arm/stm32/nucleo-g431rb/src/stm32_foc_ihm16m1.c
index ba879df6a36..290c97f82ad 100644
--- a/boards/arm/stm32/nucleo-g431rb/src/stm32_foc_ihm16m1.c
+++ b/boards/arm/stm32/nucleo-g431rb/src/stm32_foc_ihm16m1.c
@@ -102,17 +102,17 @@ static uint8_t g_adc1_chan[] =
 static uint32_t g_adc1_pins[] =
 {
 #ifdef CONFIG_BOARD_STM32_IHM16M1_VBUS
-  GPIO_ADC1_IN1,
+  GPIO_ADC1_IN1_0,
 #endif
 #ifdef CONFIG_BOARD_STM32_IHM16M1_POT
-  GPIO_ADC1_IN8,
+  GPIO_ADC1_IN8_0,
 #endif
-  GPIO_ADC1_IN2,
+  GPIO_ADC1_IN2_0,
 #if CONFIG_MOTOR_FOC_SHUNTS > 1
-  GPIO_ADC1_IN12,
+  GPIO_ADC1_IN12_0,
 #endif
 #if CONFIG_MOTOR_FOC_SHUNTS > 2
-  GPIO_ADC1_IN15,
+  GPIO_ADC1_IN15_0,
 #endif
 };
 
diff --git a/boards/arm/stm32/nucleo-g474re/configs/lpuartnsh/defconfig 
b/boards/arm/stm32/nucleo-g474re/configs/lpuartnsh/defconfig
index 47b0057c2a0..dd4c0682377 100644
--- a/boards/arm/stm32/nucleo-g474re/configs/lpuartnsh/defconfig
+++ b/boards/arm/stm32/nucleo-g474re/configs/lpuartnsh/defconfig
@@ -7,6 +7,7 @@
 #
 # CONFIG_ARCH_LEDS is not set
 # CONFIG_DISABLE_OS_API is not set
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ARCH="arm"
 CONFIG_ARCH_BOARD="nucleo-g474re"
 CONFIG_ARCH_BOARD_NUCLEO_G474RE=y
diff --git a/boards/arm/stm32/nucleo-g474re/configs/nsh/defconfig 
b/boards/arm/stm32/nucleo-g474re/configs/nsh/defconfig
index 6eb718bf7b8..f9cd22cc647 100644
--- a/boards/arm/stm32/nucleo-g474re/configs/nsh/defconfig
+++ b/boards/arm/stm32/nucleo-g474re/configs/nsh/defconfig
@@ -7,6 +7,7 @@
 #
 # CONFIG_ARCH_LEDS is not set
 # CONFIG_DISABLE_OS_API is not set
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ARCH="arm"
 CONFIG_ARCH_BOARD="nucleo-g474re"
 CONFIG_ARCH_BOARD_NUCLEO_G474RE=y
diff --git a/boards/arm/stm32/nucleo-g474re/configs/usbserial/defconfig 
b/boards/arm/stm32/nucleo-g474re/configs/usbserial/defconfig
index aaeffaccab3..9c0705079c7 100644
--- a/boards/arm/stm32/nucleo-g474re/configs/usbserial/defconfig
+++ b/boards/arm/stm32/nucleo-g474re/configs/usbserial/defconfig
@@ -7,6 +7,7 @@
 #
 # CONFIG_ARCH_LEDS is not set
 # CONFIG_DISABLE_OS_API is not set
+# CONFIG_STM32_USE_LEGACY_PINMAP is not set
 CONFIG_ARCH="arm"
 CONFIG_ARCH_BOARD="nucleo-g474re"
 CONFIG_ARCH_BOARD_NUCLEO_G474RE=y

Reply via email to