Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

FreeRTOS+lwip on lpc1833 controller.

Posted by jayeshbhoi on October 7, 2014

Hi, I have ported the lwip stack on LPC1833 microcontroller(ARM cortex-M3). There are total 6 tasks in my application. This controller communicate with another device in which standard linux network stack is running. The communication is working fine for some minutes and after that it will continues in loop in task "prvIdleTask". In this task it call the "prvCheckTasksWaitingTermination" and in which following condition always fail

while( uxTasksDeleted > ( unsigned portBASE_TYPE ) 0U ) {

//some code }

So, it will never enter in "while..loop" and not switch the task.

I am using freeRTOS V7.3.0 and lwip v1.4.1.

Can any one have idea about what is wrong here?

Regards, Jayesh


FreeRTOS+lwip on lpc1833 controller.

Posted by rtel on October 7, 2014

Here is a copy of the answer I just posted on the other forum on which you posted the exact same question:

"If the idle task is running then there are no application tasks that are able to run - so all your application tasks are blocked on something or are simply delaying.

Inside the idle task it is checking to see if any tasks have been deleted in order that it might clean up the RAM allocated to those tasks by the kernel. If no tasks have been deleted then it will not enter the loop. I think that is explained in the comments above the code you pasted. Is there any reason you think it should enter the loop?"

Regards.


FreeRTOS+lwip on lpc1833 controller.

Posted by jayeshbhoi on October 8, 2014

is any way to know in which task it's stuck OR which tasks are blocked?

For your information the lwip's tcp ip thread have highest priority 4, other two task have priority 3 and remaining three tasks have priority 2.


FreeRTOS+lwip on lpc1833 controller.

Posted by rtel on October 8, 2014

You can use FreeRTOS+Trace to visualise the behaviour. There are also several kernel aware state viewer plug-ins. If you are using the LPCXpresso IDE then I think the Eclipse plug-in will work for you.

Regards.


FreeRTOS+lwip on lpc1833 controller.

Posted by jayeshbhoi on October 8, 2014

I manually check the task status by using eTaskStateGet function and found that two task are in block state,1 task is suspended state and other 3 are in ready state.

So can suggest me why always running idle task?


FreeRTOS+lwip on lpc1833 controller.

Posted by rtel on October 8, 2014

So can suggest me why always running idle task?

There is of course no way I can deduce that without actually studying your source code, and even then it would probably take some time to work it out, but my first suspicion would be that you have not set the interrupt priorities correctly.

http://www.freertos.org/FAQHelp.html -> http://www.freertos.org/RTOS-Cortex-M3-M4.html

Regards.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS