Figure 69.Typical I
Figure 70.Typical V
Figure 71.Typical V
Figure 72.Typical V
Figure 73.Typical V
Figure 74.Typical V
Figure 75.Typical V
Figure 76.RESET
Figure 77.RESET
Figure 78.Two typical applications with ICCSEL/V
The ST72324B-Auto devices are members of the ST7 microcontroller family designed for
mid-range automotive applications running from 3.8 to 5.5V. Different package options offer
up to 32 I/O pins.
All devices are based on a common industry-standard 8-bit core, featuring an enhanced
instruction set and are available with Flash or ROM program memory. The ST7 family
architecture offers both power and flexibility to software developers, enabling the design of
highly efficient and compact application code.
The on-chip peripherals include an A/D converter, two general purpose timers, an SPI
interface and an SCI interface. For power economy, the microcontroller can switch
dynamically into, Slow, Wait, Active Halt or Halt mode when the application is in idle or
stand-by state.
Figure 1.Device block diagram
14/198Doc ID13466 Rev 4
Typical applications include
●all types of car body applications such as window lift, DC motor control, rain sensors
●safety microcontroller in airbag and engine management applications
SeeSection 12: Electrical characteristics on page 145 for external pin connection
guidelines.
Doc ID13466 Rev 415/198
Pin descriptionST72324B-Auto
Refer to Section 9: I/O ports on page 58 for more details on the software configuration of the
I/O ports.
The reset configuration of each pin is shown in bold. This configuration is valid as long as
the device is in reset state.
Table 2.Device pin description
No.
LQFP44
Pin
Name
LQFP32
LevelPort
Type
Input
Output
float
InputOutput
int
wpu
ana
OD
function
(after
reset)
PP
Main
630 PB4 (HS)I/O CTHSXei3XX Port B4
731 PD0/AIN0I/O C
832 PD1/AIN1I/O C
9-PD2/AIN2I/OC
10-PD3/AIN3I/O C
11-PD4/AIN4I/O C
12-PD5/AIN5I/O C
131 V
142 V
AREF
SSA
(1)
(1)
153 PF0/MCO/AIN8I/O C
164 PF1 (HS)/BEEPI/O C
17-PF2 (HS)I/O C
185
PF4/OCMP1_A
/AIN10
T
T
T
T
T
T
SAnalog reference voltage for ADC
SAnalog ground voltage
T
T
T
I/O C
T
XXXXX Port D0ADC analog input 0
XXXXX Port D1ADC analog input 1
XXXXX Port D2ADC analog input 2
XXXXX Port D3ADC analog input 3
XXXXX Port D4ADC analog input 4
XXXXX Port D5ADC analog input 5
Xei1XXX Port F0
HSXei1XX Port F1Beep signal output
HSXei1XX Port F2
XXXXXPort F4
Alternate function
Main clock
out (f
CPU
Timer A
output
compare 1
ADC analog
)
input 8
ADC analog
Input 10
196
207
21-V
22-V
238
249
25 10
PF6
(HS)/ICAP1_A
PF7
(HS)/EXTCLK_A
(1)
DD_0
(1)
SS_0
PC0/OCMP2_B
/AIN12
PC1/OCMP1_B
/AIN13
PC2
(HS)/ICAP2_B
I/O C
I/O C
SDigital main supply voltage
SDigital ground voltage
I/O C
I/O C
I/O C
HSXXXX Port F6Timer A input capture 1
T
HSXXXXPort F7
T
T
T
T
XXXXXPort C0
XXXXXPort C1
HSXXXX Port C2Timer B input capture 2
16/198Doc ID13466 Rev 4
Timer A external clock
source
Timer B
output
compare 2
Timer B
output
compare 1
ADC analog
input 12
ADC analog
input 13
ST72324B-AutoPin description
Table 2.Device pin description (continued)
No.
LQFP44
26 11
27 12
28 13
29 14
Pin
Name
LQFP32
PC3
(HS)/ICAP1_B
PC4/MISO/ICCD
ATA
PC5/MOSI
/AIN14
PC6/SCK
/ICCCLK
LevelPort
Type
Input
Output
I/O C
I/O C
I/O C
I/O C
HSXXXX Port C3Timer B input capture 1
T
T
T
T
XXXXPort C4
XXXXXPort C5
XXXXPort C6
InputOutput
int
wpu
float
ana
OD
function
(after
reset)
PP
Main
SPI master
in/slave out
data
SPI master
out/slave in
data
SPI serial
clock
SPI slave
30 15 PC7/SS
/AIN15I/O C
T
XXXXXPort C7
select
(active low)
31 16 PA3 (HS)I/O C
32-V
33-V
DD_1
SS_1
(1)
(1)
SDigital main supply voltage
SDigital ground voltage
34 17 PA4 (HS)I/O C
35-PA5 (HS)I/O C
36 18 PA6 (HS)I/O C
37 19 PA7 (HS)I/O CTHSXTPort A7
HSXei0XX Port A3
T
HSXXXXPort A4
T
HSXXXXPort A5
T
HSXTPort A6
T
(2)
(2)
Must be tied low. In the Flash
programming mode, this pin acts as
38 20 V
/ICCSELI
PP
the programming voltage input V
See Section 12.10.2 for more details.
High voltage must not be applied to
ROM devices.
39 21 RESET
40 22 V
SS_2
41 23 OSC2
42 24 OSC1
43 25 V
DD_2
(1)
(3)
(3)
(1)
I/O C
SDigital ground voltage
OResonator oscillator inverter output
I
SDigital main supply voltage
44 26 PE0/TDOI/O C
127PE1/RDII/OC
T
T
T
XXXX Port E0SCI transmit data out
XXXX Port E1SCI receive data in
Top priority non-maskable interrupt
External clock input or resonator
oscillator inverter input
Alternate function
ICC data
input
ADC analog
input 14
ICC clock
output
ADC analog
input 15
PP
.
Doc ID13466 Rev 417/198
Pin descriptionST72324B-Auto
Table 2.Device pin description (continued)
No.
LQFP44
Pin
Name
LQFP32
LevelPort
Type
Input
Output
float
InputOutput
int
wpu
ana
OD
function
(after
reset)
PP
Main
Alternate function
Caution: Negative
current injection not
228PB0I/OC
3-PB1I/OC
4-PB2I/OC
529PB3I/OC
1. It is mandatory to connect all available VDD and V
2. On the chip, each I/O port has eight pads. Pads that are not bonded to external pins are in input pull-up configuration after
reset. The configuration of these pads must be kept at reset state to avoid added current consumption..
3. OSC1 and OSC2 pins connect a crystal/ceramic resonator, or an external source to the on-chip oscillator; see Section 1:
Description and Section 12.6: Clock and timing characteristics or more details.
4. For details refer to Section 12.9.1 on page 162
T
T
T
T
Xei2XX Port B0
Xei2XX Port B1
Xei2XX Port B2
Xei2XX Port B3
pins to the supply voltage and all VSS and V
REF
allowed on this pin on
8/16 Kbyte Flash
devices.
(4)
pins to ground.
SSA
Legend / Abbreviations for Tabl e 2:
Type:I = input, O = output, S = supply
Input level: A = Dedicated analog input
In/Output level: C = CMOS 0.3V
DD
/0.7
DD
CT = CMOS 0.3VDD/0.7DD with input trigger
Output level: HS = 20mA high sink (on N-buffer only)
Port and control configuration:
Input:float = floating, wpu = weak pull-up, int = interrupt
Output:OD = open drain
(b)
, PP = push-pull
(a)
, ana = analog ports
a. In the interrupt input column, “eiX” defines the associated external interrupt vector. If the weak pull-up column
(wpu) is merged with the interrupt column (int), then the I/O configuration is pull-up interrupt input, else the
configuration is floating interrupt input.
b. In the open drain output column, ‘T’ defines a true open drain I/O (P-Buffer and protection diode to V
implemented). See Section 9: I/O ports and Section 12.9: I/O port pin characteristics for more details.
18/198Doc ID13466 Rev 4
are not
DD
ST72324B-AutoRegister and memory map
0000h
RAM
Program memory
(32, 16 or 8 Kbytes)
Interrupt and reset vectors
HW registers
0080h
007Fh
7FFFh
(see Tabl e 3)
8000h
FFDFh
FFE0h
FFFFh
(seeTable 25)
0480h
Reserved
047Fh
Short addressing
RAM (zero page)
256 bytes stack
16-bit addressing
RAM
0100h
01FFh
027Fh
0080h
0200h
00FFh
32 Kbytes
8000h
FFFFh
or 047Fh
16 Kbytes
C000h
(1024, 512 or 384 bytes)
8 Kbytes
E000h
3 Register and memory map
As shown in Figure 4 the MCU is capable of addressing 64 Kbytes of memories and I/O
registers.
The available memory locations consist of 128 bytes of register locations, up to 1024 bytes
of RAM and up to 32 Kbytes of user program memory. The RAM space includes up to 256
bytes for the stack from 0100h to 01FFh.
The highest address bytes contain the user reset and interrupt vectors.
Caution:Never access memory locations marked as ‘Reserved’. Accessing a reserved area can
have unpredictable effects on the device.
Figure 4.Memory map
Table 3.Hardware register map
AddressBlockRegister labelRegister name
0000h
0001h
0002h
0003h
0004h
0005h
0006h
0007h
0008h
0009h
000Ah
000Bh
000Ch
000Dh
000Eh
Por t A
Por t B
Por t C
Por t D
Por t E
(2)
(1)
(1)
(1)
PA DR
PADDR
PA OR
PBDR
PBDDR
PBOR
PCDR
PCDDR
PCOR
PDADR
PDDDR
PDOR
PEDR
PEDDR
PEOR
Port A data register
Port A data direction register
Port A option register
Port B data register
Port B data direction register
Port B option register
Port C data register
Port C data direction register
Port C option register
Port D data register
Port D data direction register
Port D option register
Port E data register
Port E data direction register
Port E option register
Reset
status
00h
00h
00h
00h
00h
00h
00h
00h
00h
00h
00h
00h
00h
00h
00h
(3)
(2)
(2)
(2)
(2)
(1)
Remarks
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
(1)
(1)
(1)
Doc ID13466 Rev 419/198
Register and memory mapST72324B-Auto
Table 3.Hardware register map (continued)
AddressBlockRegister labelRegister name
000Fh
0010h
0011h
0012h to
0020h
0021h
0022h
0023h
0024h
0025h
0026h
0027h
Por t F
SPI
ITC
(1)
PFDR
PFDDR
PFOR
SPIDR
SPICR
SPICSR
ISPR0
ISPR1
ISPR2
ISPR3
Port F data register
Port F data direction register
Port F option register
Reserved area (15 bytes)
SPI data I/O register
SPI control register
SPI control/status register
TACS R
TA IC 1 H R
TA IC 1 L R
TAOC 1 H R
TAOC1LR
TACHR
TACL R
TAACHR
TA AC L R
TA IC 2 H R
TA IC 2 L R
TAOC 2 H R
TAOC2LR
Timer A control register 2
Timer A control register 1
Timer A control/status register
Timer A input capture 1 high register
Timer A input capture 1 low register
Timer A output compare 1 high register
Timer A output compare 1 low register
Timer A counter high register
Timer A counter low register
Timer A alternate counter high register
Timer A alternate counter low register
Timer A input capture 2 high register
Timer A input capture 2 low register
Timer A output compare 2 high register
Timer A output compare 2 low register
Timer B control register 2
Timer B control register 1
Timer B control/status register
Timer B input capture 1 high register
Timer B input capture 1 low register
Timer B output compare 1 high register
Timer B output compare 1 low register
Timer B counter high register
Timer B counter low register
Timer B alternate counter high register
Timer B alternate counter low register
Timer B input capture 2 high register
Timer B input capture 2 low register
Timer B output compare 2 high register
Timer B output compare 2 low register
SCI status register
SCI data register
SCI baud rate register
SCI control register 1
SCI control register 2
SCI extended receive prescaler register
Reserved area
SCI extended transmit prescaler register
Control/status register
Data high register
Data low register
0073h
007Fh
1. Legend: x = undefined, R/W = read/write.
2. The bits associated with unavailable pins must always keep their reset value.
3. The contents of the I/O port DR registers are readable only in output configuration. In input configuration, the values of the
I/O pins are returned instead of the DR register contents.
Reserved area (24 bytes)
Reserved area (13 bytes)
00h
00h
00h
R/W
Read only
Read only
Doc ID13466 Rev 421/198
Flash program memoryST72324B-Auto
4 Flash program memory
4.1 Introduction
The ST7 dual voltage High Density Flash (HDFlash) is a non-volatile memory that can be
electrically erased as a single block or by individual sectors and programmed on a byte-bybyte basis using an external V
The HDFlash devices can be programmed and erased off-board (plugged in a programming
tool) or on-board using ICP (in-circuit programming) or IAP (in-application programming).
The array matrix organization allows each sector to be erased and reprogrammed without
affecting other sectors.
4.2 Main features
●3 Flash programming modes:
–Insertion in a programming tool. In this mode, all sectors including option bytes
can be programmed or erased.
–ICP (in-circuit programming). In this mode, all sectors including option bytes can
be programmed or erased without removing the device from the application board.
–IAP (in-application programming). In this mode, all sectors, except Sector 0, can
be programmed or erased without removing the device from the application board
and while the application is running.
●ICT (in-circuit testing) for downloading and executing user application test patterns in
RAM
●Readout protection
●Register Access Security System (RASS) to prevent accidental programming or
erasing
supply.
PP
4.3 Structure
The Flash memory is organized in sectors and can be used for both code and data storage.
Depending on the overall Flash memory size in the microcontroller device, there are up to
three user sectors (see
unnecessary erasing of the whole Flash memory when only a partial erasing is required.
The first two sectors have a fixed size of 4 Kbytes (see Figure 5). They are mapped in the
upper part of the ST7 addressing space so the reset and interrupt vectors are located in
Sector 0 (F000h-FFFFh).
Table 4.Sectors available in Flash devices
Flash size (bytes)Available sectors
22/198Doc ID13466 Rev 4
Ta ble 4). Each of these sectors can be erased independently to avoid
4KSector 0
8KSectors 0, 1
>8KSectors 0, 1, 2
ST72324B-AutoFlash program memory
4Kbytes
4Kbytes
Sector 1
Sector 0
Sector 2
8K16K
32K
Flash
FFFFh
EFFFh
DFFFh
7FFFh
24 Kbytes
memory size
8Kbytes
BFFFh
4.3.1 Readout protection
Readout protection, when selected, provides a protection against program memory content
extraction and against write access to Flash memory. Even if no protection can be
considered as totally unbreakable, the feature provides a very high level of protection for a
general purpose microcontroller.
In Flash devices, this protection is removed by reprogramming the option. In this case, the
entire program memory is first automatically erased.
Readout protection selection depends on the device type:
●In Flash devices it is enabled and removed through the FMP_R bit in the option byte.
●In ROM devices it is enabled by mask option specified in the option list.
Figure 5.Memory map and sector address
4.4 ICC interface
ICC needs a minimum of 4 and up to 6 pins to be connected to the programming tool (see
Figure 6). These pins are:
●RESET: device reset
●V
●ICCCLK: ICC output serial clock pin
●ICCDATA: ICC input/output serial data pin
●ICCSEL/V
●OSC1 (or OSCIN): main clock input for external source (optional)
●V
: device power supply ground
SS
: programming voltage
PP
: application board power supply (optional, seeFigure 6, Note 3).
DD
Doc ID13466 Rev 423/198
Flash program memoryST72324B-Auto
ICC connector
ICCDATA
ICCCLK
RESET
V
DD
HE10 connector type
Application
power supply
1
246810
975 3
Programming tool
ICC connector
Application board
ICC cable
(See note 3)
10k
V
SS
ICCSEL/VPP
ST7
OSC1
OSC2
Mandatory for
See note 1
See note 2
Application
reset source
Application
I/O
(see note 4)
8/16 Kbyte Flash devices
Figure 6.Typical ICC interface
1. If the ICCCLK or ICCDATA pins are only used as outputs in the application, no signal isolation is
necessary. As soon as the programming tool is plugged to the board, even if an ICC session is not in
progress, the ICCCLK and ICCDATA pins are not available for the application. If they are used as inputs by
the application, isolation such as a serial resistor has to be implemented in case another device forces the
signal. Refer to the Programming Tool documentation for recommended resistor values.
2. During the ICC session, the programming tool must control the RESET
between the programming tool and the application reset circuit if it drives more than 5mA at high level
(PUSH-pull output or pull-up resistor <1K). A schottky diode can be used to isolate the application reset
circuit in this case. When using a classical RC network with R>1K or a reset management IC with open
drain output and pull-up resistor >1K, no additional components are needed. In all cases the user must
ensure that no external reset is generated by the application during the ICC session.
3. The use of Pin 7 of the ICC connector depends on the programming tool architecture. This pin must be
connected when using most ST programming tools (it is used to monitor the application power supply).
Please refer to the programming tool manual.
4. Pin 9 has to be connected to the OSC1 (OSCIN) pin of the ST7 when the clock is not available in the
application or if the selected clock option is not programmed in the option byte. ST7 devices with multioscillator capability need to have OSC2 grounded in this case.
pin. This can lead to conflicts
Caution:External clock ICC entry mode is mandatory in ST72F324B 8/16 Kbyte Flash devices. In
this case pin 9 must be connected to the OSC1 (OSCIN) pin of the ST7 and OSC2 must be
grounded. 32 Kbyte Flash devices may use external clock or application clock ICC entry
mode.
4.5 ICP (in-circuit programming)
To perform ICP the microcontroller must be switched to ICC (in-circuit communication) mode
by an external controller or programming tool.
Depending on the ICP code downloaded in RAM, Flash memory programming can be fully
24/198Doc ID13466 Rev 4
customized (number of bytes to program, program locations, or selection serial
communication interface for downloading).
When using an STMicroelectronics or third-party programming tool that supports ICP and
the specific microcontroller device, the user needs only to implement the ICP hardware
interface on the application board (see
to the device pinout description.
Figure 6). For more details on the pin locations, refer
ST72324B-AutoFlash program memory
4.6 IAP (in-application programming)
This mode uses a BootLoader program previously stored in Sector 0 by the user (in ICP
mode or by plugging the device in a programming tool).
This mode is fully controlled by user software. This allows it to be adapted to the user
application, (such as user-defined strategy for entering programming mode, choice of
communications protocol used to fetch the data to be stored). For example, it is possible to
download code from the SPI, SCI, USB or CAN interface and program it in the Flash. IAP
mode can be used to program any of the Flash sectors except Sector 0, which is write/erase
protected to allow recovery in case errors occur during the programming operation.
4.7 Related documentation
For details on Flash programming and ICC protocol, refer to the ST7 Flash Programming
Reference Manual and to the ST7 ICC Protocol Reference Manual
4.7.1 Flash Control/Status Register (FCSR)
This register is reserved for use by programming tool software. It controls the Flash
programming and erasing operations.
FCSRReset value:0000 0000 (00h)
76543210
.
00000000
R/WR/WR/WR/WR/WR/WR/WR/W
Table 5.Flash control/status register address and reset value
Address (Hex)Register label76543210
0029hFCSR reset value00000000
Doc ID13466 Rev 425/198
Central processing unit (CPU)ST72324B-Auto
Accumulator
X index register
Y index register
Stack pointer
Condition code register
Program counter
70
1C1I1HI0NZ
Reset value = reset vector @ FFFEh-FFFFh
70
70
70
0
7
158
PCH
PCL
15
870
Reset value = stack higher address
Reset value = 1X11X1XX
Reset value = XXh
Reset value = XXh
Reset value = XXh
X = undefined value
5 Central processing unit (CPU)
5.1 Introduction
This CPU has a full 8-bit architecture and contains six internal registers allowing efficient 8bit data manipulation.
5.2 Main features
●Enable executing 63 basic instructions
●Fast 8-bit by 8-bit multiply
●17 main addressing modes (with indirect addressing mode)
●Two 8-bit index registers
●16-bit stack pointer
●Low power Halt and Wait modes
●Priority maskable hardware interrupts
●Non-maskable software/hardware interrupts
5.3 CPU registers
The six CPU registers shown in Figure 7 are not present in the memory mapping and are
accessed by specific instructions.
Figure 7.CPU registers
26/198Doc ID13466 Rev 4
ST72324B-AutoCentral processing unit (CPU)
5.3.1 Accumulator (A)
The Accumulator is an 8-bit general purpose register used to hold operands and the results
of the arithmetic and logic calculations and to manipulate data.
5.3.2 Index registers (X and Y)
These 8-bit registers are used to create effective addresses or as temporary storage areas
for data manipulation. (The Cross-Assembler generates a precede instruction (PRE) to
indicate that the following instruction refers to the Y register.)
The Y register is not affected by the interrupt automatic procedures.
5.3.3 Program counter (PC)
The program counter is a 16-bit register containing the address of the next instruction to be
executed by the CPU. It is made of two 8-bit registers PCL (Program Counter Low which is
the LSB) and PCH (Program Counter High which is the MSB).
5.3.4 Condition Code register (CC)
The 8-bit Condition Code register contains the interrupt masks and four flags representative
of the result of the instruction just executed. This register can also be handled by the PUSH
and POP instructions. These bits can be individually tested and/or controlled by specific
instructions.
CCReset value: 111x1xxx
76543210
11I1HI0NZC
R/WR/WR/WR/WR/WR/WR/WR/W
Table 6.Arithmetic management bits
BIt NameFunction
Half carry
This bit is set by hardware when a carry occurs between bits 3 and 4 of the ALU
during an ADD or ADC instructions. It is reset by hardware during the same
4H
2N
instructions.
0: No half carry has occurred.
1: A half carry has occurred.
This bit is tested using the JRH or JRNH instruction. The H bit is useful in BCD
arithmetic subroutines.
Negative
This bit is set and cleared by hardware. It is representative of the result sign of the last
arithmetic, logical or data manipulation. It is a copy of the result 7th bit.
0: The result of the last operation is positive or null.
1: The result of the last operation is negative (that is, the most significant bit is a logic
1.
This bit is accessed by the JRMI and JRPL instructions.
Doc ID13466 Rev 427/198
Central processing unit (CPU)ST72324B-Auto
Table 6.Arithmetic management bits (continued)
BIt NameFunction
Zero (Arithmetic Management bit)
This bit is set and cleared by hardware. This bit indicates that the result of the last
1Z
0C
Table 7.Software interrupt bits
BIt NameFunction
5I1
3I0
arithmetic, logical or data manipulation is zero.
0: The result of the last operation is different from zero.
1: The result of the last operation is zero.
This bit is accessed by the JREQ and JRNE test instructions.
Carry/borrow
This bit is set and cleared by hardware and software. It indicates an overflow or an
underflow has occurred during the last arithmetic operation.
0: No overflow or underflow has occurred.
1: An overflow or underflow has occurred.
This bit is driven by the SCF and RCF instructions and tested by the JRC and JRNC
instructions. It is also affected by the ‘bit test and branch’, shift and rotate instructions.
Software Interrupt Priority 1
The combination of the I1 and I0 bits determines the current interrupt software priority
(see Ta b le 8).
Software Interrupt Priority 0
The combination of the I1 and I0 bits determines the current interrupt software priority
(see Ta b le 8).
Table 8.Interrupt software priority selection
Interrupt software priorityLevelI1I0
Level 0 (main)
Low
10
Level 101
Level 200
Level 3 (= interrupt disable)11
High
These two bits are set/cleared by hardware when entering in interrupt. The loaded value is
given by the corresponding bits in the interrupt software priority registers (ISPRx). They can
be also set/cleared by software with the RIM, SIM, IRET, HALT, WFI and PUSH/POP
instructions.
See Section 7: Interrupts on page 41 for more details.
The Stack Pointer is a 16-bit register which is always pointing to the next free location in the
stack. It is then decremented after data has been pushed onto the stack and incremented
before data is popped from the stack (see
Since the stack is 256 bytes deep, the 8 most significant bits are forced by hardware.
Following an MCU reset, or after a Reset Stack Pointer instruction (RSP), the Stack Pointer
contains its reset value (the SP7 to SP0 bits are set) which is the stack higher address.
The least significant byte of the Stack Pointer (called S) can be directly accessed by an LD
instruction.
Note:When the lower limit is exceeded, the Stack Pointer wraps around to the stack upper limit,
without indicating the stack overflow. The previously stored information is then overwritten
and therefore lost. The stack also wraps in case of an underflow.
Figure 8).
The stack is used to save the return address during a subroutine call and the CPU context
during an interrupt. The user may also directly manipulate the stack by means of the PUSH
and POP instructions. In the case of an interrupt, the PCL is stored at the first location
pointed to by the SP. Then the other registers are stored in the next locations as shown in
Figure 8.
●When an interrupt is received, the SP is decremented and the context is pushed on the
stack.
●On return from interrupt, the SP is incremented and the context is popped from the
stack.
A subroutine call occupies two locations and an interrupt five locations in the stack area.