highest priority task stuck in ready queue on NXP Cortex-M3

Hi, I’m using FreeRTOS 7.3 and lwIP 1.4.1 on a NXP LPC1776 MCU. The problem I have is that the TCP/IP task is not called any more after a few minutes. It runs into xQueueGenericReceive. Because the queue is empty but xTicksToWait is nonzero vTaskPlaceOnEventList is called. After calling portYIELDWITHINAPI the task does not start again although ethernet packets are received. The receive interrupts is still firing but the RTOS is running the IDLE and all other tasks but not the TCP/IP task. I’m using IAR embedded workbench and the C-SPY debugger. I can see that the TCP/IP task is placed in the ready queue. This task has the highest priority in the system. I made a similar application running on the LPC4337 Cortex-M4 core which runs without any problems. I also verified that there is no stack overflow and the interrupt priorities are set via the CMSIS function NVIC_SetPriority. Hopefully one of you can help. Thank you in advance. Best regards, Alex

highest priority task stuck in ready queue on NXP Cortex-M3

Are you running the latest version of FreeRTOS with configASSERT() defined? http://www.freertos.org/a00110.html#configASSERT Does anything get posted into the queue on which the task is running? [I think it must if the task gets moved into the ready list] Can you see the states of the tasks and the queue using the IAR FreeRTOS plug-in? Regards.

highest priority task stuck in ready queue on NXP Cortex-M3

Hi Richard, I’m using FreeRTOS 7.3 with configAssert defined as

define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }

I attached a screenshot that shows the FreeRTOS plugin with the all the tasks and the queue status. Regards Alex

highest priority task stuck in ready queue on NXP Cortex-M3

I’m using FreeRTOS 7.3 with configAssert defined as
Please use the latest version with configASSERT() defined – it has extra assert statements specifically to trap common configuration problems on Cortex-M devices. Regards.

highest priority task stuck in ready queue on NXP Cortex-M3

I switched to FreeRTOS 7.5.3 but the outcome is the same. None of the configASSERTS is catching the problem. Attached a picture of the IDE. Regards, Alex

highest priority task stuck in ready queue on NXP Cortex-M3

Please zip up your project and send it to the “business contact” email address listed on http://www.freertos.org/contact . I will take a quick look to see if I can see anything obvious, otherwise we will have to take a deeper dive to try and debug what is happening. Regards.

highest priority task stuck in ready queue on NXP Cortex-M3

Note I just edited the link in the post above so the full stop/period was not included as part of the URL. Regards.

highest priority task stuck in ready queue on NXP Cortex-M3

Hi Richard, I forgot to update the port files to 7.5.3. Let me do that first and give you some feedback on how it works. If it is still not working I will upload the project. Regards

highest priority task stuck in ready queue on NXP Cortex-M3

Hi, after updating the port files to 7.5.3 the software seems to be working. It runs for about 15 minutes without problems until now. Previously it crashed after 10 minutes latest. I will post here again if it cashes. Thank you. Regards, Alex