Content originally posted in LPCWare by PhilYoung on Fri Apr 27 01:06:51 MST 2012
I got a Hitex board now and got the RMII code working eventually ( there are bugs in the 2012-04-17 example code ), this works on Hitex but not on our board with the 1126 silicon so I'll assume it was a bug in that chip revision for now.
Regarding the Hitex RMII code, there is a bug in clock selection, it should just select the Tx clock as the phy Tx and Rx clocks as they need to be 50Mhz and synchronous to the PHY clock.
The second problem is the phy defaults to MII mode at power on with the strapping options, and the SW does not program the register to place it into RMII mode.
adding the line
#if !MII
write_PHY (PHY_REG_RBR, 0x20); missing from the demo, puts the phy into RMII mode 1.2
#endif
immediately after the update of the BMCR register puts the PHY into RMII mode then the example works fine.