cancel
Showing results for 
Search instead for 
Did you mean: 

is the stm32f207zg MAC controller able to run an UDP (or a TCP) server with multiple client connections using Lwip and HAL or is there any real computing/memory limitation?

genisuvi
Associate III

I have a server -HAL library based- implementation that seems works correctly with one client. Client application is made by python running on a windows 11. I have spent too many months trying to have a server working for several hours but it achieves some point that: a) disconnects client or b) launches hardfault. Server application uses LwIP, working with static POOL for pBuf defined in lwipoptions.h.

First we were trying it with RTOS, but tried also with no RTOS -this way nowadays-.

FreeRTOS:

It first was made adding FreeRTOS and using netif API. It was made for UDP and TCP versions. But the same result when connects with more than one clients. After some working hours, we get a hardfault we are unable to track. As we are not FreeRTOS experts and our trying FreeRTOS methods were unuseful, we decided to remove FreeRTOS from the compilation. So we now are using RAW api.

No FreeRTOS:

Here TCP echo server gets hardfault after some hours with 3 client connections. After this, we tried to run UDP echo. Here we have seen that after some days working under the same test, server attended 70milions of requests with no hardfault. We manually stopped execution. We don't know if hard fault would be achieved some commands later.

Now we replace the server echo answer for some microcontroller's GPIOs read/write results answer (implementation of request-answer is such as echo). Server sends the result to the clients in a data payload less than 20bytes. There is some times hardfaults issues but some other ones MAC stops receiving data (no hard fault) due to DMA doesn't free anymore the descriptor (no flag error detection is set). No hard fault error situation is impossible to revert unless you resets the mcu. No hal_deInit plus hal_Init mac resets MAC reception.

Application uses LwIP, configured for working with static POOL for pBuf in lwipoptions.h. Reading/writing GPIOs is not using dynamic variables. I have declarated static arrays of 17 uint8 type elements.

We have spent a lot of weeks trying to get an ethernet communication between a server an more than one clients. Application achieves hardfault or no more MAC reception point. I try to ask for Lwip, FreeRTOS, HAL or microcontroller issues at everywhere. But the only that I found is a lot of people with not solved similar situations.

Taking in to account all of my observations about developers claims, absence of any TCP/UDP supporting multiclient server examples, reported HAL ethernet related bugs, developers's posts with not solved issues, there is for me no evidences that a server (TCP neither UDP ones) with multiple clients connections could be achieved using Lwip and Cortex-M3 devices.

As this is the final test for a production product validation to be launched as soon as possible, I'm worried about:

  • Could anyone with enough experience on emebbed ethernet field says if what I'm concluding has any sense for him/her?
  • Should we throw this microcontroller and Lwip to the trash for this project?
  • Should we throw the idea of having a server attending up to 10 clients running on any microcontroller (not microprocessor) for this kind of project?
  • Does this server-client communication target needs an stm32 device upgrade?

0 REPLIES 0