Quality RTOS & Embedded Software

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




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) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists