Interrupt Default Handler Endless Loop

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I've got a project for the CYBLE-222005 module that I'm debugging. After one of the function calls returns success IntDefaultHandler is called automatically in Cm3Start.c. This is a generated source file and the comments inside this function state

   
    

/***************************************************************************
    * We must not get here. If we do, a serious problem occurs, so go into
    * an infinite loop.
    ***************************************************************************/

   
   

I'm not sure how we got here or how I can go about debugging this further. The project does not use any interrupts which makes this even more puzzling.

   

Any help with this would be greatly appreciated.

   

 

   

Thanks,

   

George

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi Bob,

   

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.

   

 

   

Thanks,

   

George

0 Likes
Anonymous
Not applicable

Here's what the stack looks like when it enters the CyISR routine:

   

   

0 Likes