Quality RTOS & Embedded Software

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




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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists