Quality RTOS & Embedded Software

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


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

Xilinx Microblaze and Zynq partner