|
From: | Greg Smith |
Subject: | Re: [lwip-users] R: R: ping slow down |
Date: | Thu, 2 Jun 2016 13:51:07 +0000 |
Hi, Rastislav and Noam. Noam, thank you for those links. I used similar ones for the ST part
and they were very helpful. I hope Rastislav finds them useful, too. Rastislav, the approximate priorities of your
tasks is very similar to how I have mine setup. I'm not an expert (I'm still learning lwIP myself), but it seems about right and is working for me. About your task priorities: be careful not to mix together your hardware's (Infineon's) IRQ priorities and FreeRTOS' priorities -- they don't relate to each other.
So 20 (out of 63) is approximately where I put my MAX_SYSCAL_INTERRUPT_PRIORITY. (Technically, I have mine as 7 out of 15). If the other task, the one at 25, is triggered by a hardware interrupt, then I think you have it set too low. It should probably
be set to a higher priority (i.e. a lower numerical value, say 19). If that "25" is a FreeRTOS task priority, then there is no relation and it will always get pre-empted by a hardware IRQ. (At least, that is my understanding
of FreeRTOS.) I would also suggest using far fewer RTOS task levels -- maybe 5 or 7 at most. (That is set with configMAX_PRIORITIES.) There's an art to interrupts and priorities, which makes it a little hard to describe in an E-mail. So please ask if you have more questions. Good luck! -- G From: lwip-users [mailto:lwip-users-bounces+address@hidden
On Behalf Of Noam Weissman Hi Rastislav, Check the following link if they have some info that may help you. http://www.freertos.org/Infineon-ARM-Cortex-M4-XMC4000-RTOS.html http://www.freertos.org/FreeRTOS-for-Infineon-XMC4000-Cortex-M4.html BR, Noam. From: lwip-users [mailto:lwip-users-bounces+address@hidden]
On Behalf Of Rastislav Uhrin Hi Greg, Thanks for your thoughts. I am exactly on same configuration as you except I am using Infineon C4. I want to ask about priorities of RTOS tasks ETHRx - task which extracts frame fills pbuf and sends to tcpip, waits on semaphore from interrupt – RTOS priority is say “middle” TCPIP - task of lwIP – RTOS priority “higher” My application task working with sockets – RTOS priority “lowest” Of course in real application there are more 12 other tasks with different priorities. Is this arrangement correct? About MAX_SYSCAL_INTERRUPT_PRIORITY this is 20 (of 63) and task which sends semaphore is 25 (“lowest interrupt priority” ). There are some other 10 interrupts
distributed, some bellow 20 which need to run always, other above 20 which need to be disabled by OS when needed. But I have build simple application with only lwIP and nothing else and ping is delayed. I was puzzled by this regular behavior. Thanks rum Da: lwip-users [mailto:lwip-users-bounces+address@hidden]
Per conto di Greg Smith Hi, Rastislav. This email has been scanned for email related threats and delivered safely by Mimecast. This email has been scanned for email related threats and delivered safely by Mimecast. For more information please visit http://www.mimecast.com |
[Prev in Thread] | Current Thread | [Next in Thread] |