Demo Program Problem?

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

Demo Program Problem?

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.

Demo Program Problem?

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.

Demo Program Problem?

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.