STM32H745 and Ethernet
I have read quite a few threads about ethernet on the H7, along with several internet posts. Part of me wonders if I should even try... But I am.
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.
For me, the first post results in a hard fault. But with the second, I am able to boot.
While I would eventually like to get to RTOS, at the moment I'm just trying to implement this using LWIP.
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_D2Sometimes, 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.cAgain, it goes away when I disable the dcache. I'm not sure what else to try. I must have something not quite right. Thanks.
