cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F767zi - MX_LWIP_Process()

KMale.1
Associate II

Hello,

I just started working with STM32f767zi board. I'm doing TCP Ethernet communication using lwip RAW API. I could be able to start the communication with the host. But the problem is, in my forever loop I put MX_LWIP_Process() function. If I put a 2 second delay in the while loop, then communication did not happen within that time period. Is there any solution for this matter? I want to do this in RAW API (without RTOS)

Thank you.

5 REPLIES 5
TDK
Guru

> If I put a 2 second delay in the while loop, then communication did not happen within that time period. Is there any solution for this matter?

One solution is not putting in a 2 second delay. Perhaps you can explain why you're putting it there.

If you feel a post has answered your question, please click "Accept as Solution".
KMale.1
Associate II

Sorry for not explaining about delay. I'm communicating with the touch panel via Ethernet. So from the value which is obtain from the touch panel, I want to rotate a servo motor. So while rotating the servo I cannot communicate with the touch panel.

TDK
Guru

Without using an RTOS, you can either :

1) I'm not sure if MX_LWIP_Process() can be called within an interrupt or not. If it can, you could move it to an interrupt which is called with some regular frequency.

2) Make the server motor processing non-blocking by implementing it with an interrupt or using DMA or similar. How you do that will depend on what sort of signal you need to send. If it's just a PWM at some frequency for some duration, the timers can take care of that without needing the CPU. Motion controllers often have an interrupt which is called at a very high rate and handles server/motor communications. Your main loop would then tell the motion control scheme what to do and the high-rate interrupt would execute the motion.

I don't particular like programming with an RTOS but it does make these sorts of problems trivial to solve.

If you feel a post has answered your question, please click "Accept as Solution".
dbgarasiya
Senior II

i am stuck in this loop

 if(((heth->RxDesc->Status & ETH_DMARXDESC_OWN) == (uint32_t)RESET))

status never changed here

Thank you for the reply. I tried with interrupt but it not worked. Don't know whether my method is write or wrong. I tried with global Ethernet interrupts.