Hardfault exception on stm32f7 arm microprocessor at RTX thread creation
If you use stm32cube classic for configuration, the problem might be by MPU_Config function. I just switched the MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; line with MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;. This is about sharing memory by several processes or threads but I don't know the details. if your program runs on one thread or you handle the memory access by yourself, you can make the code run by that change.