2023-11-30 06:57 AM - edited 2023-11-30 06:58 AM
Hi, I'm trying to get the ethernet interface to work on an STM32H745. After fixing various hardware problems, now I don't just have software problems.
I created a simple project with CubeMX, basically I did these things:
- Enabled ethrmnet interfaces
- Set all pins related to "very high speed"
- Enabled LWIP with static IP set to 10.0.1.100/24
- Increased Heap Memory size to 10k
- Configured the MPU as in the attached document
- In the flash.ld file I added this piece:
.lwip_sec (NOLOAD) :
{
. = ABSOLUTE(0x30000000);
*(.RxDecripSection)
. = ABSOLUTE(0x30000200);
*(.TxDecripSection)
} >RAM_D2
Then in the mail loop I just put this function: MX_LWIP_Process();
I connected an ethernet cable to the board, the link status LEDs light up well, but I can't ping the board's IP.
I think I've done a really basic setup, where could I have gone wrong?
The only doubts I have are about memory:
- have I configured the MPU correctly?
- did I modify the FLASH.ld file correctly?
- Should I somehow configure the address of the LWIP_RAM_HEAP_POINTER (RAM Heap Pointer) in the MPU or in the FLASH.ld file, if so, how?
- Am I missing any other steps to do? Something to change in my confgiration?
I saw that there are many many posts on this topic, I have read many but I haven't been able to solve the problem yet.
Can you help me?
2023-11-30 07:06 AM
Obvious questions (I'm assuming a one to one connection without DHCP) you've configured your PC network card and IP settings to the same network range etc?
2023-11-30 07:57 AM
Yes, from a configuration point of view everything should be ok, PC and board have compatible IPs, same subnet mask and same gateway. Between them there is only a small desk ethernet switch.
2023-11-30 08:06 AM
Ok, sorry I can't help much with the H7 memory.
Last comment I have is that you should (at least this always works in my setups) be able to directly connect PC to Board (without using the switch). This would allow you to rule out any erroneous setup options of the switch e.g. fixed duplex / speed / negotiation etc.
Hope someone else can help you specifically on the H7.
2023-12-01 04:19 AM
2023-12-01 08:44 AM
Unfortunately not, I took inspiration exactly from that article for the configuration, but it doesn't work.
2023-12-01 03:31 PM
Is this a custom board with custom PHY?
> I created a simple project with CubeMX
That's very possible the problem. No project is too simple to be bug-free, Before creating anything with CubeMX, start from some example project, make it work as is. Only then change things. When it breaks, revert last change.
2023-12-07 08:21 AM
Hi @FMass.1 ,
I advise you to start with an available STM32H747_Disco_M7_ETH example and get inspired to configure your own project.
I hope this help you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.