2024-07-20 08:28 AM
I have read quite a few threads about ethernet on the H7, along with several internet posts.
I've followed this guide:
As well as this guide:
https://github.com/AnielShri/STM32H745_Ethernet/blob/master/Documentation/lwip_nortos.md
They are similar, with some slight differences with the MPU cache settings.
My first test is just basic ICMP - which doesn't work. That is, until I comment out this line:
SCB_EnableDCache();
So, of course, that implies something with the data cache, and memory locations.
So, my settings looks like these:
LWIP settings:
I've added the following to the linker script:
/* Modification start */ .lwip_sec (NOLOAD) : { . = ABSOLUTE(0x30040000); *(.RxDecripSection) . = ABSOLUTE(0x30040060); *(.TxDecripSection) . = ABSOLUTE(0x30040200); *(.RxArraySection) } >RAM_D2
Sometimes, I get this error upon each ICMP packet that is received:
Assertion "pbuf_free: p->ref > 0" failed at line 753 in ../Middlewares/Third_Party/LwIP/src/core/pbuf.c
Again, it goes away when I disable the dcache. I'm not sure what else to try. I must have something not quite right.
Thanks.