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

alexde wrote on Monday, November 04, 2013:

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 portYIELD_WITHIN_API 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

rtel wrote on Monday, November 04, 2013:

Are you running the latest version of FreeRTOS with configASSERT() defined?

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.

alexde wrote on Tuesday, November 05, 2013:

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

rtel wrote on Tuesday, November 05, 2013:

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.

alexde wrote on Tuesday, November 05, 2013:

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

rtel wrote on Tuesday, November 05, 2013:

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.

rtel wrote on Tuesday, November 05, 2013:

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

Regards.

alexde wrote on Tuesday, November 05, 2013:

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

alexde wrote on Tuesday, November 05, 2013:

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