The function OSA_TaskCreate() returns either a task ID, if the task is created successfully, or returns Null if "The task cannot be created."
If the task cannot be created, the first thing I'd check is whether or not you allocate enough resources for the task.
Could it be possible that you create your task, but forgot to allocate resources, and then the Host_Task is failed at creation?
To allocation resource there is something like:
OSA_TASK_DEFINE( Job1, OSA_PRIORITY_HIGH, 1, 800, 0);
Below is the function header I copied:
/*!
* @brief Creates a task.
*
* This function is used to create task based on the resources defined
* by the macro OSA_TASK_DEFINE.
*
* @param thread_def pointer to the osaThreadDef_t structure which defines the task.
* @param task_param Pointer to be passed to the task when it is created.
*
* @retval taskId The task is successfully created.
* @retval NULL The task can not be created..
*
* Example:
@code
osaTaskId_t taskId;
OSA_TASK_DEFINE( Job1, OSA_PRIORITY_HIGH, 1, 800, 0);;
taskId = OSA__TaskCreate(OSA__TASK(Job1), (osaTaskParam_t)NULL);
@endcode
*/