Quality RTOS & Embedded Software

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


Loading

VTaskDelay Frozen

Posted by Fernando Gatto on June 3, 2008
Hi
I´m using FreeRtos 5.0.0 and I have two tasks in a MSP430 with IAR. One blocked for ever because it temporaly empty and in another if I try the following

const portTickType xDelay = 5;

for (;;)
{
LedToggle();
vTaskDelay( xDelay );
}

The led only Blink if I use #define configUSE_PREEMPTION 0, if it is set it doesn´t work. If I use VTaskDelayUntil it doesn´t work with both configurations. The microcontroller is working perfectly because I´m sending and receiving data through a radio using interrupts.

What I could be doing wrong? The full configuration is this one.

#define configUSE_PREEMPTION 0
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 7372800 ) /* Clock setup from main.c in the demo application. */
#define configTICK_RATE_HZ ( ( portTickType ) 256 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 100 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 4000 ) )
#define configMAX_TASK_NAME_LEN ( 8 )
#define configUSE_TRACE_FACILITY 0
#define configUSE_16_BIT_TICKS 1
#define configIDLE_SHOULD_YIELD 1
#define configUSE_MUTEXES 1

RE: VTaskDelay Frozen

Posted by Richard on June 3, 2008
Can you check that the tick interrupt is working, if you put a break point in the tick interrupt does it get hit repeatedly and does it increase uxTickCount?

Also a delay of 5 is very low, could it be that the LED it toggling too quickly to see?

Are any other tasks or interrupts accessing the same port that the LED is connected to?

Regards.

RE: VTaskDelay Frozen

Posted by Fernando Gatto on June 3, 2008
Thanks Richard for your support. The problem was in the the tick interrupt, the FreeRTOSConfig.h was not properly included so the call to #vTaskSwitchContext was never executed.

Regards.


[ 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