mansoor wrote on Friday, November 15, 2019:
Hi,
CASE 1:
i am using vTaskDelay() to put the Task in Blocked state for some Time.
while using vTaskDelay() its entering into the infinite delay state.
The control is not coming out of the delay statement.
following is the code flow, where vTaskDelay() is been used in both CADENCE and SYNOPSYS.
int Count;
int main()
{
xTaskCreate (test_delay ); /create a task ( test_delay)/
vTaskStartScheduler();
}
void test_delay()
{
while(1)
{
Count++;
printf(“Task running iter %d\n”,Count);
vTaskDelay(1);
}
}
• Here the expected result is the printf() should print the statement infinte times
but it is printing only once in both Cadence and synopsys.
• In cadence it is showing as Stack Overflow stopping…
CASE 2:
i am trying to communicate betweeen the 2 Tasks,
if Task1 is sending Task2 should receive.
Task2 again will send the data to Task1 and Task1 should Receive Data.
following is the code flow which i have tested in cadence but it is not working in the synopsys.
int main()
{
xTaskCreate (send_Task); /*created a send task */
xTaskCreate(Receive_Task);/*created a receive task */
vTaskStartScheduler();
}
void send_Task()
{
while(1)
{
xMessageBufferSend(Data_1);
vTaskDelay(1);
//taskYIELD();
xMessageBufferReceive(Data_2);
}
}
void Receive_Task()
{
while(1)
{
xMessageBufferReceive(Data_1);
xMessageBufferSend(Data_2);
}
}
• Here i am expecting after executing Task2 should switch back to Task1 which is not happenning.
• i tried increasing the priority of the send_Task also but it is not working.
• i used taskYIELD() function, it is executing the next task2 of same priority but after executing it is not Resuming back to the task.
• if i remove the vTaskDelay() only Task1 will execute continously.
Is there any property settings that has to be changed based on the platform we are using to get this working.
presently we are working on synopsys.
Thanks and Regards,
Mansoor Basha