FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [November 2009 Threads] AT91SAM: data abort starting first taskPosted by Bernd Schuster on November 23, 2009 Hi,
I want to use freeRTOS together with the AT91SAM9263 controller. At the moment I always get a data abort error at this position:
vPortStartFirstTask portRESTORE_CONTEXT
It seams that there`s somehting not defined - but I don`t know what... At the starting point, I use one sample project from freeRTOS, and made only a few changes according to this controller.
Here`s my main-function:
int main( void ) { /* Setup the ports. */ prvSetupHardware();
/* Setup the IO required for the LED's. */ vParTestInitialise();
vStartLEDFlashTasks( mainFLASH_PRIORITY );
vTaskStartScheduler();
return(0);
The scheduler will be started.
I hope someone could give me some hints to find this error...
best regards Bernd
RE: AT91SAM: data abort starting first taskPosted by Dave on November 23, 2009 Do you set the SAM9 into Supervisor mode before calling main()? It must be in Supervisor mode before portRESTORE_CONTEXT is called doing this before main() is called in normally the easiest way of achieving this.
RE: AT91SAM: data abort starting first taskPosted by Bernd Schuster on November 23, 2009 ah ok... now the led is flashing - but only for a short time, then I also get a data abort error.... (within the vListInsert() function...)
RE: AT91SAM: data abort starting first taskPosted by Bernd Schuster on November 23, 2009 I found the reason for this second data abort: the pxList item is 0x00!
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );
It seams that pxQueue->xTasksWaitingToSend is 0x00 and therefore the pxList item is 0x00:
Which tasks are essential to be initializied at the startup? I think this problem will occur, because I didn`t made any inits to the queues?
best regards Bernd
RE: AT91SAM: data abort starting first taskPosted by Dave on November 23, 2009 I presume you are creating the queue before using it?
RE: AT91SAM: data abort starting first taskPosted by Bernd Schuster on November 23, 2009 I didn`t create any queue... I only use the "simple" example from freeRTOS...
vStartLEDFlashTasks( mainFLASH_PRIORITY );
That`s the only function befor the scheduler starts...
RE: AT91SAM: data abort starting first taskPosted by Bernd Schuster on November 23, 2009 by the way: it is only important to be in the supervisor mode if I start the scheduler? vTaskStartScheduler();
Because within the normal user functions, the arm mode is always the user mode.
RE: AT91SAM: data abort starting first taskPosted by Richard on November 23, 2009 Tasks run in System mode. The kernel runs in Supervisor mode.
Regards.
RE: AT91SAM: data abort starting first taskPosted by Bernd Schuster on November 23, 2009 I`ve still another question:
; chip specific addresses and constants: AT91C_BASE_PITCEQU0xFFFFFD30 PITC_PIVREQU8 AT91C_BASE_AICEQU0xFFFFF000 AIC_EOICREQU304 ; 130 ; 304
Is the definition for AIC_EOICR correct? Because in the "AT91SAM9263.H" header file: #define AIC_EOICR (AT91_CAST(AT91_REG *) 0x00000130)
Moreover if someone had a idea why the led task is only running for round about 10sec - I appreciate the solution *g*
regards
RE: AT91SAM: data abort starting first taskPosted by MEdwards on November 23, 2009 Look the address up in the data sheet.
RE: AT91SAM: data abort starting first taskPosted by Bernd Schuster on November 24, 2009 if I change this setting according to the data sheet from the controller, the led is not flashing at all. The prvIdleTask() is running the whole time.
RE: AT91SAM: data abort starting first taskPosted by Bernd Schuster on November 24, 2009 everything is working fine now: the problem was the dbug interface (which was not installed and therefore the default printf() call in the IdleTaks generates an data abort).
best regards (and many thanks for your help)
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|