From 1f3dfd8875a3350e1cacab3fa1bb216c19a5160d Mon Sep 17 00:00:00 2001 From: Laurent MEUNIER Date: Thu, 2 Nov 2017 13:10:57 +0100 Subject: [PATCH] STM32: Extend Ethernet RMII workaround to all applicable devices part of F77x/F76x series. --- .../lwip-eth/arch/TARGET_STM/stm32xx_emac.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_STM/stm32xx_emac.c b/features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_STM/stm32xx_emac.c index 0ec2b16e48..134cea811d 100644 --- a/features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_STM/stm32xx_emac.c +++ b/features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_STM/stm32xx_emac.c @@ -46,7 +46,8 @@ static sys_mutex_t tx_lock_mutex; /* function */ static void _eth_arch_rx_task(void *arg); static void _eth_arch_phy_task(void *arg); -#if defined (TARGET_NUCLEO_F767ZI) +#if defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx)\ + || defined (STM32F779xx) static void _rmii_watchdog(void *arg); #endif @@ -375,9 +376,10 @@ static void _eth_arch_phy_task(void *arg) } } -#if defined (TARGET_NUCLEO_F767ZI) +#if defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx)\ + || defined (STM32F779xx) /** - * workaround for the ETH RMII bug in STM32F769 Cut1.0 + * workaround for the ETH RMII bug in STM32F76x and STM32F77x revA * * \param[in] netif the lwip network interface structure */ @@ -497,7 +499,8 @@ err_t eth_arch_enetif_init(struct netif *netif) /* initialize the hardware */ _eth_arch_low_level_init(netif); -#if defined (TARGET_NUCLEO_F767ZI) +#if defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx)\ + || defined (STM32F779xx) sys_thread_new("stm32_rmii_watchdog", _rmii_watchdog, netif, DEFAULT_THREAD_STACKSIZE, osPriorityLow); #endif