I am new to FreeRTOS
At the beginning I created 3 queues and everything worked fine. Until I needed a new 4th and 5th queue.
When ever I initialize the queues with xQueueCreate()
The system crashes.
I tried to increase the task depth. Also tried to increase the total Heap size with no success.
I have only two tasks.
This is my code
/**
* Define the FreeRTOS task priorities and sizes
*/
#define configGUI_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
#define configGUI_TASK_STK_SIZE ( 950 )
/*
** CDL Task Configurations
*/
#define configCDL_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
#define configCDL_TASK_STK_SIZE ( 950 )
/*
** FreeRTOS Queues
*/
xQueueHandle msgGuiRqst;
xQueueHandle msgCdlStatus;
xQueueHandle msgCdlRspnsBool;
xQueueHandle msgPlatformsStatusData;
xQueueHandle msgPlatformsWeightData;
int main(void)
{
msgGuiRqst = xQueueCreate(1, sizeof(char));
msgCdlStatus = xQueueCreate(1, sizeof(char));
msgCdlRspnsBool = xQueueCreate(1, sizeof(bool));
// Problem started after adding these two queues
msgPlatformsStatusData = xQueueCreate(2, sizeof(bool));
msgPlatformsWeightData = xQueueCreate(2, sizeof(int));
xTaskCreate(GUITask, (TASKCREATE_NAME_TYPE)"GUITask",
configGUI_TASK_STK_SIZE,
NULL,
configGUI_TASK_PRIORITY,
NULL);
xTaskCreate(CDLTask, (TASKCREATE_NAME_TYPE)"CDLTask",
configCDL_TASK_STK_SIZE,
NULL,
configCDL_TASK_PRIORITY,
NULL);
vTaskStartScheduler();
while(1)
{
;
}
}
I need suggestions to figure out the issue.