I have a question in connection with the lwIP concerto example. The lwIP timer is served in a SysTick interrupt handler. But what will happen if i have an infinite loop for example in my data sending function? Will a next SysTick interrupt occur or SysTick interrupt is disabled somewhere in the lwipTimer() function?Thanks in advance.Regards,Tamas
The definition of lwIPTimer() is found in .\MWare\utils\lwiplib.c. It simply triggers the Ethernet interrupt handler by forcing a software trigger of the Ethernet Interrupt in the NVIC.
Hi Brandon,Thank you for your last answer. My question is focusing on the interrupt events. Why doesn't happen a SysTickInterrupt during the EthernetInterrupt?They SysTickInterruptHandler() call the lwIPTimer() which triggers the EthernetInterruptHandler(). And for example if i have an UDP packet sender in the EthernetInterruptHandler() which works in an infinite loop, the SysTickInterruptHandler() and so the lwipTimer() are not called anymore. But why not?I think the UDP packet sender is handled in the Ethernet interrupt not in the lwIPTimer() since it just trigger the Ethernet Interrupt. Obviously i am wrong, but i would like to know have it works.
The lwIPEthernetIntHandler() interrupt service routine for the Ethernet MAC (triggered by lwIPTimer()), runs the handling of the interrupt within the interrupt context IF this is configured to run without an OS (ie. NO_SYS precompiler flag is set). This is found in lwiplib.c.
To trace through this, I performed a series of greps to trace through the call path. You should be able to perform the same and see the concertoif_interrupt() is either called within the lwIPEthernetIntHandler() if NO_SYS is defined, or in a process that is pending on a semaphore if a RTOS is used. If the RTOS is used, the concertoif_interrupt() is likely called in a task that has interrupts reenabled.
Thank you Brandon for the help! My problem was that i needed a precise time and sometimes the SysTick wrapped while i was in the Ethernet Interrupt Handler. So at that time i always got a wrong system time. That is why i didn't understand the concept of the example program, but now i could eliminate this issue with the reading of the COUNT flag of the STCTRL register which set if the systick reach the zero value. And if i would like to create a timestamps for an IP packet i can calculate it.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.