STM32H743 Flash not properly formatted after downloading binary using STM32CubeIDE
Hello,
I am currently in the process of writing EEPROM emulation for stm32h743. The library works mostly correctly but due to unfortunate timing of downloading file through IDE flash is not properly initialized effectively making one of the sectors invalid to use. If I use stm32CubeProgrammer and attach to running device everything works as expected.
The sector memory (0x81E0000), looks like on the screenshot below, and the amount of rows filled with zeros depends on VOLTAGE_RANGE (more info later):

the function is initialized just after configuring all peripherials (eeh_Init():(

LED diode was used for troubleshooting process. It lights up for about 400ms, if eeh_Init() is allowed to finish.
But when I start the debug session with binary file to download it lights up for way shorter time.
The amount of zeros depends on the VOLTAGE_RANGE mentioned before, used for erasing data:

My guess is that downloading binary file to microcontroller when using ide makes the code run for some amount of time before resseting and going back to the beggining.
The problem is, neither HAL_Delay(SomeAmountOfTime) nor while(uwTick<SomeAmountOfTime) doesn't work.
I assume there is some very basic infromation and simple workaround that I am unable to find and I would be vary grateful for any help on this matter.
If you need more details, please let me know.
