I’m working on a STM32 based board and got: main tasks and TouchGFX task running. I’m using a queue to communicate between both tasks and it works just fine most of the time but when I put one specific command into the queue and call vTasksDelay() right after it falls into a HardFault.
I’ve tracked down a little more in detail and the fault happens when in prvAddCurrentTaskToDelayedList() the values inside pxCurrentTCB->xStateListItem aren’t correct, so when it goes into uxListRemove() just crashes.
This is my call to put data in the queue, it works with all the other commands, there’s nothing different that I can spot.
Apparently there is. I was using variable arguments as an input of the function and when those arguments were NULL vsprintf() would corrupt the memory.