Quality RTOS & Embedded Software

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




Loading

lpc2294 - olimex board - program/data abort

Posted by spreet on October 15, 2009
I am using the crossworks studio and sample code for 2294 from Rowley and trying to integrate FreeRTOS in to the project. I have created 1 LED task that is supposed to flash the LED on the board. There is no other task created for this test.. Code compiles OK.
The code for the task is:
static void vLEDTask( void *pvParameters )
{

for( ;; )
{

ledOff();

vTaskDelay( xLED_Delay );

ledOn();

vTaskDelay( xLED_Delay );
}


}


When vTaskStartScheduler() is called after creating the task, it setsup the scheduler and eventually runs the ledTask. (I can put a break point and see that it gets here all the time). When it executes the vDelayTask, the task is put in the pxDelayedTasList. And since no other task is there, the idle task starts executing. I am monitoring the number of times it goes thru the vApplicationTickHook and ApplicationIdleHook by using counters.
From the counters I can see that the IdleHook code is executed may be 160 times before the tickHook is called. But if it is allowed to run without break points, it goes to either data abort or pabort.

Timer interrupt seems to be working.

Any ideas what is happening? Is there an issue with initialization?

RE: lpc2294 - olimex board - program/data abort

Posted by Richard on October 16, 2009
You seem to have got a long way so most things must be right (SUPERVISOR_START set, etc.). Where did you get the start up code from? Maybe there is something missing there? Do you have stacks set up for IRQ and Supervisor modes (as a minimum)?

Regards.

RE: lpc2294 - olimex board - program/data abort

Posted by spreet on October 21, 2009
I have taken the crossworks 2294 template, and done the following:
1. Added the RTOS files
2. Added the StartSupervisor flag in the crt0.s file
3. Modified the timer interrupt code in the portISR file to match the timer0 requirements.

Code does startup in supervisor mode. It is in supervisor mode when it creates the led tasks.
After creating these tasks, it calls xstartScheduler - does the task setup, sets up for timerinterrupt, and then starts executing the ready task which is the led task.
When it is in ledTask, it is in system mode and interrupts are enabled (I Flag =0)

I have not added anything specific for the IRQ or supervisor stack - it is as per the template.
I have tried to compare this with the working RTOS code on lpc2138 and lpc2378 using the crossworks. I have not seen anything that points to as to what is the issue.
Is there anything specific that I should look for?
Thanks for your help.


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




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

Latest News

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


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