Arm Mbed OS support forum

How to use different pins for ethernet interface in nucleo_f429zi?


I am planning to use a STM32F429VET6 instead of STM32F429ZIT6 due to space limit on PCB. On nucleo_f429zi board, PG11 and PG13 are used to control ethernet phy. Since those two pins are not available on STM32F429VET6, we will need to use some other pin instead.

Can I setup a different set of pins in stm32f4_eth_init.c?
/* Configure PG2, PG11 and PG13 */
GPIO_InitStructure.Pin = GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13;
HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);

On a side note, PG_2 doesn’t seem to be actually used to control ethernet phy. Hopefully setting it up here won’t affect this being used for other purpose.

yes, you can create a custom target and use your own stm32f4_eth_init.c. And also a custom PeripheralPins.c to avoid using the reserved pins for other interfaces.