My STM32 (F105VC) boot program throws Cannot Access memory after program/verify ok if I have WFI instruction

I have to do a boot program to boot the application that is already present. I have done whats required including crc but when I use the WFI instruction in the startup.s file it throws cannot access memory after flash/verify ok. WFI works for APP. 

I am new to stm programming. Appreciate any help to resolve the issue.