Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

Problem using vTaskDelay();

Posted by André Fernandes on January 20, 2010
Hello,

I am trying to create a task to blink a LED. As follow:

// In main.c

xTaskCreate( LedRedTask, ( signed char * )"LedRedTask", 500, NULL, 5, NULL );

In another .c file:

void LedRedTask( void * pvParameters )
{
for(;;)
{
led_red_on();
vTaskDelay(500);

led_off();
vTaskDelay(1000);
}
}

I thoght that LedRedTask should've called periodically. But it doesn't happen. The led blinks once and the task isn't called anymore.
What I forget to do?

I've already included all header files necessary and the functions led_off() and led_red_on() are OK, cuz even if I comment is the same.

Best regards

RE: Problem using vTaskDelay();

Posted by André Fernandes on January 20, 2010
By the way. I'm using MCF51CN128, a Freescale v1 Coldfire. freeRTOS 5.3.0 and LwIP 1.3.0.

I downloaded the source code from Freescale website. (AN3906)

RE: Problem using vTaskDelay();

Posted by Dave on January 20, 2010
Can you verify that the tick interrupt is running and that you have not simply crashed due to something like a stack overflow.

RE: Problem using vTaskDelay();

Posted by André Fernandes on January 20, 2010
Problem solved!

I downloaded the code again e add my task. It worked.
Probably I changed any configuration.

Thanks


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS