Hello Mario,
If this init routine has not been changed, the issue must be elsewhere.
If it crashes during this function FLASH_DRV_CommandSequence(), I think there could be two reasons.
1. The function is not in SRAM - please check the .map file of the new SW.
2. The MCU accesses the Flash memory during the partitioning (interrupts, DMA) - can you disable interrupts before the partitioning starts?
I have noticed you install FTFC interrupt routine there. But do you use it in the application?
Thanks,
BR, Daniel