2025-04-30 4:50 AM
Hello guys.
I've bought Riverdi 12.1” board that mounts STM32H757XIH6.
I developed graphic part and I use uSD, and USB Mass-Storage without any problems.
I use FreeRTOS and FatFS.
Now it's time to use Ethernet, so I bought PoE - Riverdi, enabled LWIP library following instructions on the video How to use Ethernet on Riverdi STM32 Embedded Displays || PoE Add-on.
I set MX in this way:
The linker script
ethernetif.c
I compiled and I connect ethernet cable and it seems work poperly because if I ping I obtain right answer,
but! sometimes processor goes to HardFault
I've writed simple TCP server that accept connection on port 100 and send "Hello" every second.
When I try to connect with TERA TERM it goes immediately on HardFault.
Here the code of ethernet_input
Can someone Help me ?
Thankyou in advance
2025-04-30 5:19 AM
Cuold be insufficient stack size.
Look at the ethhdr pointer and ensure it's valid. If it's not, set up a hardware watchpoint to see where and when it's changed.
2025-04-30 5:42 AM - edited 2025-04-30 7:19 AM
Yes TDK I watch the address: is 0x28000045
and ethhdr->type is 0x24001b64
how to increase stack size for tcpip_thread ? maybe TCPIP_THREAD_STACKSIZE ?
2025-04-30 6:06 AM - edited 2025-04-30 6:08 AM
it seems msg->msg.inp.p point to invalid address: 0x28 ...
No RAM @ 0x28...
2025-04-30 7:18 AM
what do you intend ? set up a hardware watchpoint to see where and when it's changed
how can I see whene it's changed ?
2025-04-30 7:27 AM
Another question that I want to higlight, counld be that I have not enabled D-Cache ?
2025-04-30 7:48 AM
Here's how to set a watchpoint:
You want to watch for the pointer to change, so add ðhdr as the expression.
2025-05-02 2:01 AM - edited 2025-05-02 2:01 AM
Hello @MauFanGilaMedical ,
Have you increase the stack size from STM32CubeMX as you show on one of your messages ?
Are you able to make the PoE (and ethernet in general) work without TouchGFX (or other implementations) ?
Can you check that the types on line 113 match, also check that ethhdr->type is properly initialized ?
Have you enabled your watchpoint ?
Not enabling D cache should not be an issue.
You could also ask for help on the Riverdi forum, maybe they have more informations.
Regards,
2025-05-04 11:06 PM
Watchpoint is disabled maybe ethhdr is a local variable
2025-05-05 12:34 AM
When I go to HardFault I shot the stack and see if one thread stack overlap the next but I don't see this situation