Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
Ethernet_以太网
STM32H750
ART-PI(STM32H750)ETH无法使用(非原生BSP)
发布于 2022-05-25 16:47:27 浏览:1187
订阅该版
心路历程: 最近打算深入学习H7系列,手上有ART-PI的板子,想到原先的板级支持包已经时4.0.3的,打算用最新的标准版4.1.0来实现对ART-PI的板子控制,下载到FLASH成功了、程序也跑起来了,但是ETH却迟迟不能成功,很是苦恼,望各位大神帮助; 目前对ETH方面做了的适配有: 1、移植原有ART-PI的drv_mpu.c文件 ``` /* * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2019-04-14 whj4674672 first version */ #include
#include "stm32h7xx.h" #include "board.h" int mpu_init(void) { MPU_Region_InitTypeDef MPU_InitStruct; /* Disable the MPU */ HAL_MPU_Disable(); /* Configure the MPU attributes as WT for AXI SRAM */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.BaseAddress = 0x24000000; MPU_InitStruct.Size = MPU_REGION_SIZE_512KB; MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; MPU_InitStruct.IsCacheable = MPU_ACCESS_CACHEABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER0; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; MPU_InitStruct.SubRegionDisable = 0X00; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE; HAL_MPU_ConfigRegion(&MPU_InitStruct); #ifdef BSP_USING_SDRAM /* Configure the MPU attributes as WT for SDRAM */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.BaseAddress = 0xC0000000; MPU_InitStruct.Size = MPU_REGION_SIZE_32MB; MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; MPU_InitStruct.IsCacheable = MPU_ACCESS_CACHEABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER1; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; MPU_InitStruct.SubRegionDisable = 0x00; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE; HAL_MPU_ConfigRegion(&MPU_InitStruct); #endif #ifdef BSP_USING_ETH /* Configure the MPU attributes as Device not cacheable for ETH DMA descriptors */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.BaseAddress = 0x30040000; MPU_InitStruct.Size = MPU_REGION_SIZE_256B; MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE; MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER2; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; MPU_InitStruct.SubRegionDisable = 0x00; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE; HAL_MPU_ConfigRegion(&MPU_InitStruct); /* Configure the MPU attributes as Cacheable write through for LwIP RAM heap which contains the Tx buffers */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.BaseAddress = 0x30044000; MPU_InitStruct.Size = MPU_REGION_SIZE_16KB; MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; MPU_InitStruct.IsCacheable = MPU_ACCESS_CACHEABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER3; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; MPU_InitStruct.SubRegionDisable = 0x00; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE; HAL_MPU_ConfigRegion(&MPU_InitStruct); /* Configure the MPU attributes as Device not cacheable for ETH DMA descriptors and RX Buffers*/ // MPU_InitStruct.Enable = MPU_REGION_ENABLE; // MPU_InitStruct.BaseAddress = 0x30040000; // MPU_InitStruct.Size = MPU_REGION_SIZE_32KB; // MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; // MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; // MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; // MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; // MPU_InitStruct.Number = MPU_REGION_NUMBER2; // MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1; // MPU_InitStruct.SubRegionDisable = 0x00; // MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE; // // HAL_MPU_ConfigRegion(&MPU_InitStruct); #endif /* Configure the MPU attributes as WT for QSPI */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.BaseAddress = 0x90000000; MPU_InitStruct.Size = MPU_REGION_SIZE_16MB; MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; MPU_InitStruct.IsCacheable = MPU_ACCESS_CACHEABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER4; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; MPU_InitStruct.SubRegionDisable = 0X00; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE; HAL_MPU_ConfigRegion(&MPU_InitStruct); /* Enable the MPU */ HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT); /* Enable CACHE */ SCB_EnableICache(); SCB_EnableDCache(); return RT_EOK; } INIT_BOARD_EXPORT(mpu_init); ``` 2、移植原有ART-PI的drv_eth.c drv_eth.h文件 drv_eth.c ``` /* * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2018-11-19 SummerGift first version * 2018-12-25 zylx fix some bugs * 2019-06-10 SummerGift optimize PHY state detection process * 2019-09-03 xiaofan optimize link change detection process * 2020-07-17 wanghaijing support h7 * 2020-11-30 wanghaijing add phy reset */ #include
#include
#include "board.h" #include "drv_config.h" #ifdef BSP_USING_ETH #include
#include "lwipopts.h" #include "drv_eth.h" /* * Emac driver uses CubeMX tool to generate emac and phy's configuration, * the configuration files can be found in CubeMX_Config folder. */ /* debug option */ //#define ETH_RX_DUMP //#define ETH_TX_DUMP #define DRV_DEBUG #define LOG_TAG "drv.emac" #include
#define MAX_ADDR_LEN 6 struct rt_stm32_eth { /* inherit from ethernet device */ struct eth_device parent; #ifndef PHY_USING_INTERRUPT_MODE rt_timer_t poll_link_timer; #endif /* interface address info, hw address */ rt_uint8_t dev_addr[MAX_ADDR_LEN]; /* ETH_Speed */ uint32_t ETH_Speed; /* ETH_Duplex_Mode */ uint32_t ETH_Mode; }; static ETH_HandleTypeDef EthHandle; static ETH_TxPacketConfig TxConfig; static struct rt_stm32_eth stm32_eth_device; static uint8_t PHY_ADDR = 0x1F; #if defined ( __ICCARM__ ) /*!< IAR Compiler */ #pragma location=0x30040000 ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */ #pragma location=0x30040060 ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptors */ #pragma location=0x30040200 uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_MAX_PACKET_SIZE]; /* Ethernet Receive Buffers */ #elif defined ( __CC_ARM ) /* MDK ARM Compiler */ __attribute__((at(0x30040000))) ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */ __attribute__((at(0x30040060))) ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptors */ __attribute__((at(0x30040200))) uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_MAX_PACKET_SIZE]; /* Ethernet Receive Buffer */ #elif defined ( __GNUC__ ) /* GNU Compiler */ ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT] __attribute__((section(".RxDecripSection"))); /* Ethernet Rx DMA Descriptors */ ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT] __attribute__((section(".TxDecripSection"))); /* Ethernet Tx DMA Descriptors */ uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_MAX_PACKET_SIZE] __attribute__((section(".RxArraySection"))); /* Ethernet Receive Buffers */ #endif #if defined(ETH_RX_DUMP) || defined(ETH_TX_DUMP) #define __is_print(ch) ((unsigned int)((ch) - ' ') < 127u - ' ') static void dump_hex(const rt_uint8_t *ptr, rt_size_t buflen) { unsigned char *buf = (unsigned char *)ptr; int i, j; for (i = 0; i < buflen; i += 16) { rt_kprintf("%08X: ", i); for (j = 0; j < 16; j++) if (i + j < buflen) rt_kprintf("%02X ", buf[i + j]); else rt_kprintf(" "); rt_kprintf(" "); for (j = 0; j < 16; j++) if (i + j < buflen) rt_kprintf("%c", __is_print(buf[i + j]) ? buf[i + j] : '.'); rt_kprintf("\n"); } } #endif extern void phy_reset(void); /* EMAC initialization function */ static rt_err_t rt_stm32_eth_init(rt_device_t dev) { ETH_MACConfigTypeDef MACConf; uint32_t regvalue = 0; uint8_t status = RT_EOK; __HAL_RCC_D2SRAM3_CLK_ENABLE(); phy_reset(); /* ETHERNET Configuration */ EthHandle.Instance = ETH; EthHandle.Init.MACAddr = (rt_uint8_t *)&stm32_eth_device.dev_addr[0]; EthHandle.Init.MediaInterface = HAL_ETH_RMII_MODE; EthHandle.Init.TxDesc = DMATxDscrTab; EthHandle.Init.RxDesc = DMARxDscrTab; EthHandle.Init.RxBuffLen = ETH_MAX_PACKET_SIZE; SCB_InvalidateDCache(); HAL_ETH_DeInit(&EthHandle); /* configure ethernet peripheral (GPIOs, clocks, MAC, DMA) */ if (HAL_ETH_Init(&EthHandle) != HAL_OK) { LOG_E("eth hardware init failed"); } else { LOG_D("eth hardware init success"); } rt_memset(&TxConfig, 0, sizeof(ETH_TxPacketConfig)); TxConfig.Attributes = ETH_TX_PACKETS_FEATURES_CSUM | ETH_TX_PACKETS_FEATURES_CRCPAD; TxConfig.ChecksumCtrl = ETH_CHECKSUM_IPHDR_PAYLOAD_INSERT_PHDR_CALC; TxConfig.CRCPadCtrl = ETH_CRC_PAD_INSERT; for (int idx = 0; idx < ETH_RX_DESC_CNT; idx++) { HAL_ETH_DescAssignMemory(&EthHandle, idx, &Rx_Buff[idx][0], NULL); } HAL_ETH_SetMDIOClockRange(&EthHandle); for(int i = 0; i <= PHY_ADDR; i ++) { if(HAL_ETH_ReadPHYRegister(&EthHandle, i, PHY_SPECIAL_MODES_REG, ®value) != HAL_OK) { status = RT_ERROR; /* Can't read from this device address continue with next address */ continue; } if((regvalue & PHY_BASIC_STATUS_REG) == i) { PHY_ADDR = i; status = RT_EOK; LOG_D("Found a phy, address:0x%02X", PHY_ADDR); break; } } if(HAL_ETH_WritePHYRegister(&EthHandle, PHY_ADDR, PHY_BASIC_CONTROL_REG, PHY_RESET_MASK) == HAL_OK) { HAL_ETH_ReadPHYRegister(&EthHandle, PHY_ADDR, PHY_SPECIAL_MODES_REG, ®value); uint32_t tickstart = rt_tick_get(); /* wait until software reset is done or timeout occured */ while(regvalue & PHY_RESET_MASK) { if((rt_tick_get() - tickstart) <= 500) { if(HAL_ETH_ReadPHYRegister(&EthHandle, PHY_ADDR, PHY_BASIC_CONTROL_REG, ®value) != HAL_OK) { status = RT_ERROR; break; } } else { status = RT_ETIMEOUT; } } } rt_thread_delay(2000); if(HAL_ETH_ReadPHYRegister(&EthHandle, PHY_ADDR, PHY_BASIC_CONTROL_REG, ®value) == HAL_OK) { regvalue |= PHY_AUTO_NEGOTIATION_MASK; HAL_ETH_WritePHYRegister(&EthHandle, PHY_ADDR, PHY_BASIC_CONTROL_REG, regvalue); eth_device_linkchange(&stm32_eth_device.parent, RT_TRUE); HAL_ETH_GetMACConfig(&EthHandle, &MACConf); MACConf.DuplexMode = ETH_FULLDUPLEX_MODE; MACConf.Speed = ETH_SPEED_100M; HAL_ETH_SetMACConfig(&EthHandle, &MACConf); HAL_ETH_Start_IT(&EthHandle); } else { status = RT_ERROR; } return status; } static rt_err_t rt_stm32_eth_open(rt_device_t dev, rt_uint16_t oflag) { LOG_D("emac open"); return RT_EOK; } static rt_err_t rt_stm32_eth_close(rt_device_t dev) { LOG_D("emac close"); return RT_EOK; } static rt_size_t rt_stm32_eth_read(rt_device_t dev, rt_off_t pos, void *buffer, rt_size_t size) { LOG_D("emac read"); rt_set_errno(-RT_ENOSYS); return 0; } static rt_size_t rt_stm32_eth_write(rt_device_t dev, rt_off_t pos, const void *buffer, rt_size_t size) { LOG_D("emac write"); rt_set_errno(-RT_ENOSYS); return 0; } static rt_err_t rt_stm32_eth_control(rt_device_t dev, int cmd, void *args) { switch (cmd) { case NIOCTL_GADDR: /* get mac address */ if (args) rt_memcpy(args, stm32_eth_device.dev_addr, 6); else return -RT_ERROR; break; default : break; } return RT_EOK; } /* ethernet device interface */ /* transmit data*/ rt_err_t rt_stm32_eth_tx(rt_device_t dev, struct pbuf *p) { rt_err_t ret = RT_ERROR; HAL_StatusTypeDef state; uint32_t i = 0, framelen = 0; struct pbuf *q; ETH_BufferTypeDef Txbuffer[ETH_TX_DESC_CNT]; rt_memset(Txbuffer, 0, ETH_TX_DESC_CNT * sizeof(ETH_BufferTypeDef)); for (q = p; q != NULL; q = q->next) { if (i >= ETH_TX_DESC_CNT) return ERR_IF; Txbuffer[i].buffer = q->payload; Txbuffer[i].len = q->len; framelen += q->len; if (i > 0) { Txbuffer[i - 1].next = &Txbuffer[i]; } if (q->next == NULL) { Txbuffer[i].next = NULL; } i++; } TxConfig.Length = framelen; TxConfig.TxBuffer = Txbuffer; #ifdef ETH_TX_DUMP rt_kprintf("Tx dump, len= %d\r\n", framelen); dump_hex(&Txbuffer[0]); #endif if (stm32_eth_device.parent.link_status) { SCB_CleanInvalidateDCache(); state = HAL_ETH_Transmit(&EthHandle, &TxConfig, 1000); if (state != HAL_OK) { LOG_W("eth transmit frame faild: %d", EthHandle.ErrorCode); EthHandle.ErrorCode = HAL_ETH_STATE_READY; EthHandle.gState = HAL_ETH_STATE_READY; } } else { LOG_E("eth transmit frame faild, netif not up"); } ret = ERR_OK; return ret; } /* receive data*/ struct pbuf *rt_stm32_eth_rx(rt_device_t dev) { uint32_t framelength = 0; rt_uint16_t l; struct pbuf *p = RT_NULL, *q; ETH_BufferTypeDef RxBuff; uint32_t alignedAddr; if(HAL_ETH_GetRxDataBuffer(&EthHandle, &RxBuff) == HAL_OK) { HAL_ETH_GetRxDataLength(&EthHandle, &framelength); /* Build Rx descriptor to be ready for next data reception */ HAL_ETH_BuildRxDescriptors(&EthHandle); /* Invalidate data cache for ETH Rx Buffers */ alignedAddr = (uint32_t)RxBuff.buffer & ~0x1F; SCB_InvalidateDCache_by_Addr((uint32_t *)alignedAddr, (uint32_t)RxBuff.buffer - alignedAddr + framelength); p = pbuf_alloc(PBUF_RAW, framelength, PBUF_RAM); if (p != NULL) { for (q = p, l = 0; q != NULL; q = q->next) { rt_memcpy((rt_uint8_t *)q->payload, (rt_uint8_t *)&RxBuff.buffer[l], q->len); l = l + q->len; } } } return p; } /* interrupt service routine */ void ETH_IRQHandler(void) { /* enter interrupt */ rt_interrupt_enter(); HAL_ETH_IRQHandler(&EthHandle); /* leave interrupt */ rt_interrupt_leave(); } void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *heth) { rt_err_t result; result = eth_device_ready(&(stm32_eth_device.parent)); if (result != RT_EOK) LOG_I("RxCpltCallback err = %d", result); } void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth) { LOG_E("eth err"); } enum { PHY_LINK = (1 << 0), PHY_100M = (1 << 1), PHY_FULL_DUPLEX = (1 << 2), }; static void phy_linkchange() { static rt_uint8_t phy_speed = 0; rt_uint8_t phy_speed_new = 0; rt_uint32_t status; HAL_ETH_ReadPHYRegister(&EthHandle, PHY_ADDR, PHY_BASIC_STATUS_REG, (uint32_t *)&status); LOG_D("phy basic status reg is 0x%X", status); if (status & (PHY_AUTONEGO_COMPLETE_MASK | PHY_LINKED_STATUS_MASK)) { rt_uint32_t SR = 0; phy_speed_new |= PHY_LINK; HAL_ETH_ReadPHYRegister(&EthHandle, PHY_ADDR, PHY_Status_REG, (uint32_t *)&SR); LOG_D("phy control status reg is 0x%X", SR); if (PHY_Status_SPEED_100M(SR)) { phy_speed_new |= PHY_100M; } if (PHY_Status_FULL_DUPLEX(SR)) { phy_speed_new |= PHY_FULL_DUPLEX; } } if (phy_speed != phy_speed_new) { phy_speed = phy_speed_new; if (phy_speed & PHY_LINK) { LOG_D("link up"); if (phy_speed & PHY_100M) { LOG_D("100Mbps"); stm32_eth_device.ETH_Speed = ETH_SPEED_100M; } else { stm32_eth_device.ETH_Speed = ETH_SPEED_10M; LOG_D("10Mbps"); } if (phy_speed & PHY_FULL_DUPLEX) { LOG_D("full-duplex"); stm32_eth_device.ETH_Mode = ETH_FULLDUPLEX_MODE; } else { LOG_D("half-duplex"); stm32_eth_device.ETH_Mode = ETH_HALFDUPLEX_MODE; } /* send link up. */ eth_device_linkchange(&stm32_eth_device.parent, RT_TRUE); } else { LOG_I("link down"); eth_device_linkchange(&stm32_eth_device.parent, RT_FALSE); } } } #ifdef PHY_USING_INTERRUPT_MODE static void eth_phy_isr(void *args) { rt_uint32_t status = 0; HAL_ETH_ReadPHYRegister(&EthHandle, PHY_ADDR, PHY_INTERRUPT_FLAG_REG, (uint32_t *)&status); LOG_D("phy interrupt status reg is 0x%X", status); phy_linkchange(); } #endif /* PHY_USING_INTERRUPT_MODE */ static void phy_monitor_thread_entry(void *parameter) { phy_linkchange(); #ifdef PHY_USING_INTERRUPT_MODE /* configuration intterrupt pin */ rt_pin_mode(PHY_INT_PIN, PIN_MODE_INPUT_PULLUP); rt_pin_attach_irq(PHY_INT_PIN, PIN_IRQ_MODE_FALLING, eth_phy_isr, (void *)"callbackargs"); rt_pin_irq_enable(PHY_INT_PIN, PIN_IRQ_ENABLE); /* enable phy interrupt */ HAL_ETH_WritePHYRegister(&EthHandle, PHY_ADDR, PHY_INTERRUPT_MASK_REG, PHY_INT_MASK); #if defined(PHY_INTERRUPT_CTRL_REG) HAL_ETH_WritePHYRegister(&EthHandle, PHY_ADDR, PHY_INTERRUPT_CTRL_REG, PHY_INTERRUPT_EN); #endif #else /* PHY_USING_INTERRUPT_MODE */ stm32_eth_device.poll_link_timer = rt_timer_create("phylnk", (void (*)(void*))phy_linkchange, NULL, RT_TICK_PER_SECOND, RT_TIMER_FLAG_PERIODIC); if (!stm32_eth_device.poll_link_timer || rt_timer_start(stm32_eth_device.poll_link_timer) != RT_EOK) { LOG_E("Start link change detection timer failed"); } #endif /* PHY_USING_INTERRUPT_MODE */ } /* Register the EMAC device */ static int rt_hw_stm32_eth_init(void) { rt_err_t state = RT_EOK; phy_reset(); stm32_eth_device.ETH_Speed = ETH_SPEED_100M; stm32_eth_device.ETH_Mode = ETH_FULLDUPLEX_MODE; /* OUI 00-80-E1 STMICROELECTRONICS. */ stm32_eth_device.dev_addr[0] = 0x00; stm32_eth_device.dev_addr[1] = 0x80; stm32_eth_device.dev_addr[2] = 0xE1; /* generate MAC addr from 96bit unique ID (only for test). */ stm32_eth_device.dev_addr[3] = *(rt_uint8_t *)(UID_BASE + 4); stm32_eth_device.dev_addr[4] = *(rt_uint8_t *)(UID_BASE + 2); stm32_eth_device.dev_addr[5] = *(rt_uint8_t *)(UID_BASE + 0); stm32_eth_device.parent.parent.init = rt_stm32_eth_init; stm32_eth_device.parent.parent.open = rt_stm32_eth_open; stm32_eth_device.parent.parent.close = rt_stm32_eth_close; stm32_eth_device.parent.parent.read = rt_stm32_eth_read; stm32_eth_device.parent.parent.write = rt_stm32_eth_write; stm32_eth_device.parent.parent.control = rt_stm32_eth_control; stm32_eth_device.parent.parent.user_data = RT_NULL; stm32_eth_device.parent.eth_rx = rt_stm32_eth_rx; stm32_eth_device.parent.eth_tx = rt_stm32_eth_tx; /* register eth device */ state = eth_device_init(&(stm32_eth_device.parent), "e0"); if (RT_EOK == state) { LOG_D("emac device init success"); } else { LOG_E("emac device init faild: %d", state); state = -RT_ERROR; } /* start phy monitor */ rt_thread_t tid; tid = rt_thread_create("phy", phy_monitor_thread_entry, RT_NULL, 1024, RT_THREAD_PRIORITY_MAX - 2, 2); if (tid != RT_NULL) { rt_thread_startup(tid); } else { state = -RT_ERROR; } return state; } INIT_DEVICE_EXPORT(rt_hw_stm32_eth_init); #endif /* BSP_USING_ETH */ ``` drv_eth.h ``` /* * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2018-12-25 zylx first version * 2020-07-18 wanghaijing add SPECIAL_MODES_REG */ #ifndef __DRV_ETH_H__ #define __DRV_ETH_H__ #include
#include
#include
#include
/* The PHY basic control register */ #define PHY_BASIC_CONTROL_REG 0x00U #define PHY_RESET_MASK (1<<15) #define PHY_AUTO_NEGOTIATION_MASK (1<<12) /* The PHY basic status register */ #define PHY_BASIC_STATUS_REG 0x01U #define PHY_LINKED_STATUS_MASK (1<<2) #define PHY_AUTONEGO_COMPLETE_MASK (1<<5) /* The PHY ID one register */ #define PHY_ID1_REG 0x02U /* The PHY ID two register */ #define PHY_ID2_REG 0x03U /* The PHY SPECIAL MODES REGISTER */ #define PHY_SPECIAL_MODES_REG 0x12U /* The PHY auto-negotiate advertise register */ #define PHY_AUTONEG_ADVERTISE_REG 0x04U #define PHY_Status_REG 0x1FU #define PHY_FULL_DUPLEX_MASK (1<<4) #define PHY_Status_SPEED_10M(sr) ((sr) & PHY_10M_MASK) #define PHY_Status_SPEED_100M(sr) ((sr) & PHY_100M_MASK) #define PHY_Status_FULL_DUPLEX(sr) ((sr) & PHY_FULL_DUPLEX_MASK) #ifdef PHY_USING_LAN8720A /* The PHY interrupt source flag register. */ #define PHY_INTERRUPT_FLAG_REG 0x1DU /* The PHY interrupt mask register. */ #define PHY_INTERRUPT_MASK_REG 0x1EU #define PHY_LINK_DOWN_MASK (1<<4) #define PHY_AUTO_NEGO_COMPLETE_MASK (1<<6) /* The PHY status register. */ #define PHY_Status_REG 0x1FU #define PHY_10M_MASK (1<<2) #define PHY_100M_MASK (1<<3) #define PHY_FULL_DUPLEX_MASK (1<<4) #endif /* PHY_USING_LAN8720A */ #ifdef PHY_USING_DM9161CEP #define PHY_Status_REG 0x11U #define PHY_10M_MASK ((1<<12) || (1<<13)) #define PHY_100M_MASK ((1<<14) || (1<<15)) #define PHY_FULL_DUPLEX_MASK ((1<<15) || (1<<13)) /* The PHY interrupt source flag register. */ #define PHY_INTERRUPT_FLAG_REG 0x15U /* The PHY interrupt mask register. */ #define PHY_INTERRUPT_MASK_REG 0x15U #define PHY_LINK_CHANGE_FLAG (1<<2) #define PHY_LINK_CHANGE_MASK (1<<9) #define PHY_INT_MASK 0 #endif /* PHY_USING_DM9161CEP */ #ifdef PHY_USING_DP83848C #define PHY_Status_REG 0x10U #define PHY_10M_MASK (1<<1) #define PHY_FULL_DUPLEX_MASK (1<<2) #define PHY_Status_SPEED_10M(sr) ((sr) & PHY_10M_MASK) #define PHY_Status_SPEED_100M(sr) (!PHY_Status_SPEED_10M(sr)) #define PHY_Status_FULL_DUPLEX(sr) ((sr) & PHY_FULL_DUPLEX_MASK) #define PHY_INTERRUPT_FLAG_REG 0x12U #define PHY_LINK_CHANGE_FLAG (1<<13) #define PHY_INTERRUPT_CTRL_REG 0x11U #define PHY_INTERRUPT_EN ((1<<0)|(1<<1)) #define PHY_INTERRUPT_MASK_REG 0x12U #define PHY_INT_MASK (1<<5) #endif /* PHY_USING_DP83848C */ #endif /* __DRV_ETH_H__ */ ``` 3、配置board.h文件及cubemx配置代码 board.h文件部分 ``` /*-------------------------- ETH CONFIG BEGIN --------------------------*/ /** if you want to use eth you can use the following instructions. * * STEP 1, define macro related to the eth * such as BSP_USING_ETH * * STEP 2, copy your eth init function from stm32xxxx_hal_msp.c generated by stm32cubemx to the end if board.c file * such as void HAL_ETH_MspInit(ETH_HandleTypeDef* heth) * * STEP 3, modify your stm32xxxx_hal_config.h file to support eth peripherals. define macro related to the peripherals * such as #define HAL_ETH_MODULE_ENABLED * * STEP 4, config your phy type * such as #define PHY_USING_LAN8720A * #define PHY_USING_DM9161CEP * #define PHY_USING_DP83848C * STEP 5, implement your phy reset function in the end of board.c file * void phy_reset(void) * * STEP 6, config your lwip or other network stack * */ #define BSP_USING_ETH #ifdef BSP_USING_ETH #define PHY_USING_LAN8720A /*#define PHY_USING_DM9161CEP*/ /*#define PHY_USING_DP83848C*/ #endif /*-------------------------- ETH CONFIG END --------------------------*/ ``` cubemx配置代码及phy_reset ``` void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle) { GPIO_InitTypeDef GPIO_InitStruct = {0}; if(ethHandle->Instance==ETH) { /* USER CODE BEGIN ETH_MspInit 0 */ /* USER CODE END ETH_MspInit 0 */ /* ETH clock enable */ __HAL_RCC_ETH1MAC_CLK_ENABLE(); __HAL_RCC_ETH1TX_CLK_ENABLE(); __HAL_RCC_ETH1RX_CLK_ENABLE(); __HAL_RCC_GPIOG_CLK_ENABLE(); __HAL_RCC_GPIOC_CLK_ENABLE(); __HAL_RCC_GPIOA_CLK_ENABLE(); /**ETH GPIO Configuration PG11 ------> ETH_TX_EN PG14 ------> ETH_TXD1 PG13 ------> ETH_TXD0 PC1 ------> ETH_MDC PA2 ------> ETH_MDIO PA1 ------> ETH_REF_CLK PA7 ------> ETH_CRS_DV PC4 ------> ETH_RXD0 PC5 ------> ETH_RXD1 */ GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_14|GPIO_PIN_13; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Alternate = GPIO_AF11_ETH; HAL_GPIO_Init(GPIOG, &GPIO_InitStruct); GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Alternate = GPIO_AF11_ETH; HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_7; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Alternate = GPIO_AF11_ETH; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); /* ETH interrupt Init */ HAL_NVIC_SetPriority(ETH_IRQn, 0, 0); HAL_NVIC_EnableIRQ(ETH_IRQn); /* USER CODE BEGIN ETH_MspInit 1 */ /* USER CODE END ETH_MspInit 1 */ } } void HAL_ETH_MspDeInit(ETH_HandleTypeDef* ethHandle) { if(ethHandle->Instance==ETH) { /* USER CODE BEGIN ETH_MspDeInit 0 */ /* USER CODE END ETH_MspDeInit 0 */ /* Peripheral clock disable */ __HAL_RCC_ETH1MAC_CLK_DISABLE(); __HAL_RCC_ETH1TX_CLK_DISABLE(); __HAL_RCC_ETH1RX_CLK_DISABLE(); /**ETH GPIO Configuration PG11 ------> ETH_TX_EN PG14 ------> ETH_TXD1 PG13 ------> ETH_TXD0 PC1 ------> ETH_MDC PA2 ------> ETH_MDIO PA1 ------> ETH_REF_CLK PA7 ------> ETH_CRS_DV PC4 ------> ETH_RXD0 PC5 ------> ETH_RXD1 */ HAL_GPIO_DeInit(GPIOG, GPIO_PIN_11|GPIO_PIN_14|GPIO_PIN_13); HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5); HAL_GPIO_DeInit(GPIOA, GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_7); /* ETH interrupt Deinit */ HAL_NVIC_DisableIRQ(ETH_IRQn); /* USER CODE BEGIN ETH_MspDeInit 1 */ /* USER CODE END ETH_MspDeInit 1 */ } } #define ETH_RESET_IO GET_PIN(A, 3) void phy_reset(void) { rt_pin_mode(ETH_RESET_IO, PIN_MODE_OUTPUT); rt_pin_write(ETH_RESET_IO, PIN_HIGH); rt_thread_mdelay(50); rt_pin_write(ETH_RESET_IO, PIN_LOW); rt_thread_mdelay(50); rt_pin_write(ETH_RESET_IO, PIN_HIGH); } ``` 4、选择AXI SRAM内存作为主内存及设置SRAM3 board.h部分代码 ``` /*-------------------------- ROM/RAM CONFIG BEGIN --------------------------*/ #define ROM_START ((uint32_t)0x09000000) #define ROM_SIZE (16 * 1024 * 1024) #define ROM_END ((uint32_t)(ROM_START + ROM_SIZE)) #define RAM_START (0x24000000) #define RAM_SIZE (512 * 1024) #define RAM_END (RAM_START + RAM_SIZE) /*-------------------------- ROM/RAM CONFIG END --------------------------*/ ``` link.lds文件 ![image.png](https://oss-club.rt-thread.org/uploads/20220525/7b2080616f56c6c527663a1a4c6a8519.png) 源码 ``` /* * linker script for STM32H750XBHx with GNU ld */ /* Program Entry, set to mark it as "used" and avoid gc */ MEMORY { ROM (rx) : ORIGIN =0x90000000,LENGTH =16384k RAM (rw) : ORIGIN =0x24000000,LENGTH =512k RAM2 (rw) : ORIGIN =0x30000000,LENGTH =256k RxDecripSection (rw) : ORIGIN =0x30040000,LENGTH =32k TxDecripSection (rw) : ORIGIN =0x30040060,LENGTH =32k RxArraySection (rw) : ORIGIN =0x30040200,LENGTH =32k } ENTRY(Reset_Handler) _system_stack_size = 0x400; SECTIONS { .text : { . = ALIGN(4); _stext = .; KEEP(*(.isr_vector)) /* Startup code */ . = ALIGN(4); *(.text) /* remaining code */ *(.text.*) /* remaining code */ *(.rodata) /* read-only data (constants) */ *(.rodata*) *(.glue_7) *(.glue_7t) *(.gnu.linkonce.t*) /* section information for finsh shell */ . = ALIGN(4); __fsymtab_start = .; KEEP(*(FSymTab)) __fsymtab_end = .; . = ALIGN(4); __vsymtab_start = .; KEEP(*(VSymTab)) __vsymtab_end = .; /* section information for utest */ . = ALIGN(4); __rt_utest_tc_tab_start = .; KEEP(*(UtestTcTab)) __rt_utest_tc_tab_end = .; /* section information for at server */ . = ALIGN(4); __rtatcmdtab_start = .; KEEP(*(RtAtCmdTab)) __rtatcmdtab_end = .; . = ALIGN(4); /* section information for initial. */ . = ALIGN(4); __rt_init_start = .; KEEP(*(SORT(.rti_fn*))) __rt_init_end = .; . = ALIGN(4); PROVIDE(__ctors_start__ = .); KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) PROVIDE(__ctors_end__ = .); . = ALIGN(4); _etext = .; } > ROM = 0 /* .ARM.exidx is sorted, so has to go in its own output section. */ __exidx_start = .; .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) /* This is used by the startup in order to initialize the .data secion */ _sidata = .; } > ROM __exidx_end = .; /* .data section which is used for initialized data */ .data : AT (_sidata) { . = ALIGN(4); /* This is used by the startup in order to initialize the .data secion */ _sdata = . ; *(.data) *(.data.*) *(.gnu.linkonce.d*) PROVIDE(__dtors_start__ = .); KEEP(*(SORT(.dtors.*))) KEEP(*(.dtors)) PROVIDE(__dtors_end__ = .); . = ALIGN(4); /* This is used by the startup in order to initialize the .data secion */ _edata = . ; } >RAM .stack : { . = ALIGN(4); _sstack = .; . = . + _system_stack_size; . = ALIGN(4); _estack = .; } >RAM __bss_start = .; .bss : { . = ALIGN(4); /* This is used by the startup in order to initialize the .bss secion */ _sbss = .; *(.bss) *(.bss.*) *(COMMON) . = ALIGN(4); /* This is used by the startup in order to initialize the .bss secion */ _ebss = . ; *(.bss.init) } > RAM __bss_end = .; .RxDecripSection (NOLOAD) : ALIGN(4) { . = ALIGN(4); *(.RxDecripSection) *(.RxDecripSection.*) . = ALIGN(4); __RxDecripSection_free__ = .; } > RxDecripSection .TxDecripSection (NOLOAD) : ALIGN(4) { . = ALIGN(4); *(.TxDecripSection) *(.TxDecripSection.*) . = ALIGN(4); __TxDecripSection_free__ = .; } > TxDecripSection .RxArraySection (NOLOAD) : ALIGN(4) { . = ALIGN(4); *(.RxArraySection) *(.RxArraySection.*) . = ALIGN(4); __RxArraySection_free__ = .; } > RxArraySection _end = .; /* Stabs debugging sections. */ .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } .stab.excl 0 : { *(.stab.excl) } .stab.exclstr 0 : { *(.stab.exclstr) } .stab.index 0 : { *(.stab.index) } .stab.indexstr 0 : { *(.stab.indexstr) } .comment 0 : { *(.comment) } /* DWARF debug sections. * Symbols in the DWARF debugging sections are relative to the beginning * of the section so we begin them at 0. */ /* DWARF 1 */ .debug 0 : { *(.debug) } .line 0 : { *(.line) } /* GNU DWARF 1 extensions */ .debug_srcinfo 0 : { *(.debug_srcinfo) } .debug_sfnames 0 : { *(.debug_sfnames) } /* DWARF 1.1 and DWARF 2 */ .debug_aranges 0 : { *(.debug_aranges) } .debug_pubnames 0 : { *(.debug_pubnames) } /* DWARF 2 */ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } .debug_abbrev 0 : { *(.debug_abbrev) } .debug_line 0 : { *(.debug_line) } .debug_frame 0 : { *(.debug_frame) } .debug_str 0 : { *(.debug_str) } .debug_loc 0 : { *(.debug_loc) } .debug_macinfo 0 : { *(.debug_macinfo) } /* SGI/MIPS DWARF 2 extensions */ .debug_weaknames 0 : { *(.debug_weaknames) } .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } } ``` 5、开启的网络层 设置均为默认 ![image.png](https://oss-club.rt-thread.org/uploads/20220525/f9d7a95bf1ec1674c89fda26b2979dba.png.webp) 6、运行错误情况 上电 ![image.png](https://oss-club.rt-thread.org/uploads/20220525/f8541809ebb8e28b06dc260bcedea89b.png) ping和ifconfig情况 ![image.png](https://oss-club.rt-thread.org/uploads/20220525/e80fc7122ede9bf9442b5d601a8d7c6a.png) 7、网络环境解释 使用硬件链接不改变 使用默认BSP可以ping通并从DHCP获得IP; 使用4.1.0标准版则ping不同如6所示,并且发送的数据并不会在上位路由器处收到; 求大佬帮忙看看,困惑很久了
查看更多
3
个回答
默认排序
按发布时间排序
wangyujin
2022-05-25
这家伙很懒,什么也没写!
**自问自答:(自问自答区UP hhhhhhhhh)** 原来是非常小的一个问题,偶然间看到一篇帖子说CPU主频慢时ETH正常,反应过来检查了一遍和频率相关的地方,发现CUBEMX生成的默认管脚速度为最低,又看了一遍大佬的帖子https://blog.csdn.net/whj123999/article/details/89842548 下面的参考里有一篇ST的原贴 https://shequ.stmicroelectronics.cn/forum.php?mod=viewthread&tid=615089。 恍然大悟,将MSP生成的的配置看了一遍改为如下: ```c void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle) { GPIO_InitTypeDef GPIO_InitStruct = {0}; if(ethHandle->Instance==ETH) { /* USER CODE BEGIN ETH_MspInit 0 */ /* USER CODE END ETH_MspInit 0 */ /* ETH clock enable */ __HAL_RCC_ETH1MAC_CLK_ENABLE(); __HAL_RCC_ETH1TX_CLK_ENABLE(); __HAL_RCC_ETH1RX_CLK_ENABLE(); __HAL_RCC_GPIOG_CLK_ENABLE(); __HAL_RCC_GPIOC_CLK_ENABLE(); __HAL_RCC_GPIOA_CLK_ENABLE(); /**ETH GPIO Configuration PG11 ------> ETH_TX_EN PG14 ------> ETH_TXD1 PG13 ------> ETH_TXD0 PC1 ------> ETH_MDC PA2 ------> ETH_MDIO PA1 ------> ETH_REF_CLK PA7 ------> ETH_CRS_DV PC4 ------> ETH_RXD0 PC5 ------> ETH_RXD1 */ GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_14|GPIO_PIN_13; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF11_ETH; HAL_GPIO_Init(GPIOG, &GPIO_InitStruct); GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF11_ETH; HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_7; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF11_ETH; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); /* ETH interrupt Init */ HAL_NVIC_SetPriority(ETH_IRQn, 0, 0); HAL_NVIC_EnableIRQ(ETH_IRQn); /* USER CODE BEGIN ETH_MspInit 1 */ /* USER CODE END ETH_MspInit 1 */ } } ``` 上电刷机测试,完美解决! ![image.png](https://oss-club.rt-thread.org/uploads/20220525/527fd5ac80731afdc8373160033b46f4.png) 接下来到BootLoader移植及定制化开发了。
aozima
2022-05-25
调网络不抓包,调I2C等时序不上逻辑分析仪,就像电工不用万用表!多用整理的好的文字,比截图更省流量,还能在整理过程中思考。
你这不是有个能通的基本盘了么,自己研究对比呗。 或直接用这份可以用的不就得了。
yc961213911
2023-12-07
这家伙很懒
这个link.lds文件不适合H743
撰写答案
登录
注册新账号
关注者
0
被浏览
1.2k
关于作者
wangyujin
这家伙很懒,什么也没写!
提问
5
回答
6
被采纳
0
关注TA
发私信
相关问题
1
以太网先上电再连网线通信
2
ethernet 和 use memory layout冲突
3
stm32h743的LAN8720A驱动编译错误, 不知道怎么改
4
关于在stm32F107CVT6中使用以太网芯片DM9161AEP的内存不足异常
5
stm32F107+DM9161AEP的PHY芯片 运行出现错误
6
stm32f107+dm9161的phy芯片报错eth硬件初始化失败
7
stm32f107+DM9161出现硬件初始化问题
8
基于芯片建立工程,以太网卡无法使用
9
SPI总线挂接2个W5500以太网芯片
10
STM32H743 以太网驱动 问题
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
RT-Thread中的time溢出问题,时间戳溢出,解决方法
2
ART-PI使用env驱动ETH网卡,pc和板子可以ping通
3
SystemView线程名字不显示
4
只用网页也能跑RT-Smart 无门槛腾讯Cloud studio + smart-build快速构建
5
免费申请 | FRDM-MCXA156评测活动发布!
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
DMA
USB
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
I2C_IIC
ESP8266
UART
cubemx
WIZnet_W5500
ota在线升级
PWM
BSP
flash
freemodbus
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
编译报错
中断
Debug
rt_mq_消息队列_msg_queue
keil_MDK
ulog
SFUD
msh
C++_cpp
MicroPython
本月问答贡献
RTT_逍遥
8
个答案
2
次被采纳
三世执戟
7
个答案
1
次被采纳
KunYi
6
个答案
1
次被采纳
winfeng
2
个答案
1
次被采纳
chenyaxing
2
个答案
1
次被采纳
本月文章贡献
catcatbing
2
篇文章
5
次点赞
swet123
1
篇文章
3
次点赞
YZRD
1
篇文章
2
次点赞
Days
1
篇文章
2
次点赞
阳光的掌控者
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部