Quality RTOS & Embedded Software

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


Demo Program Problem?

Posted by Nobody/Anonymous on June 5, 2006
I'm trying to make the demo program work, with:
- IAR compiler for ARM7 (Philips LPC2103)
- all tasks commented out except vErrorChecks and the idle task
I'm downloading to flash, and it runs fine up to the vTaskDelay call in vErrorChecks in main.c, but never returns from the vTaskDelay call. It looks like it's just sitting in the idle task. I've checked the timer, VIC, and SCB settings, and they appear to be OK but I don't think I'm getting an IRQ interrupt from timer 0 - I never seem to break at the interrupt vector.

Any suggestions? Thanks!


RE: Demo Program Problem?

Posted by John W. on June 6, 2006
If all tasks are commented out then it doesn't make sense to have vErrorChecks() running.

You should comment that out and see if your Idle Task is OK - also check that your timer interrupt is going off. Maybe there's a problem with your xtal or clock - maybe your timer IRQ is in the wrong place, etc.

Look in your debugger to see if xTickCount() ever increments - if it's always zero - then you know your timer IRQ isn't getting called.

I have a small target board that had a flaky clock on my RTC - in the IAR debugger I noticed that xTickCount never incremented which lead me to looking at my clock. Maybe you're having a similar problem.

Good Luck,
John W.

RE: Demo Program Problem?

Posted by John W. on June 6, 2006
xTickCount is defined in tasks.c and is a variable - not a function as I have in my message above. If the timer IRQ is being serviced - it will increment.

John W.

RE: Demo Program Problem?

Posted by Richard on June 6, 2006
It sounds like your timer is the problem, once you get the interrupt running it should be ok.

In addition to Johns suggestions:

+Check that interrupts are enabled in the status register. Interrupts should automatically get enabled when the context of the first task is restored (when the first task starts to execute).

+Check you have configUSE_PREEMPTION set to 1, or that configIDLE_SHOULD_YIELD is set to 1 if configUSE_PREEMPTION is zero.


[ 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.


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


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