2024-02-08 02:17 PM
I have attached my project. I am running it on a NUCLEO-F429ZI Board. I am using FreeRtos and LWip
I have 2 threads/Tasks.
The first Task is to initialize LWIP and to read some ADC from DMA
The lcd Task is to display text on a 2" LCD through SPI
I have also added a server TCP/IP initialization through the first task
Everything seems to work until I start communicating with a TCP Client.
After a few communication from the client to the server, all my tasks hangs. (See Logic Plot)
And when I pause the debugger, it seems to be stuck in a semaphoreTake as shown on the screenshot of CUBEIde
Anyone has an idea of what is going on ? Thank you
Solved! Go to Solution.
2024-02-10 06:03 PM
I finally found the issue and the ethif thread that is generated in the ethernetif.c was initialized with a stack too low. So I increased it and that solved the issue
2024-02-08 07:49 PM
So I added a vApplicationStackOverflowHook with option1 and that got triggered.
which means I have a memory setting issue somewhere.
I put a breakpoint in the vApplicationStackOverflowHook routine but I can't figure out how to trace back to know where the issue is coming from.
Can someone help ?
Thanks
2024-02-10 06:03 PM
I finally found the issue and the ethif thread that is generated in the ethernetif.c was initialized with a stack too low. So I increased it and that solved the issue
2024-03-03 04:22 PM
Hi I am interested in your project, but am a newbie in the STM32CubeIDE platform. I am able to import and build your project now but don't what I can see from the project. Does the project use DHCP or Static IP? How to check and change it? In addition, where does printf go if I add some prinf? Thanks in advance!!!
2024-03-03 06:12 PM
You can set it up in DHCP or Static in the graphical user interface under stm32cubeide. Click on the IOC file and you can go to LWIP and set it up there. Mine was setup in DHCP.
My printf goes to the serial console. It is setup in the main.c file.
2024-03-03 10:23 PM
Really appreciate your response! 1. I can see your printf going to UART3(PD8) now though I still don't understand how the UART3 mapped to printf(). 2. I changed it to static IP, but ping still failed with "ping: sendto: Host is down". I am using the same NucleoF-429ZI. Do I need to make some change in GPIO configuration? In addition, I do see the error at the serial port : "Assertion "netif already added" failed at line 395 in ../Middlewares/Third_Party/LwIP/src/core/netif.c" .
Here is the auto generated code: