nobody wrote on Saturday, August 05, 2006:
Hi,
I 'am programing a project with FreeRtos 3.2.2, IAR 4.40 and a AT91Sam7S256.
The project has 2 tasks with the same priority. The second task checks UART activity:
void vDeviceTask( void *pvParameters ) {
while(1) {
…
taskYIELD();
}
}
Checking the UART takes not much time so taskYIELD "restarts" the main task.
After a short time the system crash complettly:
The IO’s are reprogramed, the OSC stops , the reset pin is no longer activ and the watchdog is not able to restart the system.
When i remove the taskYIELD() line the program run stable over days.
Below are the RTOS settings:
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 47923200 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 2 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 500 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) 10000 ) // 14200
#define configMAX_TASK_NAME_LEN ( 16 )
#define configUSE_TRACE_FACILITY 0
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
#define INCLUDE_vTaskPrioritySet 0
#define INCLUDE_uxTaskPriorityGet 0
#define INCLUDE_vTaskDelete 0 #define INCLUDE_vTaskCleanUpResources 0
#define INCLUDE_vTaskSuspend 0 #define INCLUDE_vTaskDelayUntil 0
#define INCLUDE_vTaskDelay 1
Has anybody an idea what is going wrong in the original code ?
There some points in my code where i like to use
taskYIELD() instead of vTaskDelay(1).
This crash doesn’t happens when the code is running under IAR debugger !
Thanks for your comments.
Regards
Rainer