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] [May 2013 Threads] Task doesn't completePosted by monica on May 6, 2013 Hello I created a task, which should write to a memory position an incrementing value as follows: static void prvRead_Task( void *pvParameters ) { pointer = (int*)0x3000000; *pointer = 0;
for (;;) { //void (*p)(void) = address; //p();
for(i=0;i<0x10000000;i++){ *pointer = i; } xil_printf("Script Successfully Excecuted!\r\n"); vTaskSuspend(xTaskRead); } }
The problem is that if I run the task, the last value it writes is 0x0031fda3.. This is the task with the highest priority, so here is no other task running at the moment. How can this problem be fixed?? Thanks
RE: Task doesn't completePosted by Richard Damon on May 6, 2013 I don't see a definition of pointer here, I assume it is an int*.
is the address 0x3000000 used by anyone? If this is in your ram space, if something has been placed here (like a FreeRTOS control structure), you may crash something.
RE: Task doesn't completePosted by monica on May 6, 2013 Hi richard. Thank you for your answer. Yes.. the pointer is defined as an int * int * pointer; And no.. I don't have anything on this ram space.. if I write a fixed value it works.. If I use for example for(i=0;i<0x1000;i++) It works fine... but with a big number the task doesn't finish (I think that is what is happening) and writes until certain value and stops... Thanks
RE: Task doesn't completePosted by Richard on May 6, 2013 Check:
1) That the code works as expected when FreeRTOS is not running, then, assuming it does 2) That nothing else is using this RAM space when FreeRTOS is running. 3) That the code works (or not) when that is the only task that is running. 4) That sizeof( i ) is at least 4. If you are using a Microblaze, it probably isn't and you will need to make i an long rather than int.
Regards.
RE: Task doesn't completePosted by Richard Damon on May 7, 2013 Sounds like the problem is that if you take over a certain amount of time things have problems. It could be that the location is being used by an interrupt (have you checked you link map that the location is unused). It could be some interrupt corrupting something that causes this to crash.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|