lchunsong 发表于 2013-8-10 17:35:35

怎样表示STM32F107VCT6的RMII工作正常

我在做个三网合一的系统,CPU用STM32F107VCt6,PHY用IP175C,用RMII方式,请问怎样表示STM32F107VCT6的RMII正常工作

lgupen 发表于 2013-8-12 09:38:50

看下你能接收到数据包不。。。请问下你能配置IP175C的寄存器没?

lchunsong 发表于 2013-8-12 16:07:04

lgupen 发表于 2013-8-12 09:38 static/image/common/back.gif
看下你能接收到数据包不。。。请问下你能配置IP175C的寄存器没?

是谁接收数据包?STM32F107吗?如附件是IP175C的资料,你帮我看看IP175C寄存器照如下设计对不对:
#define PHY_BCR                        0          /*!< Tranceiver Basic Control Register */
#define PHY_BSR                        1          /*!< Tranceiver Basic Status Register */

/**
* @}
*/

/** @defgroup PHY_basic_Control_register
* @{
*/
#define PHY_Reset                     ((u16)0x8000)      /*!< PHY Reset */
#define PHY_Loopback                  ((u16)0x4000)      /*!< Select loop-back mode */
#define PHY_FULLDUPLEX_100M             ((u16)0x2100)      /*!< Set the full-duplex mode at 100 Mb/s */
#define PHY_HALFDUPLEX_100M             ((u16)0x2000)      /*!< Set the half-duplex mode at 100 Mb/s */
#define PHY_FULLDUPLEX_10M            ((u16)0x0100)      /*!< Set the full-duplex mode at 10 Mb/s */
#define PHY_HALFDUPLEX_10M            ((u16)0x0000)      /*!< Set the half-duplex mode at 10 Mb/s */
#define PHY_AutoNegotiation             ((u16)0x1000)      /*!< Enable auto-negotiation function */
#define PHY_Restart_AutoNegotiation   ((u16)0x0200)      /*!< Restart auto-negotiation function */
#define PHY_Powerdown                   ((u16)0x0800)      /*!< Select the power down mode */
//#define PHY_Isolate                     ((u16)0x0400)      /*!< Isolate PHY from MII,lcs deleted */

/**
* @}
*/

/** @defgroup PHY_basic_status_register
* @{
*/
#define PHY_AutoNego_Complete         ((u16)0x0020)      /*!< Auto-Negotioation process completed */
#define PHY_Linked_Status               ((u16)0x0004)      /*!< Valid link established */
#define PHY_Jabber_detection            ((u16)0x0002)      /*!< Jabber condition detected */

/**
* @}
*/

/** @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 */
/**
* @briefFor LAN8700
*/
//#define PHY_SR                           31         /*!< Tranceiver Status Register */
/**
* @briefFor DP83848
*/
//#define PHY_SR                           16   /*!< Tranceiver Status Register */
// @briefFor IP175C
#define PHY_SR                           18    //lcs modified

/* 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 */
/**
* @briefFor LAN8700
*/
//#define PHY_Speed_Status            ((u16)0x0004)       /*!< Configured information of Speed: 10Mbps */
//#define PHY_Duplex_Status         ((u16)0x0010)       /*!< Configured information of Duplex: Full-duplex */

/**
* @briefFor DP83848
*/
//#define PHY_Speed_Status            ((u16)0x0002)    /*!< Configured information of Speed: 10Mbps */
//#define PHY_Duplex_Status         ((u16)0x0004)   /*!< Configured information of Duplex: Full-duplex */
//@briefFor IP175C
#define PHY_Speed_Status            ((u16)0x0800)    /*!< Configured information of Speed: 10Mbps lcs modified from ((u16)0x0800) to */
#define PHY_Duplex_Status         ((u16)0x0400)   /*!< Configured information of Duplex: Full-duplex lcs modified*/
#define IS_ETH_PHY_ADDRESS(ADDRESS) ((ADDRESS) <= 0x20)
#define IS_ETH_PHY_REG(REG) (((REG) == PHY_BCR) || \
                           ((REG) == PHY_BSR) || \
                           ((REG) == PHY_SR))


lchunsong 发表于 2013-8-12 16:56:50

lgupen 发表于 2013-8-12 09:38 static/image/common/back.gif
看下你能接收到数据包不。。。请问下你能配置IP175C的寄存器没?

能否接收到数据包用PING看吧

fengyunyu 发表于 2014-10-5 00:12:50

请问LZ问题怎么解决的?
页: [1]
查看完整版本: 怎样表示STM32F107VCT6的RMII工作正常