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

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

commit 8e5e3c081a8921c407eafd97b2c0e077762bbb61
Author: Daniel P. Carvalho <[email protected]>
AuthorDate: Sun Sep 20 19:08:42 2026 -0300

    arch/arm/stm32h7: configure the PPS pin only with STM32_ETH_PTP_GPIO.
    
    The driver configured the pulse-per-second pin whenever STM32_ETH_PTP
    was set, so a board that uses the timestamp unit without the pin still
    had to define GPIO_ETH_PPS_OUT, and the pin was taken away from other
    uses. The STM32F4 driver configures the pin with STM32_ETH_PTP_GPIO,
    the option meant for it, but that option could not be selected on the
    STM32H7, because it depended on the legacy STM32 families.
    
    Configure the pin only with STM32_ETH_PTP_GPIO, and allow that option
    on the STM32H7 and STM32H5.
    
    Signed-off-by: Daniel P. Carvalho <[email protected]>
    Assisted-by: Claude:claude-sonnet-5
---
 arch/arm/src/common/stm32/Kconfig.eth | 2 +-
 arch/arm/src/stm32h7/stm32_ethernet.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/common/stm32/Kconfig.eth 
b/arch/arm/src/common/stm32/Kconfig.eth
index dabdbc78458..827b721a269 100644
--- a/arch/arm/src/common/stm32/Kconfig.eth
+++ b/arch/arm/src/common/stm32/Kconfig.eth
@@ -169,7 +169,7 @@ config STM32_ETH_ENHANCEDDESC
 
 config STM32_ETH_PTP_GPIO
        bool "PTP pulse-per-second output signal"
-       depends on STM32_COMMON_LEGACY && STM32_ETH_PTP
+       depends on (STM32_COMMON_LEGACY || STM32_COMMON_H7_H5) && STM32_ETH_PTP
        default n
        ---help---
                Enables pulse-per-second output on GPIO pin.
diff --git a/arch/arm/src/stm32h7/stm32_ethernet.c 
b/arch/arm/src/stm32h7/stm32_ethernet.c
index 341b20bf802..d6e5e36a776 100644
--- a/arch/arm/src/stm32h7/stm32_ethernet.c
+++ b/arch/arm/src/stm32h7/stm32_ethernet.c
@@ -3795,7 +3795,7 @@ static inline void stm32_ethgpioconfig(struct 
stm32_ethmac_s *priv)
 #  endif
 #endif
 
-#ifdef CONFIG_STM32_ETH_PTP
+#ifdef CONFIG_STM32_ETH_PTP_GPIO
   /* Enable pulse-per-second (PPS) output signal */
 
   stm32_configgpio(GPIO_ETH_PPS_OUT);

Reply via email to