English
Language : 

MC68HC908LD64 Datasheet, PDF (135/362 Pages) Freescale Semiconductor, Inc – Microcontrollers
System Integration Module (SIM)
SIM Registers
;This code works if the H register has been pushed onto the stack in the break
;service routine software. This code should be executed at the end of the break
;service routine software.
HIBYTE EQU
5
LOBYTE EQU
6
;
If not SBSW, do RTI
BRCLR SBSW,SBSR, RETURN
;See if wait mode or stop mode was exited by
;break.
TST
LOBYTE,SP
;If RETURNLO is not zero,
BNE
DOLO
;then just decrement low byte.
DEC
HIBYTE,SP
;Else deal with high byte, too.
DOLO
DEC
LOBYTE,SP
;Point to WAIT/STOP opcode.
RETURN PULH
RTI
;Restore H register.
9.8.2 SIM Reset Status Register (SRSR)
This register contains six flags that show the source of the last reset.
Clear the SIM reset status register by reading it. A power-on reset sets
the POR bit and clears all other bits in the register.
Address: $FE01
Bit 7
6
5
4
3
2
1
Bit 0
Read: POR
PIN
COP ILOP ILAD USB
0
0
Write:
POR: 1
0
0
0
0
0
0
0
= Unimplemented
Figure 9-20. SIM Reset Status Register (SRSR)
POR — Power-On Reset Bit
1 = Last reset caused by POR circuit
0 = Read of SRSR
PIN — External Reset Bit
1 = Last reset caused by external reset pin (RST)
0 = POR or read of SRSR
MC68HC908LD64 — Rev. 3.0
Freescale Semiconductor
System Integration Module (SIM)
Data Sheet
135