Quality RTOS & Embedded Software

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




Loading

The execution enter prvTaskExitError method

Posted by valeriv on December 20, 2016

Hi all. The target run on STM32F439NI, in IAR environment Something happened to the code (earlier it worked).

So, I create several tasks in the main function and after this call to vTaskStartScheduler(), there call to xPortStartScheduler() and there call to vPortStartFirstTask() in file portasm.s. After this, code try to jump to first task's Run method, but I already can see in call stack that execution start from prvTaskExitError method.

I read previous discussions, and checked that I set HALNVICSetPriorityGrouping(NVICPRIORITYGROUP4);

Put attention that it is happen before the first task start run. The execution continue run properly, but call stack start from prvTaskExitError function.

Please, help me understand what happen ?

Thanks a lot

Valerie


The execution enter prvTaskExitError method

Posted by rtel on December 21, 2016

prvTaskExitError() should only ever be entered if an application task attempts to return or exit. Do any of the tasks you created return from their implementing function, ether by executing to the end of the function or by calling return?

If you want an application task to terminate then call vTaskDelete( NULL ).


The execution enter prvTaskExitError method

Posted by valeriv on December 21, 2016

Hi In order to understand the problem clearly I leave the only one task that do nothing and have delay 50 miliseconds inside. So, In IAR tasks plugin I see IDLE task, TmrSvc task and empty task that I created. Now I am sure that there is no task that attempts to return or exit.

Do you know another reason of entering prvTaskExitError() ?


The execution enter prvTaskExitError method

Posted by valeriv on December 21, 2016

Hi In order to understand the problem clearly I leave the only one task that do nothing and have delay 50 miliseconds inside. So, In IAR tasks plugin I see IDLE task, TmrSvc task and empty task that I created. Now I am sure that there is no task that attempts to return or exit.

Do you know another reason of entering prvTaskExitError() ?


The execution enter prvTaskExitError method

Posted by valeriv on December 22, 2016

Hi I think I understand now. The execution doesn't enter the function prvTaskExitError. I only see in call stack that execution starts from it. And now I think that it is right situation, It is kind of protection in case task will return from the it's implementing function.

So, Is it OK, that call stack begin from prvTaskExitError method ?

Thanks a lot for your time and consideration.

Valerie


The execution enter prvTaskExitError method

Posted by rtel on December 22, 2016
Yes, it is expected that that is at the top of the stack frame as that is the function the task will return to if it attempts to return from it's implementing function.



The execution enter prvTaskExitError method

Posted by valeriv on December 27, 2016

Thank you


[ 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