I finally found the solution :
The system CLK didn't match with my MII configuration. I create a function to configure system CLK in RUN0 mode :
//Configure SYS_CLK from 25MHz XTAL
void configCLK(void)
{
ME.MER.R = 0x0000001D; // Enable DRUN, RUN0, SAFE, RESET modes
//Initialize PLL before turning it on:
//Set PLL value:
FMPLL.CR.B.IDF = 0b0100;
FMPLL.CR.B.ODF= 0b00;
FMPLL.CR.B.NDIV= 0b0110000;//Exit PLL : 120MHz
CGM.PLL_CLK_DIV.B.DIV=0;
CGM.SYSTEM_CLK_DIV.B.DIV=1;//SYS_CLK=120/2=60MHz
CGM.RTC_CLK_DIV.B.DIV=1;//RTC_CLK=60/2=30MHz
ME.RUN0.R = 0x001F0074; // RUN0 cfg: 16MHzIRCON,OSC0ON,PLL0ON,syclk=PLL0
ME.RUN_PC1.R = 0x00000010; //Peri. Cfg. 1 settings: only run in RUN0 mode
ME.PCTL68.R = 0x01; //MPC56xxB/S: select ME.RUNPC[1]
// Mode Transition to enter RUN0 mode:
ME.MCTL.R = 0x40005AF0; //Enter RUN0 Mode & Key
ME.MCTL.R = 0x4000A50F; //Enter RUN0 Mode & Inverted Key
while (ME.GS.B.S_MTRANS == 1) {} //Wait for mode transition to complete
while(ME.GS.B.S_CURRENT_MODE != 4){} // Verify RUN0 is the current mode
}
And in the FEC configuration, I set MII_SPEED=0xC. From MPC5604ERM page 874:
" MII_SPEED controls the frequency of the MII management interface clock (FEC_MDC)
relative to the system clock. A value of 0 in this field “turns off” the FEC_MDC and leave
it in low voltage state. Any non-zero value results in the FEC_MDC frequency of
1/(MII_SPEED*2) of the system clock frequency.
The MII_SPEED field must be programmed with a value to provide an FEC_MDC frequency of less than
or equal to 2.5 MHz to be compliant with the IEEE 802.3 MII specification. The MII_SPEED must be set
to a non-zero value in order to generate a read or write management frame. After the management frame
is complete the MSCR can optionally be set to zero to turn off the FEC_MDC. The FEC_MDC generated
has a 50% duty cycle except when MII_SPEED is changed during operation (change takes effect following
either a rising or falling edge of FEC_MDC).
The FEC_MDC frequency depends on both the system clock frequency and the MII_SPEED register. If
the system clock is 25 MHz, programming the MII_SPEED register to 0x0000_0005 results in an
FEC_MDC frequency of 25 MHz * 1/10 = 2.5 MHz."
So, for SYS_CLK=60MHz :
FEC.MSCR.B.MII_SPEED=0xC;//set MDIO speed
Finally, it works perfectly.
Mauricio