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] [December 2011 Threads] DeletePosted by Braun on December 2, 2011 Hi,
Wenn ich den Task lösche wird er nicht mehr aufgerufen. Was mache ich falsch?
void main ( void ) {
DVK_setLEDs(0x0000); unsigned int i; i = xTaskCreate( vZustand, "Zustand", 1000, NULL, 1, NULL ); if( i == pdTRUE) //Task Zusatndsmaschine erstellen und abfragen ob er erstellt wurde { vTaskStartScheduler(); //Scheduler starten } else { DVK_setLEDs(0x0001); //Anzeige Task nicht erstellt } while(1) { DVK_setLEDs(0x0001); } } void vZustand( void *pvParameters ) { const portTickType xDelay_ms = 100 / portTICK_RATE_MS; for(;;) { switch (0) { case 0: DVK_setLEDs(0x0000); xTaskCreate( vTask10, "Task 10", configMINIMAL_STACK_SIZE, NULL, 2, &xTask10Handle ); vTaskDelay(xDelay_ms); break; default: state=0; } } } void vTask10( void *pvParameters ) { taskdelete++; vTaskDelete( xTask10Handle ); }
RE: DeletePosted by Richard on December 2, 2011 You haven't said what is not working, but..... vTaskDelete( xTask10Handle ); If you are using an older version of FreeRTOS, try changing this line to: vTaskDelete( NULL );
RE: DeletePosted by Braun on December 2, 2011 Now the task is run 27 times. Then no more. If I follow the debugging, I get the error message: xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY;
RE: DeletePosted by Richard on December 2, 2011 Which memory allocation method are you using? heap_1.c, heap_2.c, heap_3.c or your own implementation?
If you are using heap_1, switch to heap_2. See http://www.freertos.org/a00111.html
Regards.
RE: DeletePosted by Braun on December 2, 2011 Thank you I've also noticed it straight. https://sourceforge.net/projects/freertos/forums/forum/382005/topic/3690913 But thank you again for your prompt assistance.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|