ST72324xx-Auto
8-bit MCU for automotive, 3.8 to 5.5V operating range with
8 to 32 Kbyte Flash, 10-bit ADC, 4 timers, SPI, SCI
Not recommended for new design
Features
Memories
■
8 to 32 Kbyte dual voltage High Density Flash
(HDFlash) with readout protection capability.
In-application programming and In-circuit
programming for HDFlash devices
■
384 bytes to 1 Kbyte RAM
■
HDFlash endurance: 100 cycles, data retention
20 years
LQFP44
10 x 10
LQFP32
7x7
4 timers
■
Clock, reset and supply management
■
Enhanced low voltage supervisor (LVD) with
programmable reset thresholds and auxiliary
voltage detector (AVD) with interrupt capability
■
Clock sources: crystal/ceramic resonator
oscillators, internal RC oscillator and external
clock input
■
PLL for 2x frequency multiplication
■
4 power saving modes: Slow, Wait, Active Halt,
and Halt
Interrupt management
■
Nested interrupt controller
■
10 interrupt vectors plus TRAP and RESET
■
9/6 external interrupt lines (on 4 vectors)
Up to 32 I/O ports
b
O
■
32/24 multifunctional bidirectional I/O lines
■
22/17 alternate function lines
■
12/10 high sink outputs
et
l
so
Device
ro
P
e
uc
d
s)
t(
O
-
Main clock controller with Real-time base,
Beep and Clock-out capabilities
■
Configurable watchdog timer
■
16-bit Timer A with 1 input capture, 1 output
compare, external clock input, PWM and pulse
generator modes
■
16-bit Timer B with 2 input captures, 2 output
compares, PWM and pulse generator modes
2 communication interfaces
■
so
b
te
le
ro
P
uc
d
s)
t(
SPI synchronous serial interface
■
SCI asynchronous serial interface
1 analog peripheral (low current coupling)
■
10-bit ADC with up to 12 input ports
Instruction set
■
8-bit data manipulation
■
63 basic instructions
■
17 main addressing modes
■
8 x 8 Unsigned Multiply Instruction
Development tools
■
Full HW/SW development pkg, ICT capability
Table 1.
Device summary
Memory
Flash 8 Kbytes
Flash 16 Kbytes
Flash 32 Kbytes
Flash 8 Kbytes
Flash 16 Kbytes
Flash 32 Kbytes
RAM (stack)
384 (256) bytes
512 (256) bytes
1024 (256) bytes
384 (256) bytes
512 (256) bytes
1024 (256) bytes
3.8 to 5.5V
Voltage range
Temperature range
-40 to 85°C
-40 to 85°C/-40 to 125°C
-40 to 85°C
-40 to 85°C/-40 to 125°C
LQFP44
10x10
Package
LQFP32
7x7
ST72324K2-Auto
ST72324K4-Auto
ST72324K6-Auto
ST72324J2-Auto
ST72324J4-Auto
ST72324J6-Auto
June 2011
Doc ID 13841 Rev 1
1/193
www.st.com
1
This is information on a product still in production but not recommended for new designs.
Contents
ST72324xx-Auto
Contents
1
2
3
4
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Register and memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Flash program memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.1
4.2
4.3
4.4
4.5
4.6
4.7
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.3.1
Readout protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
ICC interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
ICP (in-circuit programming) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
IAP (in-application programming) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Related documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.7.1
Flash Control/Status Register (FCSR) . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5
Central processing unit (CPU) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.1
5.2
5.3
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
CPU registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.3.1
Accumulator (A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Index registers (X and Y) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Program counter (PC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Condition Code register (CC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Stack Pointer register (SP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.3.2
5.3.3
5.3.4
5.3.5
b
O
6
et
l
so
ro
P
e
uc
d
s)
t(
O
-
so
b
te
le
ro
P
uc
d
s)
t(
Supply, reset and clock management . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.1
6.2
6.3
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
PLL (phase locked loop) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Multi-oscillator (MO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.3.1
6.3.2
External clock source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Crystal/ceramic oscillators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2/193
Doc ID 13841 Rev 1
ST72324xx-Auto
6.3.3
Contents
Internal RC oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.4
Reset sequence manager (RSM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6.4.1
6.4.2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Asynchronous external RESET pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6.5
System integrity management (SI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
6.5.1
6.5.2
6.5.3
6.5.4
LVD (low voltage detector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
AVD (auxiliary voltage detector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Low power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.6
SI registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.6.1
System integrity (SI) control/status register (SICSR) . . . . . . . . . . . . . . . 40
7
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.1
7.2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Masking and processing flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.2.1
7.2.2
7.2.3
7.2.4
Servicing pending interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Different interrupt vector sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Non-maskable sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Maskable sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7.3
7.4
7.5
Interrupts and low power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Concurrent and nested management . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Interrupt registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
7.5.1
7.5.2
CPU CC register interrupt bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Interrupt software priority registers (ISPRx) . . . . . . . . . . . . . . . . . . . . . . 47
bs
O
8
et
l
o
7.6
ro
P
e
7.6.1
7.6.2
uc
d
s)
t(
O
-
so
b
te
le
ro
P
uc
d
s)
t(
External interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
I/O port interrupt sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
External interrupt control register (EICR) . . . . . . . . . . . . . . . . . . . . . . . . 50
Power saving modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
8.1
8.2
8.3
8.4
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Slow mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Wait mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Active Halt and Halt modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
8.4.1
8.4.2
Active Halt mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Halt mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Doc ID 13841 Rev 1
3/193
Contents
ST72324xx-Auto
9
I/O ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
9.1
9.2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
9.2.1
9.2.2
9.2.3
Input modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Output modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Alternate functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
9.3
9.4
9.5
I/O port implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Low power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
9.5.1
I/O port implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
10
On-chip peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
10.1
Watchdog timer (WDG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
10.1.1
10.1.2
10.1.3
10.1.4
10.1.5
10.1.6
10.1.7
10.1.8
10.1.9
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
How to program the Watchdog timeout . . . . . . . . . . . . . . . . . . . . . . . . . 67
Low power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Hardware Watchdog option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Using Halt mode with the WDG (WDGHALT option) . . . . . . . . . . . . . . . 69
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Control register (WDGCR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
10.2
b
O
et
l
so
ro
P
e
10.2.1
10.2.2
10.2.3
10.2.4
10.2.5
10.2.6
10.2.7
Main clock controller with real-time clock and beeper (MCC/RTC) . . . . . 70
Programmable CPU clock prescaler . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Clock-out capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Real-time clock (RTC) timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Beeper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Low power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
MCC registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
uc
d
s)
t(
O
-
so
b
te
le
ro
P
uc
d
s)
t(
10.3
16-bit timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
10.3.1
10.3.2
10.3.3
10.3.4
10.3.5
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Low power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
4/193
Doc ID 13841 Rev 1
ST72324xx-Auto
10.3.6
10.3.7
Contents
Summary of timer modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
16-bit timer registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
10.4
Serial peripheral interface (SPI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
10.4.1
10.4.2
10.4.3
10.4.4
10.4.5
10.4.6
10.4.7
10.4.8
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
General description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Clock phase and clock polarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Error flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Low power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
SPI registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
10.5
Serial communications interface (SCI) . . . . . . . . . . . . . . . . . . . . . . . . . . 111
10.5.1
10.5.2
10.5.3
10.5.4
10.5.5
10.5.6
10.5.7
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
General description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Low power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
SCI registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
10.6
10-bit A/D converter (ADC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
10.6.1
10.6.2
b
O
11
et
l
so
ro
P
e
10.6.3
10.6.4
10.6.5
10.6.6
11.1.1
11.1.2
11.1.3
11.1.4
11.1.5
11.1.6
11.1.7
uc
d
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Low power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
ADC registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
s)
t(
O
-
so
b
te
le
ro
P
uc
d
s)
t(
Instruction set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
CPU addressing modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Inherent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Immediate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Direct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Indexed (no offset, short, long) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Indirect (short, long) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Indirect indexed (short, long) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Relative mode (direct, indirect) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
11.1
11.2
Instruction groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Doc ID 13841 Rev 1
5/193