1
votes

I am using FreeRTOS and i want to use mac protocol which i made !

On a single task, I want to Send_Beacon() function(send beacon frame).

When i call that function in task, there was a stack overflow.

void vApplicationStackOverflowHook(TaskHandle_t pxTask, char *pcTaskName)

vApplicationStackOverflowHook was called.

if (xTaskCreate(MAC_Init, (signed portCHAR *)"MAC_Inits", 128, NULL, 3,
        NULL) == pdTRUE) {
    //GPIOPinWrite(GPIO_C_BASE,GPIO_PIN_3,GPIO_PIN_3);
}

I had tried to change stack depth parameter from 128 to 1600.

It was failed.

What is the problem ?

Is not a problem about stack depth parameter's value ?

1

1 Answers

0
votes

Remember the stack size is specified in words, not bytes. See the documentation of the xTaskCreate() and xTaskCreateStatic() functions.

If you are using xTaskCreate(), and cannot create the task after increasing its stack size, then you are running out of FreeRTOS heap (the link tells you what to do about it).