Skip to content

Commit 5c8e60f

Browse files
authored
Merge pull request #15358 from akiroz/fix-stm32-emac-rmii-pins
fix(drivers/emac): [mbed6] Remove incorrect RMII RX ER initialization
2 parents 0ca0db4 + 0431f16 commit 5c8e60f

File tree

9 files changed

+76
-45
lines changed

9 files changed

+76
-45
lines changed

connectivity/drivers/emac/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/stm32f2_eth_init.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2018, STMicroelectronics
33
* All rights reserved.
4+
* SPDX-License-Identifier: BSD-3-Clause
45
*
56
* Redistribution and use in source and binary forms, with or without
67
* modification, are permitted provided that the following conditions are met:
@@ -51,7 +52,7 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
5152
RMII_MII_CRS_DV -------------------> PA7
5253
RMII_MII_RXD0 ---------------------> PC4
5354
RMII_MII_RXD1 ---------------------> PC5
54-
RMII_MII_RXER ---------------------> PG2
55+
RMII_MII_RXER ---------------------> none
5556
RMII_MII_TX_EN --------------------> PG11
5657
RMII_MII_TXD0 ---------------------> PG13
5758
RMII_MII_TXD1 ---------------------> PB13
@@ -72,8 +73,8 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
7273
GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5;
7374
HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);
7475

75-
/* Configure PG2, PG11 and PG13 */
76-
GPIO_InitStructure.Pin = GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13;
76+
/* Configure PG11 and PG13 */
77+
GPIO_InitStructure.Pin = GPIO_PIN_11 | GPIO_PIN_13;
7778
HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);
7879

7980
/* Enable the Ethernet global Interrupt */
@@ -101,15 +102,15 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth)
101102
RMII_MII_CRS_DV -------------------> PA7
102103
RMII_MII_RXD0 ---------------------> PC4
103104
RMII_MII_RXD1 ---------------------> PC5
104-
RMII_MII_RXER ---------------------> PG2
105+
RMII_MII_RXER ---------------------> none
105106
RMII_MII_TX_EN --------------------> PG11
106107
RMII_MII_TXD0 ---------------------> PG13
107108
RMII_MII_TXD1 ---------------------> PB13
108109
*/
109110
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7);
110111
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_13);
111112
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5);
112-
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13);
113+
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_11 | GPIO_PIN_13);
113114

114115
/* Disable the Ethernet global Interrupt */
115116
NVIC_DisableIRQ(ETH_IRQn);

connectivity/drivers/emac/TARGET_STM/TARGET_STM32F4/TARGET_ARCH_MAX/stm32f4_eth_init.c

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2018, STMicroelectronics
3+
* All rights reserved.
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*
6+
* Redistribution and use in source and binary forms, with or without
7+
* modification, are permitted provided that the following conditions are met:
8+
*
9+
* 1. Redistributions of source code must retain the above copyright notice,
10+
* this list of conditions and the following disclaimer.
11+
* 2. Redistributions in binary form must reproduce the above copyright notice,
12+
* this list of conditions and the following disclaimer in the documentation
13+
* and/or other materials provided with the distribution.
14+
* 3. Neither the name of STMicroelectronics nor the names of its contributors
15+
* may be used to endorse or promote products derived from this software
16+
* without specific prior written permission.
17+
*
18+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
*/
29+
130
#include "stm32f4xx_hal.h"
231

