Open jnguyen095 opened 7 years ago
1. Basic(no event) has 3 states: SUSPENDED, READY and RUNNING, Activation = 2
2. Extended(has event) has 4 states: SUSPENDED, READY, RUNNING, and WAITING, Activation = 1
TASK Task_And_Event_1 {
ACTIVATION = 2;
PRIORITY = 10;
SCHEDULE = FULL;
};
TASK Task_And_Event_2 {
ACTIVATION = 1;
PRIORITY = 13;
SCHEDULE = FULL;
EVENT = evt_Task2;
STACKSIZE = 0x100;
};
TASK Task_And_Event_3 {
ACTIVATION = 2;
PRIORITY = 12;
SCHEDULE = FULL;
};
SCHEDULETABLE ScheduleTable1_Osapp1 {
LENGTH = 20; // Counter lenght
PERIODIC = TRUE; // Repeat value
COUNTER = CounterOSTM0_Osapp1; // Table need a counter
ACTION {
OFFSET = 5; // Trigger task at counter offset
ACTIVATETASK {
TASK = Task2_Osapp1;
};
};
ACTION {
OFFSET = 10;
ACTIVATETASK {
TASK = Task3_Osapp1;
};
};
ACTION {
OFFSET = 13;
ACTIVATETASK {
TASK = Task4_Osapp1;
};
};
ACTION {
OFFSET = 15;
ACTIVATETASK {
TASK = Task5_Osapp1;
};
};
ACTION {
OFFSET = 17;
ACTIVATETASK {
TASK = Task6_Osapp2;
};
};
};
RESOURCE Resource1 {
PRIORITY = 20; //0 to 29, INTPRI0 to INTPRI15 (or INTPRI0 to INTPRI7 when the target device is G3K), or AUTO
RESOURCEPROPERTY = STANDARD; //STANDARD, INTERNAL, or LINKED
ACCESSING_APPLICATION = Osapp1; //Specifies the identifier of an OS-Application that defines objects (tasks, interrupt service routines, and alarms) to which access privileges to this resource should be assigned.
};
Create and debug to understand: