Hello,
I tried modifying the Start project slightly to check the timer functions. When I create a timer using OS_CREATETIMER or OS_CreateTimer it is working fine. I am able to see the created timers in the Timers window in my IAR embedded workbench. But when I try to create a timer using OS_CREATETIMER_EX or OS_CreateTimerEx am not pretty sure whether the timer is getting created or not, because my Timers window is empty. But I am not getting any errors too. My code looks like this:
OS_STACKPTR int StackHP[1024], StackLP[1024]; /* Task stacks */
OS_TASK TCBHP, TCBLP; /* Task-control-blocks */
OS_TIMER TIMER100;
void Timer100(void* index) {
BSP_ToggleLED((int) index); /* Toggle LED */
OS_RetriggerTimerEx(&TIMER100); /* Make timer periodical */
}
OS_VALUE HPTask(void* Time) {
OS_CREATETIMER_EX (&TIMER100, Timer100, 100, (void*) 0);
while (1) {
OS_Delay ((OS_TIME) Time);
}
}
OS_VALUE LPTask(void* Time) {
while (1) {
BSP_ToggleLED(1);
OS_Delay ((OS_TIME) Time);
}
}
int main(void) {
OS_IncDI(); /* Initially disable interrupts */
OS_Init(); /* Initialize OS */
OS_InitHW(); /* Initialize Hardware for OS */
BSP_Init(); /* Initialize LED ports */
/* You need to create at least one task before calling OS_Start() */
OS_CreateTask_Ex (&TCBHP, "HP Task", 100, HPTask, StackHP, 1024, 1, 50);
OS_CreateTask_Ex (&TCBLP, "LP Task", 50, LPTask, StackLP, 1024, 1, 200);
OS_Start(); /* Start multitasking */
return 0;
}
Could you please help me find out whether my extended timers are created or not? I am using IAR embedded workbench for ARM 6.21.3 and J-Link ARM version 8.0 on STM3240G-EVAL board (STM32F4xx).
Thanks.
I tried modifying the Start project slightly to check the timer functions. When I create a timer using OS_CREATETIMER or OS_CreateTimer it is working fine. I am able to see the created timers in the Timers window in my IAR embedded workbench. But when I try to create a timer using OS_CREATETIMER_EX or OS_CreateTimerEx am not pretty sure whether the timer is getting created or not, because my Timers window is empty. But I am not getting any errors too. My code looks like this:
OS_STACKPTR int StackHP[1024], StackLP[1024]; /* Task stacks */
OS_TASK TCBHP, TCBLP; /* Task-control-blocks */
OS_TIMER TIMER100;
void Timer100(void* index) {
BSP_ToggleLED((int) index); /* Toggle LED */
OS_RetriggerTimerEx(&TIMER100); /* Make timer periodical */
}
OS_VALUE HPTask(void* Time) {
OS_CREATETIMER_EX (&TIMER100, Timer100, 100, (void*) 0);
while (1) {
OS_Delay ((OS_TIME) Time);
}
}
OS_VALUE LPTask(void* Time) {
while (1) {
BSP_ToggleLED(1);
OS_Delay ((OS_TIME) Time);
}
}
int main(void) {
OS_IncDI(); /* Initially disable interrupts */
OS_Init(); /* Initialize OS */
OS_InitHW(); /* Initialize Hardware for OS */
BSP_Init(); /* Initialize LED ports */
/* You need to create at least one task before calling OS_Start() */
OS_CreateTask_Ex (&TCBHP, "HP Task", 100, HPTask, StackHP, 1024, 1, 50);
OS_CreateTask_Ex (&TCBLP, "LP Task", 50, LPTask, StackLP, 1024, 1, 200);
OS_Start(); /* Start multitasking */
return 0;
}
Could you please help me find out whether my extended timers are created or not? I am using IAR embedded workbench for ARM 6.21.3 and J-Link ARM version 8.0 on STM3240G-EVAL board (STM32F4xx).
Thanks.