Hi Senlent,
I tried with both methods you mentioned above but issue is still there. Below are observations with and without methods you mentioned above:
1) Without above methods - No Mass erase and no cache disable:
Control is jumping to default ISR at FLASH_DRV_CommandSequence() and this function is called from FLASH_DRV_SetFlexRamFunction()
2) Without above methods - Mass erase and cache disable, FLASH_TARGET defined:
Control is jumping to default ISR at FLASH_DRV_CommandSequence() and this function is called from FLASH_DRV_DEFlashPartition()