332
/**
@@ -20,7 +49,7 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
2049
RMII_MII_CRS_DV -------------------> PA7
2150
RMII_MII_RXD0 ---------------------> PC4
2251
RMII_MII_RXD1 ---------------------> PC5
23-
RMII_MII_RXER --------------------->
52+
RMII_MII_RXER ---------------------> none
2453
RMII_MII_TX_EN --------------------> PB11
2554
RMII_MII_TXD0 ---------------------> PB12
2655
RMII_MII_TXD1 ---------------------> PB13
@@ -66,7 +95,7 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth)
6695
RMII_MII_CRS_DV -------------------> PA7
6796
RMII_MII_RXD0 ---------------------> PC4
6897
RMII_MII_RXD1 ---------------------> PC5
69-
RMII_MII_RXER --------------------->
98+
RMII_MII_RXER ---------------------> none
7099
RMII_MII_TX_EN --------------------> PB11
71100
RMII_MII_TXD0 ---------------------> PB12
72101
RMII_MII_TXD1 ---------------------> PB13

connectivity/drivers/emac/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F429ZI/stm32f4_eth_init.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2018, STMicroelectronics
33
* All rights reserved.
4+
* SPDX-License-Identifier: BSD-3-Clause
45
*
56
* Redistribution and use in source and binary forms, with or without
67
* modification, are permitted provided that the following conditions are met:
@@ -51,7 +52,7 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
5152
RMII_MII_CRS_DV -------------------> PA7
5253
RMII_MII_RXD0 ---------------------> PC4
5354
RMII_MII_RXD1 ---------------------> PC5
54-
RMII_MII_RXER ---------------------> PG2
55+
RMII_MII_RXER ---------------------> none
5556
RMII_MII_TX_EN --------------------> PG11
5657
RMII_MII_TXD0 ---------------------> PG13
5758
RMII_MII_TXD1 ---------------------> PB13
@@ -72,8 +73,8 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
7273
GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5;
7374
HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);
7475

75-
/* Configure PG2, PG11 and PG13 */
76-
GPIO_InitStructure.Pin = GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13;
76+
/* Configure PG11 and PG13 */
77+
GPIO_InitStructure.Pin = GPIO_PIN_11 | GPIO_PIN_13;
7778
HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);
7879

7980
/* Enable the Ethernet global Interrupt */
@@ -101,15 +102,15 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth)
101102
RMII_MII_CRS_DV -------------------> PA7
102103
RMII_MII_RXD0 ---------------------> PC4
103104
RMII_MII_RXD1 ---------------------> PC5
104-
RMII_MII_RXER ---------------------> PG2
105+
RMII_MII_RXER ---------------------> none
105106
RMII_MII_TX_EN --------------------> PG11
106107
RMII_MII_TXD0 ---------------------> PG13
107108
RMII_MII_TXD1 ---------------------> PB13
108109
*/
109110
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7);
110111
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_13);
111112
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5);
112-
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13);
113+
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_11 | GPIO_PIN_13);
113114

114115
/* Disable the Ethernet global Interrupt */
115116
NVIC_DisableIRQ(ETH_IRQn);

connectivity/drivers/emac/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F439ZI/stm32f4_eth_init.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2018, STMicroelectronics
33
* All rights reserved.
4+
* SPDX-License-Identifier: BSD-3-Clause
45
*
56
* Redistribution and use in source and binary forms, with or without
67
* modification, are permitted provided that the following conditions are met:
@@ -51,7 +52,7 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
5152
RMII_MII_CRS_DV -------------------> PA7
5253
RMII_MII_RXD0 ---------------------> PC4
5354
RMII_MII_RXD1 ---------------------> PC5
54-
RMII_MII_RXER ---------------------> PG2
55+
RMII_MII_RXER ---------------------> none
5556
RMII_MII_TX_EN --------------------> PG11
5657
RMII_MII_TXD0 ---------------------> PG13
5758
RMII_MII_TXD1 ---------------------> PB13
@@ -72,8 +73,8 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
7273
GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5;
7374
HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);
7475

75-
/* Configure PG2, PG11 and PG13 */
76-
GPIO_InitStructure.Pin = GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13;
76+
/* Configure PG11 and PG13 */
77+
GPIO_InitStructure.Pin = GPIO_PIN_11 | GPIO_PIN_13;
7778
HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);
7879

7980
/* Enable the Ethernet global Interrupt */
@@ -101,15 +102,15 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth)
101102
RMII_MII_CRS_DV -------------------> PA7
102103
RMII_MII_RXD0 ---------------------> PC4
103104
RMII_MII_RXD1 ---------------------> PC5
104-
RMII_MII_RXER ---------------------> PG2
105+
RMII_MII_RXER ---------------------> none
105106
RMII_MII_TX_EN --------------------> PG11
106107
RMII_MII_TXD0 ---------------------> PG13
107108
RMII_MII_TXD1 ---------------------> PB13
108109
*/
109110
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7);
110111
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_13);
111112
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5);
112-
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13);
113+
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_11 | GPIO_PIN_13);
113114

114115
/* Disable the Ethernet global Interrupt */
115116
NVIC_DisableIRQ(ETH_IRQn);

