HAL_FLASHEx_EnableFlashSleepMode() function
Enable the flash sleep while System Run
Return value
HAL status
Notes
This mode is only available for STM32F41xxx/STM32F446xx devices. This mode could n't be set while executing with the flash itself. It should be done with specific routine executed from RAM.