Do you have configASSERT
enabled along with recommended stack checking ? See FreeRTOS - stacks and stack overflow checking .
Maybe the bare minimum configMINIMAL_STACK_SIZE
is not sufficient for the flash functions you’re using.
Again are there any FreeRTOS calls in your ISR ? Mind to show the ISR code, too ?