2020-08-20 05:26 PM
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.
2020-08-20 06:31 PM
> 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.
2020-08-20 07:47 PM
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.
2020-08-20 07:59 PM
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.
2020-08-21 05:02 AM
i am stuck in this loop
if(((heth->RxDesc->Status & ETH_DMARXDESC_OWN) == (uint32_t)RESET))
status never changed here
2020-08-22 05:30 AM
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.