I am working with TWR-K60N512 and using IAR embedded workbench. When I execute a project using a debugger ( like PEMicro) the code runs fine. But if I try to reset using SW3 switch on the board, the Program counter just goes to a random location and the program stops. A debug reset does bring the execution to main function. This is one of he example projects of IAR workbench for testing GPIO's. What am I missing?