cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with FreeRTOS and lwIP Netconn API

MLang.7
Associate III

Hello,

I'am experimenting on using FreeRTOS in combination with lwIP. For that I am trying to rework some code by replacing lwIP's raw API with the netconn API. Now I am encountering two big problems:

1: Using FreeRTOS with CMSIS V2:

When setting up a new project, I can chose betwen CMSIS V1 and V2. When selecting CMSIS V2 and setting up lwIP, it doesn't work. All tasks seem to run, but the board isn't able to comnnect via LAN. When switching back to CMSIS V1 connecting to LAN works fine. That as such isn't big of a problem, but since I see various examples where CMSIS V2 is used I am concerned.

2: Using Netconn API for UDP transmission:

I am able to successfully receive UDP packets via a netconn connection (netconn_recv()). But when sending data with either netconn_send or netconn_sendto the application stops working.

I feel, that both problems are caused by the lwIP stack - presumably a faulty configuartion. Since I am using the NUCLEO-H743ZI2 I followed this instruction, which worked very well when using without RTOS. Now with RTOS, I am unable to transmit data which is quite confusing, as I am strictly following the instruction :expressionless_face:

2 REPLIES 2
Piranha
Chief II

https://community.st.com/s/question/0D50X0000BOtfhnSQB/how-to-make-ethernet-and-lwip-working-on-stm32

Recently the driver for H7 has been replaced with a reasonably usable one, but almost all of the other issues are still there.

MLang.7
Associate III

Dear Piranha, thank you for your advice. In the meantime I have found several statements in other forums, that the driver for the H7 is flawed in particular and might cause the problems with CMSIS V2. Since I am not experienced enough to replace the current driver with the new one I will continue with CMSIS V1.

Regarding my second problem, I think it is caused by insufficient memory allocation. I got it working yesterday and will sort it out today (I hope).