Part Number: MSP-EXP432E401Y
Tool/software: TI-RTOS
Hello,
if my httpTaskFxn is created with
taskHandle = TaskCreate(httpTaskFxn, NULL, 1, HTTPTASKSTACKSIZE, 0,
0, 0);
from the netIPAddrHook() callback function everything works normal.
If i try to construct the Task this way...
// main.c
// HTTP Task
#define HTTP_STACKSIZE 4096
extern void httpTaskFxn(UArg arg0, UArg arg1);
Task_Struct httpTaskStruct;
char httpTaskStack[HTTP_STACKSIZE];
int main (void) {
...
Task_Params_init(&httpTaskParams);
httpTaskParams.stackSize = HTTP_STACKSIZE;
httpTaskParams.stack = &httpTaskStack;
httpTaskParams.priority = 3;
Task_construct(&httpTaskStruct, (Task_FuncPtr)httpTaskFxn, &httpTaskParams, NULL);
...
}
It stops here:
void httpTaskFxn(uint32_t arg0, uint32_t arg1)
{
ret = HTTPCli_connect(&cli, (struct sockaddr *)&addr, 0, NULL); // crashes at this line
if (ret < 0) {
printError("httpTask: connect failed", ret);
}
}
/*
* ======== Hwi_excHandler ========
*/
Void Hwi_excHandler(UInt *excStack, UInt lr)
{
Hwi_module->excActive[0] = TRUE;
/* spin here if no exception handler is plugged */
while (Hwi_excHandlerFunc == NULL) {
;
}
Hwi_excHandlerFunc(excStack, lr);
}
Is it not allowed to start this function with Task_construct() ?