cc3200: Start the simplelink spawn task using the static task creator.
In VStartSimpleLinkSpawnTask we change xTaskCreate to xTaskCreateStatic so that the task is created using statically allocated memory for the TCB and stack. This means that xTaskCreate function is no longer needed (the static version is now used exclusively).
This commit is contained in:
parent
5b8e884573
commit
e098eac195
|
@ -61,6 +61,10 @@ TaskHandle_t xSimpleLinkSpawnTaskHndl = NULL;
|
|||
#define slQUEUE_SIZE ( 3 )
|
||||
#define SL_SPAWN_MAX_WAIT_MS ( 200 )
|
||||
|
||||
// This is the static memory (TCB and stack) for the SL spawn task
|
||||
static StaticTask_t spawnTaskTCB;
|
||||
static portSTACK_TYPE spawnTaskStack[896 / sizeof(portSTACK_TYPE)] __attribute__((aligned (8)));
|
||||
|
||||
/*!
|
||||
\brief This function registers an interrupt in NVIC table
|
||||
|
||||
|
@ -453,8 +457,19 @@ OsiReturnVal_e VStartSimpleLinkSpawnTask(unsigned portBASE_TYPE uxPriority)
|
|||
xSimpleLinkSpawnQueue = xQueueCreate( slQUEUE_SIZE, sizeof( tSimpleLinkSpawnMsg ) );
|
||||
ASSERT (xSimpleLinkSpawnQueue != NULL);
|
||||
|
||||
/*
|
||||
// This is the original code to create a task dynamically
|
||||
ASSERT (pdPASS == xTaskCreate( vSimpleLinkSpawnTask, ( portCHAR * ) "SLSPAWN",\
|
||||
896 / sizeof(portSTACK_TYPE), NULL, uxPriority, &xSimpleLinkSpawnTaskHndl ));
|
||||
*/
|
||||
|
||||
// This code creates the task using static memory for the TCB and stack
|
||||
xSimpleLinkSpawnTaskHndl = xTaskCreateStatic(
|
||||
vSimpleLinkSpawnTask, ( portCHAR * ) "SLSPAWN",
|
||||
896 / sizeof(portSTACK_TYPE), NULL, uxPriority,
|
||||
spawnTaskStack, &spawnTaskTCB);
|
||||
|
||||
ASSERT(xSimpleLinkSpawnTaskHndl != NULL);
|
||||
|
||||
return OSI_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue