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

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) 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