I have a custom board with a STM32H743 and trying to get USB host mass storage going. When I plug a flash pendrive I get a hardfault at the instruction in tasks.c shown in the picture. The cause is the value of pxEventList->xListEnd->pxNext which is 0xac240184. It should start at 0x24… It seems it is mis-aligned with one byte. Any idea how to trap this problem?
With possible memory corruption, be sure you have configASSERT() defined and that you enable stack overflow checking and use the malloc-failed hook.
And with Cortex M, the FAQ is especially helpful:
The code works with standalone and CMSIS_V1 FreeRTOS wrapper, but not with CMSIS_V2 wrapper, pointing to some bug there.
The image you attached shows a memory corruption (look at the value of uxNumberOfItems). Did you try the suggestions from Jeff above?
Thanks.