OS_CREATETIMER working, whereas OS_CREATETIMER_EX is not

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • OS_CREATETIMER working, whereas OS_CREATETIMER_EX is not

    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.
  • Helllo,

    I can reproduce this issue and I guess it could be a problem with the IAR embOS plugin.
    Your extended embOS software timer is created, but it seems that it is not shown in the IAR embOS plugin.
    We will investigate it in more detail.

    Please be aware that the control structure for extended software timer is OS_TIMER_EX and not OS_TIMER.

    Regards,
    Til
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.