stm32duino / Arduino_Core_STM32

STM32 core support for Arduino
https://github.com/stm32duino/Arduino_Core_STM32/wiki
Other
2.85k stars 977 forks source link

Custom PeripheralPins.c for Ethernet Nucleos F429ZI/F439ZI #2564

Closed pmantoine closed 3 days ago

pmantoine commented 1 week ago

Thank you for adding Nucleo-F439ZI support in v2.8.0

We make use of the STM32Ethernet library for our networked application on both the Nucleo-F429ZI and Nucleo-F439ZI, and have discovered an issue that suggests a custom PeripheralPins.c would be the appropriate answer.

The current code in STM32Ethernet's HAL_ETH_MspInit() routine in ethernetif.cpp blasts its way over every pin associated with Ethernet in the PeripheralPins.c, leaving pins not used on the Nucleo-F4[23]9ZI boards also configured with AF attributes.

We propose that a custom PeripheralPins_NUCLEO_F4x9ZI.c file be used, which limits this initialisation to just the pins actually used on both Nucleos.

Please find attached a proposed form of the file which we've tested. Or I can inssue a suitable PR if you'd prefer. PeripheralPins_NUCLEO_F4x9ZI.c.zip

fpistm commented 1 week ago

Hi @pmantoine Yes, feel free to submit a PR especially if you have tested it. --> Done #2568