Problem with Flash writing and USB Host
Hello everyone,
I'm working on a project with the STM32F412VET6 and I'm having an issue with flash writing when USB Host is active.
When USB Host is active and I attempt to write to flash, execution gets stuck at the FLASH_FlushCaches() function, specifically at the very first line:
if (READ_BIT(FLASH->ACR, FLASH_ACR_ICEN) != RESET)
Notably, if I remove the MX_USB_HOST_Init() function, flash writing works fine, but if I place it anywhere in the code (even after flash writing calls), the code always gets stuck at the same point.
It seems that just including the MX_USB_HOST_Init() function in the code causes some sort of issue with the stack or something else.
I've checked the stack and it seems fine, but I currently have no other ideas about what could be causing the problem.
Do you have any suggestions for me?
Thanks!
