The datasheet talks about three jumpers:
Looking at your HAL_ETH_MspInit()
:
PC1 --> ETH_MDC
PA2 --> ETH_MDIO
PA8 (MCO) --> not connected
which means that :
JP8 connects 2 with 3
JP4 connects 2 with 1
JP12 connects 2 with 1 (use 25Mhz crystal).
How are they connected?
What is the value of ipconfigUSE_RMII
? It looks like you have to define:
#define ipconfigUSE_RMII 0
because I do not see any RMII (reduced) connections.
Your HAL_ETH_MspInit()
function looks OK, provided that you want to use the MII (not RMII) interface.
When this doesn’t help, it is time to look at the clocks.