co-routine

panj wrote on Wednesday, 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?

sotd wrote on Wednesday, 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?

panj wrote on Thursday, 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.

sotd wrote on Thursday, 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.

panj wrote on Thursday, June 14, 2007:

in task.c  version 4.2.1 in function vTaskIncrementTick There is mension of vApplicationTickHook.

rtel wrote on Thursday, 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.