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] [December 2010 Threads] uIP Demo IAR ARM7 ethernet initialisation.Posted by Sandeepsiv on December 1, 2010 When running the free rtos code uIP_Demo_IAR_ARM7, i cant initialise xEMACInit(); On debug i found that vTaskPrioritySet( NULL, tskIDLE_PRIORITY ); after this fuction is called, the control will finally goes to
static portTASK_FUNCTION( prvIdleTask, pvParameters ) and then exectes the fuction
prvCheckTasksWaitingTermination(); within the prvCheckTasksWaitingTermination function, the condition within if( uxTasksDeleted > ( unsigned portBASE_TYPE ) 0 ) is not checking.The default value set for uxTasksDeleted is 0. And this is repeating.
The control not going to the
while( xSemaphore == NULL ) { xSemaphore = xEMACInit(); } vTaskPrioritySet( NULL, uxPriority );
/* Initialise the EMAC. A semaphore will be returned when this is successful. This routine contains code that polls status bits. If the Ethernet cable is not plugged in then this can take a considerable time. To prevent this starving lower priority tasks of processing time we lower our priority prior to the call, then raise it back again once the initialisation is complete. */ uxPriority = uxTaskPriorityGet( NULL ); vTaskPrioritySet( NULL, tskIDLE_PRIORITY ); while( xSemaphore == NULL ) { xSemaphore = xEMACInit(); } vTaskPrioritySet( NULL, uxPriority );
RE: uIP Demo IAR ARM7 ethernet initialisation.Posted by Richard on December 1, 2010 I'm not completely sure I understand the issue you are describing - the bit about prvCheckTasksWaitingTermination() does not seem relevant to the rest of the question. I will try and answer all the same.
When you set the priority of a task to the idle priority then I would expect a context switch to another task to occur. If there are no higher priority tasks then it is very likely that the idle task will be the next to run - which is the behaviour you are describing.
The idle task will run until there is a tick interrupt, or the idle task yields (depends if configIDLE_SHOULD_YIELD() is set in FreeRTOSConfig.h). When either of these things happen, then the idle task may again be the task chosen to run next if there are still no higher priority tasks able to run.
As I recall, the EMAC driver includes some code to initialise the Ethernet PHY and wait for a link to be established. If a link is not established, then this initialisation code will just keep trying until it is, so it is likely that in this case you will not see execution progress past the PHY initialisation in the EMAC driver.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|