Unhandled ISR is executed for no apparent reason.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unhandled ISR is executed for no apparent reason.

1,478 Views
ahoysala
Contributor I

I'm using a MCF52235 along with "Processor Expert" under CW. For some reason, this project executes the unhandled ISR "Cpu_Interrupt" from "CODE\Cpu.c after PE initialization is complete in the main(). In the PE, I've enabled only the GPT0,1 and 2 timer ISRs and when I run it, the common unhandled ISR "Cpu_Interrupt" executes everytime I try single stepping through the code. Any idea why?

Labels (1)
0 Kudos
2 Replies

415 Views
RichTestardi
Senior Contributor II

If you have two or more ISRs programmed for identical levels and priorities, you'll get what look like random interrupt vectors being hit.  See http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&message.id=6266#M6266 for how I got bit by this. :smileyhappy:

 

Otherwise, when you are in Cpu_Interrupt(), can you tell us what are the top two words on the stack, pointed to by A7 and A7+4?  That will tell you the interrupt vector you took, and from where, as defined in section 11.1.2 of the ColdFire Family Programmer’s Reference Manual .

 

-- Rich

0 Kudos

415 Views
ahoysala
Contributor I

Solved, it was exactly the reason. As I did not enough time to go through the datasheet in detail before I got to working on this project(you know every project is wanted yesterday), I slipped on this and in future may slip on others others as well. I will make it a point to pull out time and go though the data sheet to avoid such happenings.

Thank you very much.

0 Kudos