Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
STM32H7
PHY_DM9162
stm32h743+dm9162 ping不通
发布于 2021-06-18 19:51:58 浏览:1649
订阅该版
说明: 开发板:安富莱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.6k
关于作者
追光者
这家伙很懒,什么也没写!
提问
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
机器人操作系统 (ROS2) 和 RT-Thread 通信
4
国产MCU移植系列教程汇总,欢迎查看!
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 全球电子设计大赛】基于vision board 的巡检除冰机器人
2
新手教程-Pin设备使用
3
基于嵌入式的智能关怀系统#24嵌入式设计大赛
4
基于机器视觉识别自动跟踪器
5
[24嵌入式设计大赛]基于Vision-Board的智能应急环境监测控制小车
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
ART-Pi
FinSH
USB
文件系统
DMA
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
rt-smart
FAL
ESP8266
I2C_IIC
ota在线升级
WIZnet_W5500
UART
flash
packages_软件包
cubemx
PWM
freemodbus
BSP
潘多拉开发板_Pandora
定时器
ADC
中断
flashDB
socket
Debug
GD32
编译报错
msh
keil_MDK
at_device
MicroPython
rt_mq_消息队列_msg_queue
ulog
C++_cpp
本月问答贡献
rv666
6
个答案
1
次被采纳
踩姑娘的小蘑菇
5
个答案
1
次被采纳
用户名由3_15位
5
个答案
1
次被采纳
xiaorui
2
个答案
1
次被采纳
张世争
2
个答案
1
次被采纳
本月文章贡献
jaffer
1
篇文章
5
次点赞
rtt_dmx
1
篇文章
4
次点赞
BRICK PORTER
1
篇文章
2
次点赞
不灬忘初心
1
篇文章
2
次点赞
flytianya2010
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部