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 2015 Threads] Freertos stuck in vTaskDelayPosted by smallbook on December 9, 2015 hello i'am using FreeRtos API with stm32f4 microcontroller , the program gets stuck when it enters vTaskDelay , when I debug it I see that it is stuck in this line (2588 of tasks.c at function vTaskDelay)
if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > (UBaseType_t ) 1 )
{
taskYIELD();
}
thaks a lot for your answers
Freertos stuck in vTaskDelayPosted by heinbali01 on December 9, 2015 Hi
When I go to line 2588 in tasks.c I see totally different code.
Would it be possible for you to download the latest official version from freertos.org (V8.2.3) and try that first?
If your code is still simple, you might want to post some code here?
Freertos stuck in vTaskDelayPosted by smallbook on December 9, 2015 hi , i'm using freeRtos v8.1.2 here is a sample of what i'am triying to do , the code get stuck when it enters the vTaskDelay
~~~~
int main()
{
rccclkconfig(); // co,figures system clk to run on 100 Mhz
gpio_config(); // enable the portD clk
SystemCoreClockUpdate(); // updates the system core clk
xTaskCreate( vTask1, "Task1", 150, NULL, 1, NULL );
vTaskStartScheduler();
}
// bliking port D
void vTask1(void *pv1)
{
while(1)
{
GPIOD->BSRRL=GPIOPin12|GPIOPin13|GPIOPin14|GPIOPin15;/// BSRRL = set
vTaskDelay((TickTypet)200);
GPIOD->BSRRH=GPIOPin12|GPIOPin13|GPIOPin14|GPIOPin15;// BSRRH = reset
vTaskDelay((TickTypet)200);
}
}
~~~~
i have tested that the code before vTaskStartScheduler() runs correctly
Thank you verry much for your reply
Freertos stuck in vTaskDelayPosted by rtel on December 9, 2015 Are you sure the tick interrupt is executing? If you put a break point in xTaskIncrementTick in FreeRTOS/Source/tasks.c does it ever get hit.
Do you have configASSERT defined? http://www.freertos.org/a00110.html#configASSERT
Freertos stuck in vTaskDelayPosted by smallbook on December 9, 2015 The code of "xTaskIncrementTick "is not reached during the debug session
I don't have a "configASSERT "
according to the link you specified , some functions should be defined inside a new file called "applicationdefinedprivileged_functions.h ", can you please specifie for me what are these functions and how to do this
Thanks a lot
Freertos stuck in vTaskDelayPosted by rtel on December 10, 2015
The code of "xTaskIncrementTick "is not reached during the debug session
That will be why the delay function doesn't return. It doesn't sound
like your tick interrupt is executing, and if the tick interrupt is not
executing then time stands still - hence the delay never expires.
I don't have a "configASSERT "
It is always recommended to have configASSERT() defined when developing.
It can find an error in seconds that could otherwise take weeks - I
can't put it any more clearly than that. It is also best to have the
latest version of FreeRTOS as we add more configASSERT() statements to
assist people.
according to the link you specified , some functions should be defined
inside a new file called "applicationdefinedprivileged_functions.h ",
can you please specifie for me what are these functions and how to do this
Not sure what you mean here - I thought I had sent a link to the
configASSERT() description on the configuration web page, nothing about
privileged functions.
Freertos stuck in vTaskDelayPosted by smallbook on December 10, 2015 yes i can see it is defined in freeRTOSconfig.h as follows :
~~~~
define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }
~~~~
how should i use it to know the reason why tick interrupt is not executing .
Thanks a lot for your replies .
Freertos stuck in vTaskDelayPosted by rtel on December 10, 2015 Have you installed the FreeRTOS interrupt handlers? See point (1) on the following page: http://www.freertos.org/FAQHelp.html
If you are using STM32 cube then it may have its own systick handler, but that should be calling the FreeRTOS one. Did you create the project yourself, or did the cube software create it for you?
Freertos stuck in vTaskDelayPosted by smallbook on December 10, 2015 hi this was so much helpfull
in fact i've been working with the FreeRTOSConfig.h generated with stmcube and the following was commented , I decommented it
now everything is working fine
thankyou
~~~~
/* IMPORTANT: This define MUST be commented when used with STM32Cube firmware,
to prevent overwriting SysTickHandler defined within STM32Cube HAL /
/ #define xPortSysTickHandler SysTickHandler*/
~~~~
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|