Alex Kerr

HCS08 -> No MTIM Interrupt after COP Reset...

Discussion created by Alex Kerr on Oct 27, 2008
Latest reply on Oct 29, 2008 by Ake Webjorn
Hey everybody, I have a problem...
After POR Reset the Timer Interrupt fires.
After a COP Reset at least the Timer Interrupt (12) does not fire anymore.
What is going wrong, any help ??

this ist the init routine i use.
thx

/* --- CLOCK Module --- */
  //ICSC2 - ICS Control Register 2
  ICSC2_BDIV = 0;

  /* --- COP Module --- */
  SOPT1_COPE    = 1;  /*COP enable*/
  SOPT1_COPT    = 1;  /*COP enable*/
  SOPT2_COPCLKS = 0; /*internal 1kHZ for COP Timeout*/
 
  __RESET_WATCHDOG(); /* feeds the dog */
 
  /* --- Low voltage int --- */  
  SPMSC3_LVWV   =1;
  SPMSC3_LVWACK =1;
 
  /* --- MTIM Module --- */  
  MTIMCLK_PS   = 5;   // MTIM clock source ÷ 32 (1ms)
  MTIMMOD      = (0xFF-6); // Modulo-Register, siehe xls-Tabelle!
  MTIMCLK_CLKS = 0;   // CLK-Src -> BUSCLK

  /* reset and start MTIM, enable ints */  
  MTIMSC_TSTP  = 0;
  MTIMSC_TRST  = 1;
  MTIMSC_TOIE  = 1;


  EnableInterrupts; /* enable Interrupts */

Outcomes