FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2010 Threads] LM3S811 demo questionsPosted by Antonio Pessina on March 23, 2010 Hello.
I'm learning to use the FreeRTOS and I'm modifying the LM3S811 demo. I've added a simple led flasher task, getting good results. Then I've added a very simple dummy task which increments a variable. Also this new task works ok, but... the vCheckTask fails, returning xErrorOccurred = pdTRUE. This strange behaviour appears when I add the dummy task to the existing ones and also when I leave it alone removing from the code the led flasher task. In other words, the problem seems to be related to the dummy task itself.
I use the heap_1.c and I set the following defines to:
#define configMINIMAL_STACK_SIZE( ( unsigned short ) 70 ) #define configTOTAL_HEAP_SIZE( ( size_t ) ( 7500 ) )
Here's the small piece of code that I use:
static void vDummyTask( void *pvParameters ); xTaskCreate( vDummyTask, "Dummy", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); static void vDummyTask( void *pvParameters ) { unsigned portLONG ulSpy = 0; for( ;; ) { ulSpy++; } }
Any suggestion?
Thank You
Antonio
RE: LM3S811 demo questionsPosted by MEdwards on March 23, 2010 Your task never enters the Blocked state so will starve tasks that use lower priorities. The check task looks at every task to ensure it is still running and will indicate an error if any are being starved of processing time.
Try adding vTaskDelay(10) to the loop, or creating the task at the idle priority. Either will then allow lower priority tasks to continue executing.
RE: LM3S811 demo questionsPosted by Antonio Pessina on March 24, 2010 Great!!! You're completely right. The little vTaskDelay (10) added to the loop is enough to fix the problem. I'm checking in this exact moment to what happens in the vCheckTask, setting some breakpoints to get the fail reason. I can see that the error flag is set because the following condition is met: if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) xErrorOccurred = pdTRUE; Thank You Very Much Antonio (Milano-Italy)
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|