MCF5223X PHY fixed to 10 Mbps

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCF5223X PHY fixed to 10 Mbps

1,232 Views
PederOlav
Contributor I
Hi

I try to set the ethernet communication to be fixed at 10 Mbps, in stead of auto-negotiation and 100 Mbps. I want to reduce the power consumption.

By the way, I use Interniche Lite ethernet stack.

But when I try to write to MII control register 0x00, nothing happens. I try to write 0x0100, but when reading register value afterwards it is still 0x0000, and then after PHY is enabled and ready the register value is 0x2100. Which means 100Mbps and duplex.

I have the feeling that I have forgot to set/reset some bit in a register.

Any clue anyone?

Labels (1)
0 Kudos
2 Replies

351 Views
PederOlav
Contributor I
Thanks Mark

The code is working now. I had some problem with the sequence so the registers seem not set.
0 Kudos

351 Views
mjbcswitzerland
Specialist V
Hi

Here's the sequence that we use for 10M as reference (there is other stuff between but it shows the general pattern). You may see something:

Code:
  EPHYCTL1 = PHY_ADDRESS;                                                // set PHY address for communication  EPHYCTL0 = (DIS100 | DIS10 | ANDIS);                                   // disable PHY clocks until initialisation is complete  EPHYCTL0 |= (EPHYEN | EPHYIEN);                                        // enable the PHY  EPHYCTL0 &= ~(DIS100 | DIS10);                                         // let PHY PLL be determined by PHY  usMIIData = fnMIIread(PHY_ADDRESS, PHY_REG_CR);                        // read PHY Control Register 0  usMIIData &= ~PHY_R0_DR;                                               // set manual 10Mb  fnMIIwrite(PHY_ADDRESS, PHY_REG_CR, usMIIData);                        // command operating mode of PHY

 

Regards

Mark
0 Kudos