PSD4135G2
PSD4135G2V
Flash in-system programmable peripherals for 16-bit MCUs
Features
■
Single supply volate
– 3 V±10% (PSD4135G2V)
– 5 V±10% (PSD4135G2)
Up to 4 Mbit of primary Flash memory (8
uniform sectors)
256 Kbit secondary Flash memory (4 uniform
sectors)
Up to 64 Kbit SRAM
Over 3,000 gates of PLD: DPLD and CPLD
52 reconfigurable I/O ports
Enhanced JTAG serial port
Programmable power management
High endurance:
– 100,000 erase/write cycles of Flash
memory
– 1,000 erase/write cycles of PLD
■
■
■
■
■
■
■
■
O
so
b
te
le
r
P
uc
od
s)
t(
bs
-O
et
l
o
P
e
od
r
s)
t(
uc
May 2009
Doc ID 7838 Rev 2
1/104
www.st.com
1
Contents
PSD4135G2, PSD4135G2V
Contents
1
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.1
In-system programming (ISP) via JTAG . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.1.1
1.1.2
1.1.3
First time programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Inventory build-up of pre-programmed devices . . . . . . . . . . . . . . . . . . . 10
Expensive sockets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2
In-application programming (IAP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2.1
1.2.2
1.2.3
1.2.4
Simultaneous read and write to Flash memory . . . . . . . . . . . . . . . . . . . 10
Complex memory mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Separate program and data space . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
PSDsoft™ Express . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2
3
Pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
PSD architectural overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
PLDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
I/O ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
MCU bus interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
ISP via JTAG port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
In-system programming (ISP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
In-application programming (IAP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Page register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Power management unit (PMU) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4
b
O
6
5
so
te
le
6.1
6.2
6.3
6.4
Development system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
PSD register description and address offsets . . . . . . . . . . . . . . . . . . . 23
r
P
uc
od
s)
t(
bs
-O
et
l
o
P
e
od
r
s)
t(
uc
Register bit definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Data-In registers - port A, B, C, D, E, F, G . . . . . . . . . . . . . . . . . . . . . . . . 24
Data-out registers - port A, B, C, D, E, F, G . . . . . . . . . . . . . . . . . . . . . . . 24
Direction registers - ports A, B, C, D, E, F, G . . . . . . . . . . . . . . . . . . . . . . 24
Control registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2/104
Doc ID 7838 Rev 2
PSD4135G2, PSD4135G2V
Contents
6.5
6.6
6.7
6.8
6.9
6.10
6.11
6.12
6.13
6.14
Drive registers - Ports A, B, D, E, G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Drive registers - Ports C and F . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Flash Memory Protection register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Flash Boot Protection register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Page register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
PMMR0 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
PMMR2 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
VM register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Memory_ID0 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Memory_ID1 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7
Memory blocks delailed operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.1
Primary Flash and secondary Flash memory description . . . . . . . . . . . . 30
7.1.1
7.1.2
7.1.3
7.1.4
7.1.5
7.1.6
7.1.7
7.1.8
7.1.9
7.1.10
7.1.11
Memory Block Selects signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Ready/Busy pin (PE4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Memory Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Power-up condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Reading Flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Programming Flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Unlock Bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Erasing Flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Specific features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Reset
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
7.2
7.3
SRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Memory Select signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.3.1
7.3.2
Memory select configuration for MCUs with separate program and data
spaces 43
Configuration modes for MCUs with separate program and data spaces .
43
O
8
so
b
te
le
7.4
7.5
r
P
uc
od
Reset (RESET) pin input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
s)
t(
bs
-O
et
l
o
P
e
od
r
s)
t(
uc
Page register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Memory ID registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
PLDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
8.1
8.2
Decode PLD (DPLD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
General purpose PLD (GPLD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Doc ID 7838 Rev 2
3/104
Contents
PSD4135G2, PSD4135G2V
9
MCU bus interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
9.1
9.2
9.3
9.4
PSD interface to a multiplexed bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
PSD interface to a non-multiplexed bus . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Data Byte Enable reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
MCU interface examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
9.4.1
9.4.2
9.4.3
9.4.4
9.4.5
9.4.6
80C196 and 80C186 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
MC683XX and 68HC16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
80C51XA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
H8/300 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
MMC2001 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
C16X family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
10
I/O ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
10.1
10.2
General port architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Port operating modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
10.2.1
10.2.2
10.2.3
10.2.4
10.2.5
10.2.6
10.2.7
MCU I/O mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
PLD I/O mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Address In mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Data Port mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
JTAG ISP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
MCU Reset mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Address Out mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
10.3
Port Configuration registers (PCRs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
10.3.1
10.3.2
10.3.3
O
so
b
te
le
10.5
10.6
10.7
10.8
10.9
10.4
Port Data registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
10.4.1
10.4.2
Data In . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Data Out register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
r
P
uc
od
Control register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Direction register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Drive select register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
s)
t(
bs
-O
et
l
o
P
e
od
r
s)
t(
uc
Port A, B, and C registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Port D – functionality and structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Port E – functionality and structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Port F – functionality and structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Port G – functionality and structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
11
4/104
Power management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Doc ID 7838 Rev 2
PSD4135G2, PSD4135G2V
Contents
11.1
Automatic power-down (APD) unit and Power-down mode . . . . . . . . . . . 72
11.1.1
11.1.2
11.1.3
Power-down mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Other power saving options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Reset and power-on requirement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
12
In-circuit programming using the JTAG-ISP Interface . . . . . . . . . . . . . 77
12.1
12.2
12.3
Standard JTAG signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
JTAG extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Security and Flash memories protection . . . . . . . . . . . . . . . . . . . . . . . . . 78
13
14
15
16
17
Initial delivery state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Maximum rating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
DC and AC parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Package mechanical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Part numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Appendix A Pin assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
18
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
O
so
b
te
le
r
P
uc
od
s)
t(
bs
-O
et
l
o
P
e
od
r
s)
t(
uc
Doc ID 7838 Rev 2
5/104