boogalee wrote on Tuesday, October 25, 2016:
Hi.
I am making 802.15.4 protocol over FreeRTOS.
I mad my own 802.15.4 protocol and i had finished port on CC2538.(Tool : CCSv5)
I had succeeded some tasks blinky leds.
I want to try to combine FreeRTOs with 802.15.4. So i tried to make one task including send beacon function.
However there was an error about stack pointer and stack over flow.
I had created task such as below code.
if (xTaskCreate(Beacon_Send, (signed portCHAR *)"Beacon_Send", 200, NULL, 3,
NULL) == pdTRUE) {
//GPIOPinWrite(GPIO_C_BASE,GPIO_PIN_3,GPIO_PIN_3);
}
static void Beacon_Send(void *pvParameters) {
//TaskHandle_t xHandle;
halIntOn()
;
mac_init(); // MAC init & set PANID & Short Addr
while (1) {
UARTprintf("Send_Beacon - priority : 3\n");
//Before Send_Beacon SP is 0x200043000
Send_Beacon();
// After Send_Beacon SP is 0x200043000
vTaskDelay(1000);
}
}
At the first time i tried, there was a stack over flow.
So i changed system stack size to 768.
But there was a stack over flow again.
I tried to track Stack Pointer. Before calling Send_Beacon() SP is 0x200043000.
After Send_Beacon() SP is 0x200043000 either. I thougth there was no problem about stack size.
However, when i start that task, vApplicationStackOverflowHook() is called and go to infinite loop.
What is the problem? In my guess, Send_Beacon is not needed too much stack size.
Plz help me.