connectivity/drivers/emac/TARGET_STM/TARGET_STM32F7/TARGET_DISCO_F746NG/stm32f7_eth_init.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2018, STMicroelectronics
33
* All rights reserved.
4+
* SPDX-License-Identifier: BSD-3-Clause
45
*
56
* Redistribution and use in source and binary forms, with or without
67
* modification, are permitted provided that the following conditions are met:
@@ -55,7 +56,7 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
5556
RMII_MII_CRS_DV -------------------> PA7
5657
RMII_MII_RXD0 ---------------------> PC4
5758
RMII_MII_RXD1 ---------------------> PC5
58-
RMII_MII_RXER ---------------------> PG2
59+
RMII_MII_RXER ---------------------> none
5960
RMII_MII_TX_EN --------------------> PG11
6061
RMII_MII_TXD0 ---------------------> PG13
6162
RMII_MII_TXD1 ---------------------> PG14
@@ -72,8 +73,8 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
7273
GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5;
7374
HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);
7475

75-
/* Configure PG2, PG11, PG13 and PG14 */
76-
GPIO_InitStructure.Pin = GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13 | GPIO_PIN_14;
76+
/* Configure PG11, PG13 and PG14 */
77+
GPIO_InitStructure.Pin = GPIO_PIN_11 | GPIO_PIN_13 | GPIO_PIN_14;
7778
HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);
7879

7980
/* Enable the Ethernet global Interrupt */
@@ -101,14 +102,14 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth)
101102
RMII_MII_CRS_DV -------------------> PA7
102103
RMII_MII_RXD0 ---------------------> PC4
103104
RMII_MII_RXD1 ---------------------> PC5
104-
RMII_MII_RXER ---------------------> PG2
105+
RMII_MII_RXER ---------------------> none
105106
RMII_MII_TX_EN --------------------> PG11
106107
RMII_MII_TXD0 ---------------------> PG13
107108
RMII_MII_TXD1 ---------------------> PG14
108109
*/
109110
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7);
110111
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5);
111-
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13 | GPIO_PIN_14);
112+
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_11 | GPIO_PIN_13 | GPIO_PIN_14);
112113

113114
/* Disable the Ethernet global Interrupt */
114115
NVIC_DisableIRQ(ETH_IRQn);

connectivity/drivers/emac/TARGET_STM/TARGET_STM32F7/TARGET_DISCO_F769NI/stm32f7_eth_init.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2018, STMicroelectronics
33
* All rights reserved.
4+
* SPDX-License-Identifier: BSD-3-Clause
45
*
56
* Redistribution and use in source and binary forms, with or without
67
* modification, are permitted provided that the following conditions are met:
@@ -46,7 +47,6 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
4647
/* Enable GPIOs clocks */
4748
__HAL_RCC_GPIOA_CLK_ENABLE();
4849
__HAL_RCC_GPIOC_CLK_ENABLE();
49-
__HAL_RCC_GPIOD_CLK_ENABLE();
5050
__HAL_RCC_GPIOG_CLK_ENABLE();
5151

5252
/** ETH GPIO Configuration
@@ -56,7 +56,7 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
5656
RMII_MII_CRS_DV -------------------> PA7
5757
RMII_MII_RXD0 ---------------------> PC4
5858
RMII_MII_RXD1 ---------------------> PC5
59-
RMII_MII_RXER ---------------------> PD5
59+
RMII_MII_RXER ---------------------> none
6060
RMII_MII_TX_EN --------------------> PG11
6161
RMII_MII_TXD0 ---------------------> PG13
6262
RMII_MII_TXD1 ---------------------> PG14
@@ -73,10 +73,6 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
7373
GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5;
7474
HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);
7575

76-
/* Configure PD5 */
77-
GPIO_InitStructure.Pin = GPIO_PIN_5;
78-
HAL_GPIO_Init(GPIOD, &GPIO_InitStructure);
79-
8076
/* Configure PG11, PG13 and PG14 */
8177
GPIO_InitStructure.Pin = GPIO_PIN_11 | GPIO_PIN_13 | GPIO_PIN_14;
8278
HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);
@@ -106,14 +102,13 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth)
106102
RMII_MII_CRS_DV -------------------> PA7
107103
RMII_MII_RXD0 ---------------------> PC4
108104
RMII_MII_RXD1 ---------------------> PC5
109-
RMII_MII_RXER ---------------------> PD5
105+
RMII_MII_RXER ---------------------> none
110106
RMII_MII_TX_EN --------------------> PG11
111107
RMII_MII_TXD0 ---------------------> PG13
112108
RMII_MII_TXD1 ---------------------> PG14
113109
*/
114110
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7);
115111
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5);
116-
HAL_GPIO_DeInit(GPIOD, GPIO_PIN_5);
117112
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_11 | GPIO_PIN_13 | GPIO_PIN_14);
118113

