diff --git a/os/hal/ports/STM32/LLD/MACv1/mac_lld.c b/os/hal/ports/STM32/LLD/MACv1/mac_lld.c index 5142df163..3679d33dd 100644 --- a/os/hal/ports/STM32/LLD/MACv1/mac_lld.c +++ b/os/hal/ports/STM32/LLD/MACv1/mac_lld.c @@ -173,7 +173,7 @@ static void mac_lld_set_address(const uint8_t *p) { /* Driver interrupt handlers. */ /*===========================================================================*/ -OSAL_IRQ_HANDLER(ETH_IRQHandler) { +OSAL_IRQ_HANDLER(STM32_ETH_HANDLER) { uint32_t dmasr; OSAL_IRQ_PROLOGUE(); @@ -308,7 +308,7 @@ void mac_lld_start(MACDriver *macp) { #endif /* ISR vector enabled.*/ - nvicEnableVector(ETH_IRQn, STM32_MAC_ETH1_IRQ_PRIORITY); + nvicEnableVector(STM32_ETH_NUMBER, STM32_MAC_ETH1_IRQ_PRIORITY); #if STM32_MAC_ETH1_CHANGE_PHY_STATE /* PHY in power up mode.*/ @@ -382,7 +382,7 @@ void mac_lld_stop(MACDriver *macp) { rccDisableETH(false); /* ISR vector disabled.*/ - nvicDisableVector(ETH_IRQn); + nvicDisableVector(STM32_ETH_NUMBER); } } diff --git a/os/hal/ports/STM32/STM32F1xx/stm32_registry.h b/os/hal/ports/STM32/STM32F1xx/stm32_registry.h index f694c79c3..62a792e66 100644 --- a/os/hal/ports/STM32/STM32F1xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32F1xx/stm32_registry.h @@ -1141,6 +1141,8 @@ /* ETH attributes.*/ #define STM32_HAS_ETH TRUE +#define STM32_ETH_HANDLER Vector134 +#define STM32_ETH_NUMBER 61 /* EXTI attributes.*/ #define STM32_EXTI_NUM_LINES 20 diff --git a/os/hal/ports/STM32/STM32F4xx/stm32_registry.h b/os/hal/ports/STM32/STM32F4xx/stm32_registry.h index 23ee93b21..03007c976 100644 --- a/os/hal/ports/STM32/STM32F4xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32F4xx/stm32_registry.h @@ -144,6 +144,8 @@ /* ETH attributes.*/ #define STM32_HAS_ETH TRUE +#define STM32_ETH_HANDLER Vector134 +#define STM32_ETH_NUMBER 61 /* EXTI attributes.*/ #define STM32_EXTI_NUM_LINES 23 @@ -485,6 +487,8 @@ #define STM32_HAS_ETH FALSE #else #define STM32_HAS_ETH TRUE +#define STM32_ETH_HANDLER Vector134 +#define STM32_ETH_NUMBER 61 #endif /* EXTI attributes.*/ diff --git a/readme.txt b/readme.txt index a236a0bf9..572b5d12f 100644 --- a/readme.txt +++ b/readme.txt @@ -97,6 +97,7 @@ (bug #625). - RT: Fixed missing configuration options from NIL and RT PPC ports (bug #625). +- HAL: Fixed broken MAC driver for STM32F107 (bug #626)(backported to 3.0.1). - HAL: Fixed wrong offset in STM32 DAC driver (bug #624)(backported to 3.0.1). - HAL: Fixed crash on STM32F030x4/6 devices (bug #623)(backported to 3.0.1). - HAL: Fixed duplicated doxygen tag in STM32F4xx hal_lld.h file (bug #621)