Crash in freertos 9, uxLisRemove crash

I am writting a ehternet task using freertos9 + lwip on AurixTC377.:

  • The interrupt func will call vTaskNotifyGiveFromISR() when receiving data.
  • Another task will call uiTaskNotifyTake() to process the notification.

Normally, it works, but after a while the system crash, the callback shows when the receiving task is in the middle of the processing inside the uiTaskNotifyTake(), and in the prvAddCurrentTaskToDelayedList(), the interrupt function break it, and call vTaskNOtifyGiveFromISR(), system crashed since the pvContainer is NULL at the time.

  • I have defined the configASSERT(x),
  • rx interrupt is using 107,
  • I am using the Interrupt setting (on tc377, high number indicate low pri):

#define configMAX_SYSCALL_INTERRUPT_PRIORITY 64 / Interrupt above priority 64 are not effected by critical sections, but cannot call interrupt safe FreeRTOS functions. /

Can anyone give me some hint for how to debug this?

Where did the Aurix port come from? Is it similar to our older Tricore TC1782 port? Assuming it’s not lwIP or another library causing memory corruption - it does sound like an interrupt priority configuration issue. Are you sure interrupt 107 has a logical priority below the logical priority of 64? Reading our docs page (link a few lines up in my message) I see the RTOS uses priorities 1 and 2 - normally the RTOS uses logically low priorities but if high numbers mean low priorities as you say that wouldn’t be the case.

Hi rtel,
If the problem is caused by the memory corruption, can you give some hint on how to debug this?


Are you able to pin point a variable that is corrupted? If so, a usual technique is to declare a variable next to it and set a data breakpoint on it.

Thanks, I figured out the problem. It’s due to my wrong interrupt settings.