想请教你几个关于vxworks的问题,我用的CPU是MPC860T,我用双串口可以正常工作并可以下载vxworks映象正常运行,现在我想启动100M以太网MOTFEC,并用网口下载vxworks映象,我用的物理层芯片是LXT972A,当我在sysLib.c里调用sysFecEnetEnable(UINT32 motCpmAddr)初始化port D为MII后,LXT972A的RX_CLK输出的时钟就不对了,低电平部分被拉到了2.1V左右,在初始化MII之前都是正常的,让它继续执行下去,在调用muxDevStart (pCookie)就会报错:Failed to start device motfec,这是怎么回事呢?下面是我的MII初始化代码:
STATUS sysFecEnetEnable
(
UINT32 motCpmAddr /* base address of the on-chip RAM */
)
{
int intLevel = intLock();
/* enable the Ethernet device for the FEC */
/* *BCSR4 |= (BCSR4_FETH_RST | BCSR4_FETH_CFG0
| BCSR4_FETH_FDE);
*BCSR4 &= ~BCSR4_UUFDIS; */
/* introduce a little delay 我自已设计的板子上没有用BCSR,所以这里屏蔽*/
/* taskDelay (sysClkRateGet ()); */
/* mask IRQ7 off, as it is shared with MII_TX_CLK */
*SIMASK (motCpmAddr) &= ~SIMASK_IRM7;
/* also clear any pending interrupt */
*SIPEND (motCpmAddr) |= SIPEND_IRQ7;
/*
* set the arbitration level for the FEC. Do not enable
* FEC aggressive mode.
*/
*SDCR (motCpmAddr) |= SDCR_FAID_BR6;
/* set Port D to use MII signals */
*PDPAR (motCpmAddr) = 0x1fff;
#ifdef MPC860_REVD
*PDDIR (motCpmAddr) = 0x1fff;
#else
*PDDIR (motCpmAddr) = 0x1c58;
#endif /* MPC860_REVD 0x1c58*/
/*在这之前RX_CLK还是正常的,在这之后就不正常了,低电平部分被拉到了2.1V左右*/
intUnlock (intLevel);
return (OK);
}