vApplicationDaemonTaskStartupHook

delphes wrote on Saturday, March 17, 2018:

Dear All,

I have a couple of initilization done in vApplicationDaemaonTaskStartup, How I can be sure that all the others tasks are started only if this startup task has finish ?

regards

richard_damon wrote on Saturday, March 17, 2018:

Don’t create the tasks until you are ready for them.

Personally, I try to do as much of my initialization in main before starting up FreeRTOS, and any device initialization that needs the OS up, is done at the beginning of the task that needs that device ready.

rtel wrote on Saturday, March 17, 2018:

Additionally…you could ensure the Timer/RTOS Daemon task has the
highest priority in the system while the start up hook executes (and
doesn’t block, not that you should even block the timer task anyway), or
just create the other tasks from the start up hook after it has done
whatever initialisation is necessary.

delphes wrote on Sunday, March 18, 2018:

Thanks to all, is there are any way to know that Daemon task startup has finished his job ?

richard_damon wrote on Sunday, March 18, 2018:

The Daemon task does nothing special when the startup hook returns, so if you need any special notifications from that, you need to add it to the startup hook.

delphes wrote on Sunday, March 18, 2018:

Thanks Richard, last question, How I can change heap Stack value of the startup Hook ?

richard_damon wrote on Sunday, March 18, 2018:

The size of the stack for the Timer/Daemon task is controled by the define configTIMER_TASK_STACK_DEPTH which should be in your FreeRTOSConfig.h file.

delphes wrote on Sunday, March 18, 2018:

Thanks alot Richard