Let's take something that happened to me today as an example After a while, an assert triggers inside freeRTOS (because you activated FreeRTOS asserts and linked them to one of your breakpoint, of course when developping !) Let's look at the assert : #2 0x0800b5a4 in xQueueSemaphoreTake ( xQueue =0x20001940 <ucHeap+4668>, xTicksToWait =<optimized out>) at /home/fx/Arduino_gd32/spotwelder_gd32/lnArduino/FreeRTOS/queue.c :1481 1481 configASSERT( pxQueue->uxItemSize == 0 ); So there is an inconsistency inside freeRtos mutex stuff. Ok, let's look at pxQueue (gdb) p *pxQueue $14 = { pcHead = 0x20001940 < ucHeap +4668> "@\031", pcWriteTo = 0x20001940 < ucHeap +4668> "@\031", u = { xQueue = { pcTail = 0x20001940 < ucHeap +4668> "@\031", pcReadFrom = 0x20001940 < ucHeap +4668> "@\031"}, xSemaphore = { xMutexHolder = 0x20001940 < ucHeap +4668...