This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM46L852: FreeRTOS: vTaskDelay() not delaying

Part Number: RM46L852
Other Parts Discussed in Thread: LAUNCHXL2-RM46, HALCOGEN

Hi,

Trying to set up FreeRTOS v9 on the LAUNCHXL2-RM46 dev kit. I'm somewhat familiar with FreeRTOS but not RM46.

I start a simple task to blink a led:

static void blink_led(void *pvParameters)
{
    const TickType_t delay_ticks = 2000 / portTICK_PERIOD_MS;

    for (;;)
    {
        vTaskDelay(delay_ticks);
        toggle_led(0);
    }
}

...
xTaskCreate(blink_led, "LEDx", 2048, NULL, LED_TASK_PRIO, NULL);
vTaskStartScheduler();

And the led blinks... but, umm, quite fast. Because vTaskDelay(delay_ticks) returns immediately. portTICK_PERIOD_MS is 1000.

I suppose I haven't set up some clocks, interrupts, or timers correctly, but couldn't find an example showing what needs to be done.

Suggestions?

  • Hello Heikki,

    I have forwarded your question to one of our software team members. They should be able to provide more detailed support and should reply soon.
  • Hi Chuck, thanks for your reply.

    Instead of trying to make the port found in the FreeRTOS source tree work, I opened HALCoGen and generated an empty FreeRTOS project -- my led blinker works nicely with that!

    The codebase is just not quite up-to-date -- some of the files are tagged FreeRTOS v7.6.0 while others are v8.1.2 or v8.2.0. It would be really nice to get the current stable (v9.0.0) straight out from HALCoGen.

    I think I'll try upgrading it manually to v9 sometime later. Seems like quite a few things have changed, so it's not quite just a "replace a few files" thing.
  • Hello Heikki,

    I am glad that you were able to work through to a solution and thanks for the additional input on the version provided with Halcogen. The update to ver.9.0.0 is on our list of improvements to be made but we don't have a schedule of when it will happen at this point.

    Regards,
    Chuck Davenport
  • Hi Heikki,

    As Chuck already mentioned, FREERTOS v9.0.0 port was not really planned to done as part of HALCoGen. If possible, we will try to include this as part of the next HALCoGen release. Meanwhile, please use the FREERTOS version provided in HALCoGen. HALCoGen presently supports version V8.2.0.

    Thanks and Regards,

    Veena