Salam alikum,
I have a problem with Task_sleep
when I use it, it blocks the program and not come back and resume
So I tested it in the task example in sysbios examples in CCS
------------------------------------------------------------------------
code:
#include <xdc/std.h>
#include <xdc/runtime/System.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Clock.h>
#include <ti/sysbios/knl/Task.h>
#include <ti/sysbios/knl/Semaphore.h>
#include <xdc/cfg/global.h>
Void task1(UArg arg0, UArg arg1);
Task_Handle tsk1;
Task_Handle tsk2;
/*
* ======== main ========
*/
Void main()
{
Task_Params taskParams;
/* Create two tasks that share a resource*/
Task_Params_init(&taskParams);
tsk1 = Task_create (task1, &taskParams, NULL);
BIOS_start();
}
/*
* ======== task1 ========
*/
Void task1(UArg arg0, UArg arg1)
{
System_printf("Running task1 function\n");
Task_sleep(100);
System_printf("Finishing task1 function\n");
}
-------------------------------------------------------------------------------
when I try to run this code, only the output of the first System_printf appears.
and this is the environment:
- CCS5.0.0.00095.
- Project type: C6000.
- Generic C64x+ Device.
- RTSC Platform: evm3530.
- and when I simulate the program I use Texas Instruments Simulator ==> C64x+ CPU Cycle Accurate Simulator, Little Endian.
Thanks in advance (: