Browse Source

update stm32f107 bsp

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1803 bbd45198-f89e-11dd-88c7-29a3b14d5316
wuyangyong 13 years ago
parent
commit
7eaac75bcb
3 changed files with 7 additions and 9 deletions
  1. 1 1
      bsp/stm32f107/rtconfig.py
  2. 5 7
      bsp/stm32f107/stm32_eth.c
  3. 1 1
      bsp/stm32f107/stm32_eth.h

+ 1 - 1
bsp/stm32f107/rtconfig.py

@@ -1,6 +1,6 @@
 # toolchains options
 ARCH='arm'
-CPU='stm32'
+CPU='cortex-m3'
 CROSS_TOOL='keil'
 
 # cross_tool provides the cross compiler

+ 5 - 7
bsp/stm32f107/stm32_eth.c

@@ -3062,12 +3062,11 @@ uint32_t ETH_HandlePTPRxPkt(uint8_t *ppkt, uint32_t *PTPRxTab)
 #include <lwip/icmp.h>
 #include "lwipopts.h"
 
-#define STM32_ETH_DEBUG
-//#define STM32_ETH_PHY_DUMP
-//#define STM32_ETH_RX_DUMP
-//#define STM32_ETH_TX_DUMP
+#define ETH_DEBUG
+//#define ETH_RX_DUMP
+//#define ETH_TX_DUMP
 
-#ifdef STM32_ETH_DEBUG
+#ifdef ETH_DEBUG
 #define STM32_ETH_TRACE	        rt_kprintf
 #else
 #define STM32_ETH_TRACE(...)
@@ -3360,7 +3359,7 @@ rt_err_t rt_stm32_eth_tx( rt_device_t dev, struct pbuf* p)
         }
     }
 
-#ifdef STM32_ETH_TX_DUMP
+#ifdef ETH_TX_DUMP
     {
         rt_uint32_t i;
         rt_uint8_t *ptr = (rt_uint8_t*)(DMATxDescToSet->Buffer1Addr);
@@ -3416,7 +3415,6 @@ rt_err_t rt_stm32_eth_tx( rt_device_t dev, struct pbuf* p)
         ETH->DMASR = ETH_DMASR_TBUS;
         /* Transmit Poll Demand to resume DMA transmission*/
         ETH->DMATPDR = 0;
-		STM32_ETH_TRACE("transmit poll demand\n");
     }
 
     /* Update the ETHERNET DMA global Tx descriptor with next Tx decriptor */

+ 1 - 1
bsp/stm32f107/stm32_eth.h

@@ -487,7 +487,7 @@ typedef struct  {
   */
 #define PHY_Speed_Status            ((u16)0x0002)    /*!< Configured information of Speed: 10Mbps */
 #define PHY_Duplex_Status           ((u16)0x0004)    /*!< Configured information of Duplex: Full-duplex */
-#define IS_ETH_PHY_ADDRESS(ADDRESS) ((ADDRESS) <= 0x20)
+#define IS_ETH_PHY_ADDRESS(ADDRESS) ((ADDRESS) <= 0x1F)
 #define IS_ETH_PHY_REG(REG)         (REG <= 0x1F)
 
 /**--------------------------------------------------------------------------**/