Quality RTOS & Embedded Software

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


Loading

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!

Mark

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.

Regards,
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.

Regards.


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




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

Latest News

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

Video: Watch James Gosling & Richard Barry at re:Invent, Las Vegas 2017.

New FAQ page about the FreeRTOS kernel and Amazon FreeRTOS.


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

Xilinx Microblaze and Zynq partner