DP83640 clk
采用DP83640 RMII Master模式,MDIO可以读写,就是clk信号有问题。根据手册:
RMII Master Mode
In RMII Master Mode, the DP83640 uses a 25 MHz crystal on X1/X2 and internally generates the 50 MHz RMII reference clock for use by the RMII logic. The 50 MHz clock is output on RX_CLK, TX_CLK, and CLK_OUT for use as the reference clock for an attached MAC. RX_CLK operates at 25 MHz during reset.
现在的情况是,RX_CLK,TX_CLK时钟不是50Mhz,CLK_OUT为25Mhz,请问这个是怎么回事?
有没有将寄存器0x17 bit14配置成1,bit14=1代表RMII Master Mode (25 MHz input reference)。
使用MDIO读取寄存器0x17的值为4021,说明为RMII MASTER,RMII MODE呀,寄存器读取值如图所示。
检查下RMII_MAS这个引脚有没有拉高?
上拉2.2k,复位时和平时测量都是3v
参照AN-1794 2.1Configuring RMII Master Mode
RMII Master mode may be configured in one of two ways:
• Strap the mode at power-up by pulling the RMII_MODE and RMII_MASTER straps high, or
1. Write 0x0 to Register 0x13 (PAGESEL).
2. Set bits 14 (RMII_MASTER) and 5 (RMII_MODE) to 1 in Register 0x17 (RBR).
In addition, if the CLK_OUT pin is to be used as a 50 MHz RMII clock, the default PTP clock output
function must be disabled by clearing bit 15 (PTP_CLKOUT_EN) in register 0x14 (PTP_COC).
我采用strap上电采样,并且读取RBR寄存器,发现是在RMII_MASTER和RMII_MODE模式,理论上是不是CLK_OUT应该输出50MHz(虽然实际测量是25MHz)?当把PTP_CLKOUT_EN清零后,发现CLK_OUT没有输出了!还有,想问一下,25MHz的晶振是不是应该一直起振?为什么有时候测量没有波形?如果没有起振,为什么MDIO可以正常工作?