Quality RTOS & Embedded Software

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




Loading

co-routine

Posted by Chaks on June 13, 2007
I am not using any co-routine features, in freeRTOSconfig.h i have kept co-routine 0.

but in task.c, it is using vApplicationTickHook and this function hook to co-routine. and i don't want to use this function.

Why task.c is not used #ifdef co-routineconfig 1 for this vApplicationTickHook?

RE: co-routine

Posted by sotd on June 13, 2007
vApplicationTickHook is a user definable function and should be defined in the application code, not in the task.c. Which line of code are you referring to within task.c?


RE: co-routine

Posted by Chaks on June 14, 2007
task.c Line no : 1562,1564 etc. used vApplicationTickHook

i have read crhook.c explanation, it is giving "This demo file demonstrates how to send data between an ISR and a co-routine. A tick hook function is used to periodically pass data between the RTOS tick and a set of 'hook' co-routines."

So is it necessary to use configUSE_TICK_HOOK when we are not using co-routine functionality ?
this is for only co-routine?

I don't want to use co-routine in my RTOS and application also.


RE: co-routine

Posted by sotd on June 14, 2007
Line 1562 of task.c is in the xTaskCheckForTimeOut() function, this has nothing to do with tick hooks or coroutines. Where did you get the code from that you are using, which version is it?

Tick hooks have nothing to do with coroutines. If your code has some link between them then I suspect this is in a demo file not the source code. Tick hooks are optional, coroutines are optional, and you can use either, both or neither, its up to your configuration settings.

RE: co-routine

Posted by Chaks on June 14, 2007
in task.c version 4.2.1 in function vTaskIncrementTick There is mension of vApplicationTickHook.



RE: co-routine

Posted by Richard on June 14, 2007
...but there is no mention of co-routines here? If you have configUSE_TICK_HOOK set to 1 then the user defined function vApplicationTickHook() will get called. You will only have to have co-routines included in your project if vApplicationTickHook() uses co-routines.

As has already been said - tick hooks and co-routines have no dependencies on each other. Some of the demo applications call the co-routine scheduler from the idle hook, not the tick hook, but both the tick and idle hook functions are up to the user to define anyway.

What exactly is the problem you are having. Have you looked at your implementation of the tick hook function?

Regards.


[ 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