STM32F767zi - MX_LWIP_Process()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-20 5: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.
- Labels:
-
Ethernet
-
STM32F7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-20 6: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-20 7: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-20 7: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-21 5:02 AM
i am stuck in this loop
if(((heth->RxDesc->Status & ETH_DMARXDESC_OWN) == (uint32_t)RESET))
status never changed here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-22 5: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.