119114
/* Disable the Ethernet global Interrupt */

connectivity/drivers/emac/TARGET_STM/TARGET_STM32F7/TARGET_NUCLEO_F746ZG/stm32f7_eth_init.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2018, STMicroelectronics
33
* All rights reserved.
4+
* SPDX-License-Identifier: BSD-3-Clause
45
*
56
* Redistribution and use in source and binary forms, with or without
67
* modification, are permitted provided that the following conditions are met:
@@ -56,7 +57,7 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
5657
RMII_MII_CRS_DV -------------------> PA7
5758
RMII_MII_RXD0 ---------------------> PC4
5859
RMII_MII_RXD1 ---------------------> PC5
59-
RMII_MII_RXER ---------------------> PG2
60+
RMII_MII_RXER ---------------------> none
6061
RMII_MII_TX_EN --------------------> PG11
6162
RMII_MII_TXD0 ---------------------> PG13
6263
RMII_MII_TXD1 ---------------------> PB13
@@ -77,8 +78,8 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
7778
GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5;
7879
HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);
7980

80-
/* Configure PG2, PG11 and PG13 */
81-
GPIO_InitStructure.Pin = GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13;
81+
/* Configure PG11 and PG13 */
82+
GPIO_InitStructure.Pin = GPIO_PIN_11 | GPIO_PIN_13;
8283
HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);
8384

8485
/* Enable the Ethernet global Interrupt */
@@ -106,15 +107,15 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth)
106107
RMII_MII_CRS_DV -------------------> PA7
107108
RMII_MII_RXD0 ---------------------> PC4
108109
RMII_MII_RXD1 ---------------------> PC5
109-
RMII_MII_RXER ---------------------> PG2
110+
RMII_MII_RXER ---------------------> none
110111
RMII_MII_TX_EN --------------------> PG11
111112
RMII_MII_TXD0 ---------------------> PG13
112113
RMII_MII_TXD1 ---------------------> PB13
113114
*/
114115
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7);
115116
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_13);
116117
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5);
117-
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13);
118+
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_11 | GPIO_PIN_13);
118119

119120
/* Disable the Ethernet global Interrupt */
120121
NVIC_DisableIRQ(ETH_IRQn);

connectivity/drivers/emac/TARGET_STM/TARGET_STM32F7/TARGET_NUCLEO_F756ZG/stm32f7_eth_init.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* mbed Microcontroller Library
22
* Copyright (c) 2018, STMicroelectronics
33
* All rights reserved.
4+
* SPDX-License-Identifier: BSD-3-Clause
45
*
56
* Redistribution and use in source and binary forms, with or without
67
* modification, are permitted provided that the following conditions are met:
@@ -56,7 +57,7 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
5657
RMII_MII_CRS_DV -------------------> PA7
5758
RMII_MII_RXD0 ---------------------> PC4
5859
RMII_MII_RXD1 ---------------------> PC5
59-
RMII_MII_RXER ---------------------> PG2
60+
RMII_MII_RXER ---------------------> none
6061
RMII_MII_TX_EN --------------------> PG11
6162
RMII_MII_TXD0 ---------------------> PG13
6263
RMII_MII_TXD1 ---------------------> PB13
@@ -77,8 +78,8 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
7778
GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5;
7879
HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);
7980

80-
/* Configure PG2, PG11 and PG13 */
81-
GPIO_InitStructure.Pin = GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13;
81+
/* Configure PG11 and PG13 */
82+
GPIO_InitStructure.Pin = GPIO_PIN_11 | GPIO_PIN_13;
8283
HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);
8384

8485
/* Enable the Ethernet global Interrupt */
@@ -106,15 +107,15 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth)
106107
RMII_MII_CRS_DV -------------------> PA7
107108
RMII_MII_RXD0 ---------------------> PC4
108109
RMII_MII_RXD1 ---------------------> PC5
109-
RMII_MII_RXER ---------------------> PG2
110+
RMII_MII_RXER ---------------------> none
110111
RMII_MII_TX_EN --------------------> PG11
111112
RMII_MII_TXD0 ---------------------> PG13
112113
RMII_MII_TXD1 ---------------------> PB13
113114
*/
114115
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7);
115116
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_13);
116117
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5);
117-
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13);
118+
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_11 | GPIO_PIN_13);
118119

119120
/* Disable the Ethernet global Interrupt */
120121
NVIC_DisableIRQ(ETH_IRQn);

0 commit comments

Comments
 (0)