The handler is called when an NMI or hardware interrupt occured. Check stack violation. Think of posting your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file. Give some information on which return the problem happens.
Thanks for looking and replying. I've attached the project which is based on AN84858. The Project I am debugging is A_Hssp_Programmer. The "Host" is a CY8CKIT-059 board with a LCD attached and the target is a CYBLE-222005-EVAL board.
You'll see that I've added LCD output statements after each step. The last message displayed is Verify, Step 06, ArrayID=0. This means that I've programmed the flash and then also verified it. ProgramProtectionSettings is the function call that causes the code to go into the endless while loop. That function is in ProgrammingSteps.c and I added a LCD debug output at the end of this function.
If I single step through the code at this point the return(SUCCESS) statement causes a jump to CyPmHviLviRestore (in CyPm.c) and somehow that is calling CY_ISR which is where I get stuck in the endless while loop.
I'll take a look at the stack and see if I can uncover anything there.
AN84858.cywrk_.Archive03.zip 2.5 MB