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.
If you are entering sleep mode then you have to enable sleep mode debugging in the DBGMCU_CR register either in code or you can also do it from debugger, but in that second case you have to configure debugger to Connect under Reset to prevent code running to WFI instruction at which point debugger cannot access the CPU anymore.