Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
STM32H7
PHY_DM9162
stm32h743+dm9162 ping不通
发布于 2021-06-18 19:51:58 浏览:1466
订阅该版
说明: 开发板:安富莱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.5k
关于作者
追光者
这家伙很懒,什么也没写!
提问
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
五分钟玩转RT-Thread新社区
5
国产MCU移植系列教程汇总,欢迎查看!
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
[Vision Board创客营]WDT实践之配置、issue、PR一条龙
2
恩智浦FRDM-MCXN947上的RW007联网实践
3
[Vision Board创客营]学习片上Flash移植FAL
4
MCXN947测评系列(二)串口设备测评
5
NXP MCXN947实践:基于 rt-thread的驱动模块配置PWM
热门标签
RT-Thread Studio
串口
LWIP
Env
SPI
Bootloader
AT
ART-Pi
CAN总线
Hardfault
FinSH
USB
文件系统
DMA
RT-Thread
SCons
线程
RT-Thread Nano
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
ota在线升级
WIZnet_W5500
I2C_IIC
UART
cubemx
flash
packages_软件包
freemodbus
潘多拉开发板_Pandora
PWM
定时器
ADC
BSP
中断
keil_MDK
编译报错
socket
MicroPython
GD32
msh
Debug
ulog
SDIO总线
SFUD
rt_mq_消息队列_msg_queue
C++_cpp
本月问答贡献
xiaorui
6
个答案
3
次被采纳
sakumisu
4
个答案
3
次被采纳
三世执戟
31
个答案
1
次被采纳
梦笑真美
17
个答案
1
次被采纳
踩姑娘的小蘑菇
13
个答案
1
次被采纳
本月文章贡献
Z_Y
2
篇文章
5
次点赞
2345vor
2
篇文章
1
次点赞
比特饼干
1
篇文章
6
次点赞
Lu_盼盼
1
篇文章
3
次点赞
猪的行独
1
篇文章
3
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部