AnsweredAssumed Answered

interrupt for input port H using HCS12 T-board and mc9s12dp512 chip

Question asked by Danny Scheres on Sep 29, 2008
Latest reply on Oct 2, 2008 by Danny Scheres

Hi I’m new using codewarrior and the HCS12 T-board, onboard is the mc9s12dp512 chip. The chip uses TwinPeeks monitor. 

 

I want to use an interrupt when I trigger input pin 0 from port H. My program is working fine till I trigger the input. The mc9s12dp512 chip resets itself when the input is triggered, why?

What am I doing wrong?

 

 

//below are my settings for port H

PERH = 0xff;

PIEH = 0x01;

PIFH_PIFH0 = 1;

 

 

//example code to tryout an interrupt

#pragma CODE_SEG NON_BANKED //INTO  ROM_C000

interrupt 25 void intefunc(void)

{

  //while(PTH_PTH0==0);

 

  PORTB = ~0x99;

 

  delayms(1000);

 

  PIFH_PIFH0 = 1;

}                

#pragma CODE_SEG DEFAULT

 

 

Thanks in advance for every reaction.
Greetings dan23

Outcomes