[ 本帖最后由 a32425262 于 2015-11-3 15:15 编辑 ]\n\ntgwfcc 发表于 2015-10-31 14:50
当时没研究懂就放着了,我记得要改个宏,改成MII模式,具体的我也忘了,如果你比较懂单片机,可以研究下 ...
解决了,修改三个寄存器
/** @defgroup PHY_status_register
* @{
*/
/* The PHY status register value change from a PHY to another so the user have
to update this value depending on the used external PHY */
/**
* @brief For LAN8700
*/
//#define PHY_SR 31 /*!< Tranceiver Status Register */
/**
* @brief For DP83848
*/
//#define PHY_SR 16 /*!< Tranceiver Status Register */
/**
* @brief For DM9161
*/
#define PHY_SR 17 /*!< Tranceiver Status Register */
/* The Speed and Duplex mask values change from a PHY to another so the user have to update
this value depending on the used external PHY */
/**
* @brief For LAN8700
*/
//#define PHY_Speed_Status ((u16)0x0004) /*!< Configured information of Speed: 10Mbps */
//#define PHY_Duplex_Status ((u16)0x0010) /*!< Configured information of Duplex: Full-duplex */
/**
* @brief For DP83848
*/
//#define PHY_Speed_Status ((u16)0x0002) /*!< Configured information of Speed: 10Mbps */
//#define PHY_Duplex_Status ((u16)0x0004) /*!< Configured information of Duplex: Full-duplex */
/**
* @brief For DM9161
*/
#define PHY_Speed_Status ((u16)0x3000) /*!< Configured information of Speed: 10Mbps */
#define PHY_Duplex_Status ((u16)0xA000) /*!< Configured information of Duplex: Full-duplex */