Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
STM32H7
PHY_DM9162
stm32h743+dm9162 ping不通
发布于 2021-06-18 19:51:58 浏览:1887
订阅该版
说明: 开发板:安富莱h7开发板, 芯片stm32h743xih7 开发工具:win10系统,ip固定为192.168.1.31; IDE为rt-thread studio 2.0 项目配置: * 按芯片型号添加RT-Thread v4.02项目; * board.h取消eth部分相应注释,启动dm9161驱动; * stm32h7xx_hal_conf中取消HAL_ETH_MODULE_ENABLED注释; * board.c中添加eth_msp初始化及phy_reset函数; * rt-thread设置添加LWIP,取消DHCP,固定ip为192.168.1.30 其他:默认drvers下面的drv_eth驱动报错,从art-pi的sdk中拷贝drv_eth.c及drv_eth.h。 修改phy_reset部分,reset是开发板复位键所以是空的; drv_mpu.c ```c 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_NOT_CACHEABLE; // MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; // MPU_InitStruct.Number = MPU_REGION_NUMBER0; // MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1; // 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); //#endif /* 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_NUMBER0; 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_NUMBER1; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; MPU_InitStruct.SubRegionDisable = 0x00; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE; HAL_MPU_ConfigRegion(&MPU_InitStruct); /* 配置AXI SRAM的MPU属性为Write through, read allocate,no write allocate */ 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); /* Enable the MPU */ HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT); /* Enable CACHE */ SCB_EnableICache(); SCB_EnableDCache(); return RT_EOK; } INIT_BOARD_EXPORT(mpu_init); ``` link文件 ![微信截图_20210618195006.png](https://oss-club.rt-thread.org/uploads/20210618/c24c94d259e39f39995ffd0021826b3c.png) 结果: ![微信截图_20210618194431.png](https://oss-club.rt-thread.org/uploads/20210618/845144a53e8e187edc94974e6e6ae21f.png)
查看更多
adaphoto
2021-06-19
这家伙很懒,什么也没写!
Nucleo-H743ZI上驱动网口,并移植lwip的过程总结 - RT-Thread问答社区 https://club.rt-thread.org/ask/article/2719.html 参考一下我的笔记,希望对你有帮助
1
个回答
默认排序
按发布时间排序
撰写答案
登录
注册新账号
关注者
0
被浏览
1.9k
关于作者
追光者
这家伙很懒,什么也没写!
提问
7
回答
4
被采纳
0
关注TA
发私信
相关问题
1
反馈rtt串口驱动对低功耗串口lpuart1不兼容的问题
2
stm32h743 usb vcom无法启动
3
有stm32h7 adc驱动吗?
4
STM32H7可以用rtthread的通用bootloader吗?
5
STM32H750 FDCAN通信异常
6
将rt-thread工程移植到正点原子的H7板子上 RW_IRAM1如何修改
7
从文件系统中循环显示图片,该怎么操作?
8
STM32H7移植RT-thread卡在hardfault中
9
STM32H7 LWIP移植
10
stm32h7系列的spi4和spi5的分频系数计算对吗?
推荐文章
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】【ci】【scons】将ci.attachconfig.yml和scons结合使用
2
Rt-thread中OTA下载后,bootloader不搬程序
3
ulog 日志 LOG_HEX 输出时间改为本地日期时间
4
在RT-Thread Studio中构建前执行python命令
5
研究一了一段时间RTT,直接标准版上手太难,想用nano,但又舍不得组件
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
I2C_IIC
ESP8266
UART
WIZnet_W5500
ota在线升级
cubemx
PWM
flash
freemodbus
BSP
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
flashDB
GD32
socket
编译报错
中断
Debug
rt_mq_消息队列_msg_queue
SFUD
msh
keil_MDK
ulog
C++_cpp
MicroPython
本月问答贡献
xusiwei1236
8
个答案
2
次被采纳
踩姑娘的小蘑菇
1
个答案
2
次被采纳
用户名由3_15位
9
个答案
1
次被采纳
bernard
4
个答案
1
次被采纳
RTT_逍遥
3
个答案
1
次被采纳
本月文章贡献
聚散无由
2
篇文章
15
次点赞
catcatbing
2
篇文章
5
次点赞
Wade
2
篇文章
4
次点赞
Ghost_Girls
1
篇文章
7
次点赞
xiaorui
1
篇文章
2
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部