English
Language : 

AT43USB325_05 Datasheet, PDF (41/109 Pages) ATMEL Corporation – Multimedia USB Keyboard Controller with Embedded Hub
AT43USB325
5.1.2
Stack Pointer Register – SP
Bit
15
14
13
12
11
10
9
8
$3E ($5E)
I
T
H
S
V
N
Z
C
SPH
$3D ($5D)
SP7
SP6
SP5
SP4
SP3
SP2
SP1
SP0
SPL
7
6
5
4
3
2
1
0
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Initial Value
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
The Stack Pointer points to the data SRAM stack area where the Subroutine and Interrupt
Stacks are located. This Stack space in the data SRAM must be defined by the program before
any subroutine calls are executed or interrupts are enabled. The stack pointer must be set to
point above $60. The Stack Pointer is decremented by one when data is pushed onto the Stack
with the PUSH instruction, and it is decremented by two when an address is pushed onto the
Stack with subroutine calls and interrupts. The Stack Pointer is incremented by one when data is
popped from the Stack with the POP instruction and it is incremented by two when an address is
popped from the Stack with return from subroutine RET or return from interrupt RETI.
5.2 Sleep Modes
To enter the sleep modes, the SE bit in MCUCR must be set (one) and a SLEEP instruction
must be executed. If an enabled interrupt occurs while the MCU is in a sleep mode, the MCU
awakes, executes the interrupt routine, and resumes execution from the instruction following
SLEEP. The contents of the register file, SRAM and I/O memory are unaltered. If a reset occurs
during sleep mode, the MCU wakes up and executes from the Reset vector.
5.2.1
Power Down Mode
When the SM bit is set (one), the SLEEP instruction forces the MCU into the Power Down Mode.
In this mode, the external oscillator is stopped, while the external interrupts continue operating.
Only an external reset, an external level interrupt on INT0 or INT1, can wake up the MCU.
Note that when a level triggered interrupt is used for wake-up from power down, the low level
must be held for a time longer than the reset delay time-out period tTOUT. Otherwise, the MCU
will fail to wake up.
41
3355C–USB–4/05