MMC2107/D
REV 2
MMC2107
Technical Data
HCMOS
Mic ro c ontro ll er Uni t
M•CORE M•
C
ORE MCO
RE M•CORE
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
blank
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC2107 – Rev. 2.0 Technical Data
MOTOROLA 3
MMC2107
Technical Data
Motorola reserves the right to make changes without further notice to any products
herein. Motorola makes no warranty, representation or guarantee regarding the
suitability of its products for any particular purpose, nor does Motorola assume any
liab ility a rising out of the application or u se of any product or ci rcuit, a nd specifica lly
disclaims any and all liability, including without limitation consequential or incidental
damages. "Typical" parameters which may be provided in Motorola data sheets and/or
specifications can and do vary in different applications and actual performance may
vary over time. All operating parameters, including "Typicals" must be validated for
each customer application by customer’s technical experts. Motorola does not convey
any license under its patent rights nor the rights of others. Motorola products are not
designed, intended, or authorized for use as components in systems intended for
surgical implant into the body, or other applications intended to supp ort or sustain life,
or for an y ot her app lication in which the failure o f the M otorola prod uct could crea te a
situation where personal injury or death may occur. Should Buyer purchase or use
Motorola products for any such unintended or unauthorized application, Buyer shall
indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and
distributors harmless against all claims, costs, damages, and expenses, and
reasonable attorney fees arising out of, directly or indirectly, any claim of personal
injury or death associated with such unintended or unauthorized use, even if such claim
alleges that Motorola was negligent regarding the design or manufacture of the part.
Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer.
Motorola and are registered trademarks of Motorola, Inc.
DigitalDNA is a trademark of Motorola, Inc. © Motorola, Inc., 2000
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
4MOTOROLA
Technical Data
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA List of S ect ions 5
Technical Data — MMC2107
List of Sections
Section 1. General Description . . . . . . . . . . . . . . . . . . . .43
Section 2. System Memory Map . . . . . . . . . . . . . . . . . . .51
Section 3. Chip Configuration Module (CCM) . . . . . . . .89
Section 4. Signal Description. . . . . . . . . . . . . . . . . . . . .107
Section 5. Reset Controller Module. . . . . . . . . . . . . . . .129
Section 6. M•CORE M210 Central Processor
Unit (CPU) . . . . . . . . . . . . . . . . . . . . . . . . . .143
Section 7. Interrupt Controller Module . . . . . . . . . . . . .153
Section 8. Static Random-Access Memory
(SRAM). . . . . . . . . . . . . . . . . . . . . . . . . . . . .175
Section 9. Non-Volatile Memory FLASH
(CMFR). . . . . . . . . . . . . . . . . . . . . . . . . . . . .179
Section 10. Clock Module. . . . . . . . . . . . . . . . . . . . . . . .221
Section 11. Ports Module . . . . . . . . . . . . . . . . . . . . . . . .247
Section 12. Edge Port Module (EPORT) . . . . . . . . . . . .261
Section 13. Watchdog Timer Module . . . . . . . . . . . . . .271
Section 14 . Programmable Interrupt Timer
Modules (PIT1 and PIT2) . . . . . . . . . . . . . .281
Section 15. Timer Modules (TIM1 and TIM2). . . . . . . . .293
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
6 List of S ect ions MOTOROLA
Li st of Sec ti o ns
Section 16. Serial Communications Interface
Modules (SCI1 and SCI2) . . . . . . . . . . . . . .329
Section 17. Serial Peripheral Interface
Module (SPI) . . . . . . . . . . . . . . . . . . . . . . . .371
Section 18. Queued Analog-to-Digital
Converter (QADC). . . . . . . . . . . . . . . . . . . .399
Section 19. External Bus Interface Module (EBI) . . . . .503
Section 20. Chip Select Module. . . . . . . . . . . . . . . . . . .521
Section 21. JTAG Test Access Port and OnCE . . . . . .533
Section 22. Electrical Specifications. . . . . . . . . . . . . . .585
Section 23. Mechanical Specifications . . . . . . . . . . . . .609
Section 24. Ordering Information . . . . . . . . . . . . . . . . .615
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Table of Contents 7
Technical Data MMC2107
Table of Contents
Section 1. General Description
1.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
1.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
1.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
1.4 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48
Section 2. System M emory Map
2.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
2.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
2.3 Address Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
2.4 Register Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
Section 3. Chip Configuration Module (CCM)
3.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89
3.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90
3.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90
3.4 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90
3.4.1 Master Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
3.4.2 Single-Chip Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
3.4.3 Emulation Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
3.4.4 Factory Access Slave Test (FAST) Mode . . . . . . . . . . . . . .91
3.5 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92
3.6 Signal Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
8 Table of Contents M OTOROLA
Table of Contents
3.7 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . . .93
3.7.1 Programming Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .93
3.7.2 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94
3.7.3 Register Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94
3.7.3.1 Chip Configuration Register. . . . . . . . . . . . . . . . . . . . . . .94
3.7.3.2 Reset Configuration Register. . . . . . . . . . . . . . . . . . . . . .9 7
3.7.3.3 Chip Identification Register . . . . . . . . . . . . . . . . . . . . . . .99
3.7.3.4 Chip T est Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100
3.8 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100
3.8.1 Reset Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101
3.8.2 Chip Mode Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103
3.8.3 Boot Device Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . .103
3.8.4 Output Pad Strength Configuration . . . . . . . . . . . . . . . . . .105
3.8.5 Clock Mode Selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . .105
3.8.6 Internal FLASH Configuration . . . . . . . . . . . . . . . . . . . . . .106
3.9 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106
3.10 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106
Section 4. Signal Description
4.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107
4.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109
4.3 Package Pinout Summary . . . . . . . . . . . . . . . . . . . . . . . . . . .110
4.4 MMC2107 Specific Implementation Signal Issues . . . . . . . . .120
4.4.1 RSTOUT Signal Functions. . . . . . . . . . . . . . . . . . . . . . . . .120
4.4.2 INT Signal Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121
4.5 Signal Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121
4.5.1 Reset Signals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121
4.5.1.1 Reset In (RESET) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121
4.5.1.2 Reset Out (RSTOUT). . . . . . . . . . . . . . . . . . . . . . . . . . .121
4.5.2 Phase-Lock Loop (PLL) and Clock Signals . . . . . . . . . . . .122
4.5.2.1 External Clock In (EXTAL). . . . . . . . . . . . . . . . . . . . . . .122
4.5.2.2 Crystal (XTAL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122
4.5.2.3 Clock Out (CLKOUT) . . . . . . . . . . . . . . . . . . . . . . . . . . .122
4.5.2.4 Synthesizer Power (VDDSYN and VSSSYN). . . . . . . . . . .122
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Table of Contents
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Table of Contents 9
4.5.3 External Memory Interface Signals . . . . . . . . . . . . . . . . . .122
4.5.3.1 Data Bus (D[31:0]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122
4.5.3.2 Show Cycle Strobe (SHS) . . . . . . . . . . . . . . . . . . . . . . .123
4.5.3.3 Transfer Acknowledge (TA). . . . . . . . . . . . . . . . . . . . . .123
4.5.3.4 Transfer Error Acknowledge (TEA) . . . . . . . . . . . . . . . .123
4.5.3.5 Emulation Mode Chip Selects (CSE [1:0]) . . . . . . . . . . .123
4.5.3.6 Transfer Code (TC[2:0]). . . . . . . . . . . . . . . . . . . . . . . . .123
4.5.3.7 Read/Write (R/W). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123
4.5.3.8 Address Bus (A[22:0]) . . . . . . . . . . . . . . . . . . . . . . . . . .124
4.5.3.9 Enabl e Byte (EB[3:0]) . . . . . . . . . . . . . . . . . . . . . . . . . .124
4. 5.3.10 Chip Sele ct (CS[3:0]). . . . . . . . . . . . . . . . . . . . . . . . . . .124
4.5.3.11 Output Enable (OE) . . . . . . . . . . . . . . . . . . . . . . . . . . . .124
4.5.4 Edge P ort Signals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124
4.5.4.1 External Interrupts (INT[7:6]) . . . . . . . . . . . . . . . . . . . . .124
4.5.4.2 External Interrupts (INT[5:2]) . . . . . . . . . . . . . . . . . . . . .124
4.5.4.3 External Interrupts (INT[1:0]) . . . . . . . . . . . . . . . . . . . . .125
4.5.5 Serial Peripheral Interface Module Signals . . . . . . . . . . . .125
4.5.5.1 Master Out/Slave In (MOSI). . . . . . . . . . . . . . . . . . . . . .125
4.5.5.2 Master In/Slave Out (MISO). . . . . . . . . . . . . . . . . . . . . .125
4.5.5.3 Serial Clock (SCK). . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
4.5.5.4 Slave Select (SS). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
4.5.6 Serial Communications Interface Module Signals . . . . . . .125
4.5.6.1 Receive Data (RXD1 and RXD2). . . . . . . . . . . . . . . . . .125
4.5.6.2 Transmit Data (TXD1 and TXD2). . . . . . . . . . . . . . . . . .126
4.5.7 Timer Signals (ICOC1[3:0] and ICOC2[3:0]) . . . . . . . . . . .126
4.5.8 Analog-to-Digital Converter Signals. . . . . . . . . . . . . . . . . .126
4.5.8.1 Analog Inputs (PQA[4:3], PQA[1:0],
and PQB[3:0]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126
4.5.8.2 Analog Reference (VRH and VRL) . . . . . . . . . . . . . . . . .126
4.5.8.3 Analog Supply (VDDA and VSSA) . . . . . . . . . . . . . . . . . .126
4.5.8.4 Positive Supply (VDDH) . . . . . . . . . . . . . . . . . . . . . . . . .126
4.5.9 Debug and Emulation Support Signals . . . . . . . . . . . . . . .127
4.5.9.1 Test Reset (TRST). . . . . . . . . . . . . . . . . . . . . . . . . . . . .127
4.5.9.2 Test Clock (TCLK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127
4.5.9.3 Test Mode Select (TMS ) . . . . . . . . . . . . . . . . . . . . . . . .127
4.5.9.4 Test Data Input (TDI) . . . . . . . . . . . . . . . . . . . . . . . . . . .127
4.5.9.5 Test Data Output (TDO). . . . . . . . . . . . . . . . . . . . . . . . .127
4.5.9.6 Debug Event (DE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
10 Table of Contents M OTOROLA
Table of Contents
4.5.10 Test Signal (TEST). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128
4.5.11 Power and Ground Signals . . . . . . . . . . . . . . . . . . . . . . . .128
4.5.11.1 Power for FLASH Erase/Program (VPP) . . . . . . . . . . . .128
4.5.11.2 Power and Ground for FLASH Array
(VDDF and VSSF) . . . . . . . . . . . . . . . . . . . . . . . . . . . .128
4.5.11.3 Standby Power (VSTBY) . . . . . . . . . . . . . . . . . . . . . . . . .128
4.5.11.4 Positive Supply (VDD). . . . . . . . . . . . . . . . . . . . . . . . . . .128
4.5.11.5 Ground (VSS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128
Section 5. Reset Controller Module
5.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
5.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130
5.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130
5.4 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131
5.5 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131
5.6 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .132
5.6.1 Reset Control Register. . . . . . . . . . . . . . . . . . . . . . . . . . . .133
5.6.2 Reset Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . .134
5.6.3 Reset Test Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135
5.7 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136
5.7.1 Reset Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136
5.7.1.1 Power-On Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137
5.7.1.2 External Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137
5.7.1.3 Watchdog Timer Reset . . . . . . . . . . . . . . . . . . . . . . . . .137
5.7.1.4 Loss of Clock Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . .137
5.7.1.5 Loss of Lock Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . .138
5.7.1.6 Software Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138
5.7.2 Reset Control Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138
5.7.2.1 Synchronous Reset Requests . . . . . . . . . . . . . . . . . . . .138
5.7.2.2 Internal Reset Request . . . . . . . . . . . . . . . . . . . . . . . . .140
5.7.2.3 Power-On Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140
5.7.3 Concurrent Resets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140
5.7.3.1 Reset F low. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140
5.7.3.2 Reset Status Flags. . . . . . . . . . . . . . . . . . . . . . . . . . . . .141
5.8 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Table of Contents
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Table of Contents 11
Section 6. MCORE M 210 Central
Processor Unit (CPU)
6.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143
6.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143
6.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144
6.4 Microarchitecture Summary . . . . . . . . . . . . . . . . . . . . . . . . . .145
6.5 Programming Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147
6.6 Data F o rmat Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149
6.7 Operand Addressing Capabilities. . . . . . . . . . . . . . . . . . . . . .150
6.8 Instruction Set Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . .150
Section 7. Interrupt Controller Module
7.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153
7.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154
7.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154
7.4 Low-Power Mode Operation. . . . . . . . . . . . . . . . . . . . . . . . . .154
7.5 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
7.6 External Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
7.7 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .155
7.7.1 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156
7.7.2 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157
7.7.2.1 Interrupt Control Register. . . . . . . . . . . . . . . . . . . . . . . .157
7.7.2.2 Interrupt Status Register . . . . . . . . . . . . . . . . . . . . . . . .159
7.7.2.3 Interrupt Force Registers . . . . . . . . . . . . . . . . . . . . . . . .160
7.7.2.4 Interrupt Pending Register. . . . . . . . . . . . . . . . . . . . . . .162
7.7.2.5 Normal Interrupt Enable Register. . . . . . . . . . . . . . . . . .163
7.7.2.6 Normal Interrupt Pending Register. . . . . . . . . . . . . . . . .164
7.7.2.7 Fast Interrupt Enable Register. . . . . . . . . . . . . . . . . . . .165
7.7.2.8 Fast Interrupt Pending Register. . . . . . . . . . . . . . . . . . .166
7.7.2.9 Priority Level Select Registers. . . . . . . . . . . . . . . . . . . .167
7.8 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .167
7.8.1 Interrupt Sources and Prioritization . . . . . . . . . . . . . . . . . .168
7.8.2 Fast and Normal Interrupt Requests . . . . . . . . . . . . . . . . .168
7.8.3 Autovectored and Vectored Interrupt Requests. . . . . . . . .169
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
12 Table of Contents M OTOROLA
Table of Contents
7.8.4 Interrupt Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . .171
7.8.4.1 MCORE Processor Configuration. . . . . . . . . . . . . . . . .171
7.8.4.2 Interrupt Controller Configuration. . . . . . . . . . . . . . . . . .171
7.8.4.3 Interrupt Source Configuration. . . . . . . . . . . . . . . . . . . .172
7.8.5 Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172
Section 8. Static Random-Access Memory (SRAM)
8.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175
8.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175
8.3 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175
8.4 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176
8.5 Standby Power Supply Pin (VSTBY) . . . . . . . . . . . . . . . . . . . .176
8.6 Standby Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176
8.7 Reset Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177
8.8 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177
Section 9. Non-Volatile Memory FLASH (CMFR)
9.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179
9.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .180
9.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .181
9.4 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .182
9.4.1 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .182
9.4.2 Disabled Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .182
9.5 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183
9.6 Glossary of Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185
9.7 Registers and Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . .186
9.7.1 Control Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187
9.7.1.1 CMFR Module Configuration Register. . . . . . . . . . . . . .188
9.7.1.2 CMFR Module Test Register . . . . . . . . . . . . . . . . . . . . .193
9.7.1.3 CMFR High-Voltage Control Register . . . . . . . . . . . . . .196
9.7.2 Array Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .203
9.7.2.1 Read Page Buffers. . . . . . . . . . . . . . . . . . . . . . . . . . . . .203
9.7.2.2 Program Page Buffers . . . . . . . . . . . . . . . . . . . . . . . . . .204
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Table of Contents
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Table of Contents 13
9.8 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205
9.8.1 Master Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205
9.8.2 Register Read and Write Operation. . . . . . . . . . . . . . . . . .205
9.8.3 Array Read Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .205
9.8.4 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206
9.8.4.1 Program Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . .207
9.8.4.2 Program Margin Reads . . . . . . . . . . . . . . . . . . . . . . . . .211
9.8.4.3 Programming Shadow Information. . . . . . . . . . . . . . . . .212
9.8.4.4 Program Pulse-Width and Amplitude Modulation . . . . .213
9.8.4.5 Overprogramming . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213
9.8.5 Erasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214
9.8.5.1 Erase Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215
9.8.5.2 Erase Margin Reads . . . . . . . . . . . . . . . . . . . . . . . . . . .218
9.8.5.3 Erasing Shadow Information Words. . . . . . . . . . . . . . . .219
9.8.6 Erase Pulse Amplitude and W idth Modulation. . . . . . . . . .219
9.8.7 Emulation Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220
9.9 Master Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220
9.10 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220
Section 10. Clock Module
10.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .221
10.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222
10.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222
10.4 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223
10.4.1 Normal PLL Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223
10.4.2 1:1 PLL Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223
10.4.3 External Clock Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223
10.4.4 Low-Power Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223
10.4.4.1 Wait and Doze Modes . . . . . . . . . . . . . . . . . . . . . . . . . .223
10.4.4.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224
10.5 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224
10.6 Signal Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
10.6.1 EXTAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
10.6.2 XTAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
10.6.3 CLKOUT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
14 Table of Contents M OTOROLA
Table of Contents
10.6.4 VDDSYN and VSSSYN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
10.6.5 RSTOUT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226
10.7 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .226
10.7.1 Module Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226
10.7.2 Register Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . .227
10.7.2.1 Synthesizer Control Register. . . . . . . . . . . . . . . . . . . . .227
10.7.2.2 Synthesizer Status Register. . . . . . . . . . . . . . . . . . . . . .230
10.7.2.3 Synthesizer Test Register . . . . . . . . . . . . . . . . . . . . . . .233
10.7.2.4 Synthesizer Test Register 2. . . . . . . . . . . . . . . . . . . . . .234
10.8 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235
10.8.1 System Clock Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235
10.8.2 System Clocks Generation. . . . . . . . . . . . . . . . . . . . . . . . .236
10.8.3 PLL Lock Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236
10.8.3.1 PLL Loss of Lock Conditions . . . . . . . . . . . . . . . . . . . . .238
10.8.3.2 PLL Loss of Lock Reset. . . . . . . . . . . . . . . . . . . . . . . . .238
10.8.4 Loss of Clock Detection . . . . . . . . . . . . . . . . . . . . . . . . . . .238
10.8.4.1 Alternate Clock Selection. . . . . . . . . . . . . . . . . . . . . . . .239
10.8.4.2 Loss-of-Clock Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . .242
10.8.5 Clock Operation During Reset . . . . . . . . . . . . . . . . . . . . . .243
10.8.6 PLL Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243
10.8.6.1 Phase and Frequency Detector (PFD). . . . . . . . . . . . . .245
10.8.6.2 Charge Pump/Loop Filter. . . . . . . . . . . . . . . . . . . . . . . .245
10.8.6.3 Voltage Control Output (VCO) . . . . . . . . . . . . . . . . . . . .246
10.8.6.4 Multiplication Factor Divider (MFD) . . . . . . . . . . . . . . . .246
10.9 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246
10.10 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246
Section 11. Ports Module
11.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247
11.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248
11.3 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .249
11.4 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .249
11.4.1 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .250
11.4.2 Register Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . .251
11.4.2.1 Port Output Data Registers . . . . . . . . . . . . . . . . . . . . . .251
11.4.2.2 Port Data Direction Registers. . . . . . . . . . . . . . . . . . . . .252
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Table of Contents
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Table of Contents 15
11.4.2.3 Port Pin Data/Set Data Registers . . . . . . . . . . . . . . . . .253
11.4.2.4 Port Clear Output Data Registers . . . . . . . . . . . . . . . . .254
11.4.2.5 Port C/D Pin Assignment Register. . . . . . . . . . . . . . . . .255
11.4.2.6 Port E Pin Assignment Register. . . . . . . . . . . . . . . . . . .256
11.5 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257
11.5.1 Pin Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258
11.5.2 Port Digital I/O Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . .259
11.6 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .259
Section 12. E dge Port Module (EPORT)
12.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .261
12.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .261
12.3 Low-Power Mode Operation. . . . . . . . . . . . . . . . . . . . . . . . . .262
12.3.1 Wait and Doze Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . .262
12.3.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263
12.4 Interrupt/General -Purpose I/O Pin Descriptions. . . . . . . . . . .263
12.5 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .263
12.5.1 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263
12.5.2 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .264
12.5.2.1 EPORT Pin Assignment Register . . . . . . . . . . . . . . . . .264
12.5.2.2 EPORT Data Direction Register. . . . . . . . . . . . . . . . . . .266
12.5.2.3 Edge Port Interrupt Enable Register . . . . . . . . . . . . . . .267
12.5.2.4 Edge Port Data Register . . . . . . . . . . . . . . . . . . . . . . . .268
12.5.2.5 Edge Port Pin Data Register . . . . . . . . . . . . . . . . . . . . .268
12.5.2.6 Edge Port Flag Register. . . . . . . . . . . . . . . . . . . . . . . . .269
Section 13 . Watchdog Timer Module
13.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271
13.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271
13.3 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272
13.3.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272
13.3.2 Doze Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272
13.3.3 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272
13.3.4 Debug Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
16 Table of Contents M OTOROLA
Table of Contents
13.4 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273
13.5 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273
13.6 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .274
13.6.1 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .274
13.6.2 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .274
13.6.2.1 Watchdog Control Register . . . . . . . . . . . . . . . . . . . . . .275
13.6.2.2 Watchdog Modulus Register . . . . . . . . . . . . . . . . . . . . .277
13.6.2.3 Watchdog Count Register . . . . . . . . . . . . . . . . . . . . . . .278
13.6.2.4 Watchdog Servi ce Register . . . . . . . . . . . . . . . . . . . . . .279
Section 14. Programmable Interrupt Timer Modules
(PIT1 and PIT2)
14.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .281
14.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282
14.3 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282
14.4 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
14.4.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
14.4.2 Doze Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
14.4.3 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
14.4.4 Debug Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
14.5 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
14.6 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .284
14.6.1 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284
14.6.2 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284
14.6.2.1 PIT Control and Status Register . . . . . . . . . . . . . . . . . .285
14.6.2.2 PIT Modulus Register . . . . . . . . . . . . . . . . . . . . . . . . . .288
14.6.2.3 PIT Count Register . . . . . . . . . . . . . . . . . . . . . . . . . . . .289
14.7 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .290
14.7.1 Set-and-Forget Timer Operation . . . . . . . . . . . . . . . . . . . .290
14.7.2 Free-Running Timer Operation . . . . . . . . . . . . . . . . . . . . .291
14.7.3 Timeout Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . .291
14.8 Interrupt Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .292
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Table of Contents
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Table of Contents 17
Section 15. Timer Modules (TIM1 and TIM2 )
15.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .293
15.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .295
15.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .295
15.4 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296
15.5 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297
15.5.1 Supervisor and User Modes. . . . . . . . . . . . . . . . . . . . . . . .297
15.5.2 Run Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297
15.5.3 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297
15.5.4 Wait, Doze, and Debug Modes . . . . . . . . . . . . . . . . . . . . .297
15.5.5 Test Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297
15.6 Signal Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298
15.6.1 ICOC[2:0] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298
15.6.2 ICOC3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298
15.7 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .298
15.7.1 Timer Input Capture/Output Compare
Select Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300
15.7.2 Timer Compare Force Register . . . . . . . . . . . . . . . . . . . . .301
15.7.3 Timer Output Compare 3 Mask Register . . . . . . . . . . . . . .302
15.7.4 Timer Output Compare 3 Data Register. . . . . . . . . . . . . . .303
15.7.5 Timer Counter Registers . . . . . . . . . . . . . . . . . . . . . . . . . .304
15.7.6 Timer System Control Register 1. . . . . . . . . . . . . . . . . . . .305
15.7.7 Timer Toggle-On-Overflow Register . . . . . . . . . . . . . . . . .306
15.7.8 Timer Control Register 1 . . . . . . . . . . . . . . . . . . . . . . . . . .307
15.7.9 Timer Control Register 2 . . . . . . . . . . . . . . . . . . . . . . . . . .308
15.7.10 Timer Interrupt Enable Register. . . . . . . . . . . . . . . . . . . . .309
15.7.11 Timer System Control Regi ster 2. . . . . . . . . . . . . . . . . . . .310
15.7.12 Timer Flag Register 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . .312
15.7.13 Timer Flag Register 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . .313
15.7.14 Timer Channel Registers . . . . . . . . . . . . . . . . . . . . . . . . . .314
15.7.15 Pulse Accumulator Control Register . . . . . . . . . . . . . . . . .315
15.7.16 Pulse Accumulator Flag Register. . . . . . . . . . . . . . . . . . . .317
15.7.17 Pulse Accumulator Counter Registers . . . . . . . . . . . . . . . .318
15.7.18 Timer Port Data Register . . . . . . . . . . . . . . . . . . . . . . . . . .319
15.7.19 Timer P ort Data Direction Register . . . . . . . . . . . . . . . . . .320
15.7.20 Timer Test Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
18 Table of Contents M OTOROLA
Table of Contents
15.8 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321
15.8.1 Prescaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321
15.8.2 Input Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321
15.8.3 Output Compare. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .322
15.8.4 Pulse Accumulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323
15.8.4.1 Event Counter Mode . . . . . . . . . . . . . . . . . . . . . . . . . . .323
15.8.4.2 Gated Time Accumulation Mode . . . . . . . . . . . . . . . . . .324
15.8.5 General-Purpose I/O Ports. . . . . . . . . . . . . . . . . . . . . . . . .325
15.9 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326
15.10 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326
15.10.1 Timer Channel Interrupts (CxF) . . . . . . . . . . . . . . . . . . . . .326
15.10.2 Pulse Accumulator Overfl ow (PAOVF). . . . . . . . . . . . . . . .327
15.10.3 Pulse Accumulator Input (PAIF). . . . . . . . . . . . . . . . . . . . .327
15.10.4 Timer Overflow (TOF) . . . . . . . . . . . . . . . . . . . . . . . . . . . .327
Section 16. Serial Co mmunications Interface Modules
(SC I1 and SCI2)
16.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .329
16.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .330
16.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .331
16.4 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .332
16.5 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .333
16.5.1 Doze Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .333
16.5.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .333
16.6 Signal Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334
16.6.1 RXD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334
16.6.2 TXD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334
16.7 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .334
16.7.1 SCI Baud Rate Registers. . . . . . . . . . . . . . . . . . . . . . . . . .336
16.7.2 SCI Control Register 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . .337
16.7.3 SCI Control Register 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . .340
16.7.4 SCI Status Register 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . .342
16.7.5 SCI Status Register 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . .344
16.7.6 SCI Data R egisters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .345
16.7.7 SCI Pullup and Reduced Drive Register . . . . . . . . . . . . . .346
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Table of Contents
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Table of Contents 19
16.7.8 SCI Port Data Register. . . . . . . . . . . . . . . . . . . . . . . . . . . .347
16.7.9 SCI Data D irection Register. . . . . . . . . . . . . . . . . . . . . . . .348
16.8 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349
16.9 Data Form at . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349
16.10 Baud Rate Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .350
16.11 Transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351
16.11.1 Frame Length. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352
16.11.2 Transmitting a Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353
16.11.3 Break Frames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355
16.11.4 Idle Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355
16.12 Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356
16.12.1 Frame Length. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356
16.12.2 Receiving a Frame. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356
16.12.3 Data Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .357
16.12.4 Framing Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .362
16.12.5 Baud Rate Tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . . . .362
16.12.5.1 Slow Data Tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . .363
16.12.5.2 Fast Data Tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . .364
16.12.6 Receiver Wakeup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .365
16.12.6.1 Idle Input Line Wakeup (WAKE = 0) . . . . . . . . . . . . . . .365
16.12.6.2 Address Mark Wakeup (WAKE = 1). . . . . . . . . . . . . . . .365
16.13 Single-Wire Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .366
16.14 Loop Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .367
16.15 I/O Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .368
16.16 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369
16.17 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369
16.17.1 Transmit Data Register Empty. . . . . . . . . . . . . . . . . . . . . .369
16.17.2 Transmission Complete . . . . . . . . . . . . . . . . . . . . . . . . . . .369
16.17.3 Receive Data Register Full. . . . . . . . . . . . . . . . . . . . . . . . .370
16.17.4 Idle Receiver Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370
16.17.5 Overrun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
20 Table of Contents M OTOROLA
Table of Contents
Sect ion 17. Se rial Peripheral In terface Module (SPI)
17.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371
17.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .372
17.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .372
17.4 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373
17.5 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373
17.6 Signal Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374
17.6.1 MISO (Master In/Slave Out). . . . . . . . . . . . . . . . . . . . . . . .374
17.6.2 MOSI (Master Out/Slave In). . . . . . . . . . . . . . . . . . . . . . . .374
17.6.3 SCK (Serial Clock) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
17.6.4 SS (Slave Select). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
17.7 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .375
17.7.1 SPI Control Register 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . .376
17.7.2 SPI Control Register 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . .378
17.7.3 SPI Baud Rate Register. . . . . . . . . . . . . . . . . . . . . . . . . . .379
17.7.4 SPI Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .381
17.7.5 SPI Data Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .382
17.7.6 SPI Pull up and Reduced Drive Register . . . . . . . . . . . . . .383
17.7.7 SPI Port Data Register. . . . . . . . . . . . . . . . . . . . . . . . . . . .384
17.7.8 SPI Port Data Direction Register . . . . . . . . . . . . . . . . . . . .385
17.8 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .386
17.8.1 Master Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .387
17.8.2 Slave Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .387
17.8.3 Transmission Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . .388
17.8.3.1 Transfer Format When CPHA = 1 . . . . . . . . . . . . . . . . .388
17.8.3.2 Transfer Format When CPHA = 0 . . . . . . . . . . . . . . . . .390
17.8.4 SPI Baud Rate Generation. . . . . . . . . . . . . . . . . . . . . . . . .393
17.8.5 Slave-Select Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .393
17.8.6 Bidirectional Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .394
17.8.7 Error Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .395
17.8.7.1 Write Collision Error. . . . . . . . . . . . . . . . . . . . . . . . . . . .395
17.8.7.2 Mode Fault Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .395
17.8.8 Low-Power Mode Options . . . . . . . . . . . . . . . . . . . . . . . . .396
17.8.8.1 Run Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .396
17.8.8.2 Doze Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .396
17.8.8.3 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .396
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Table of Contents
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Table of Contents 21
17.9 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .397
17.10 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .397
17.10.1 SPI Interrupt Flag (SPIF) . . . . . . . . . . . . . . . . . . . . . . . . . .397
17.10.2 Mode Fault (MODF) Fl ag . . . . . . . . . . . . . . . . . . . . . . . . . .397
Section 18. Queued Analog-to-Digital
Converter (QADC)
18.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .399
18.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .401
18.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .402
18.4 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .403
18.5 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .404
18.5.1 Debug Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .404
18.5.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .405
18.6 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .405
18.6.1 Port QA Pin Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . .406
18.6.1.1 Port QA Analog Input Pins. . . . . . . . . . . . . . . . . . . . . . .406
18.6.1.2 Port QA Digital Input/Output Pins . . . . . . . . . . . . . . . . .407
18.6.2 Port QB Pin Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . .407
18.6.2.1 Port QB Analog Input Pins. . . . . . . . . . . . . . . . . . . . . . .407
18.6.2.2 Port QB Digital Input Pins . . . . . . . . . . . . . . . . . . . . . . .407
18.6.3 External Trigger Input Pins. . . . . . . . . . . . . . . . . . . . . . . . .408
18.6.4 Multiplexed Address Output Pins. . . . . . . . . . . . . . . . . . . .408
18.6.5 Multiplexed Analog Input Pins . . . . . . . . . . . . . . . . . . . . . .409
18.6.6 Voltage Reference Pins . . . . . . . . . . . . . . . . . . . . . . . . . . .409
18.6.7 Dedicated Analog Supply Pins. . . . . . . . . . . . . . . . . . . . . .409
18.7 Memory Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .409
18.8 Register Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .411
18.8.1 QADC Module Configuration Register . . . . . . . . . . . . . . . .411
18.8.2 QADC Test Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .412
18.8.3 Port Data Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .412
18.8.4 Port QA Data Direction Register . . . . . . . . . . . . . . . . . . . .414
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
22 Table of Contents M OTOROLA
Table of Contents
18.8.5 Control Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .416
18.8.5.1 Control Register 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .416
18.8.5.2 Control Register 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .419
18.8.5.3 QADC Control Register 2. . . . . . . . . . . . . . . . . . . . . . . .422
18.8.6 Status Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .427
18.8.6.1 QADC Status Register 0 . . . . . . . . . . . . . . . . . . . . . . . .427
18.8.6.2 QADC Status Register 1 . . . . . . . . . . . . . . . . . . . . . . . .436
18.8.7 Conversion Command Word Table . . . . . . . . . . . . . . . . . .437
18.8.8 Result Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .441
18.8.8.1 Right-Justified Unsigned Result Register. . . . . . . . . . . .441
18.8.8.2 Left-Justified Signed Result Register. . . . . . . . . . . . . . .442
18.8.8.3 Left-Justified Unsigned Result Register. . . . . . . . . . . . .442
18.9 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .443
18.9.1 QADC Bus Accessing . . . . . . . . . . . . . . . . . . . . . . . . . . . .443
18.9.2 External Multiplexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . .443
18.9.2.1 External Multiplexing Operation. . . . . . . . . . . . . . . . . . .443
18.9.2.2 Module Version Options. . . . . . . . . . . . . . . . . . . . . . . . .444
18.9.2.3 External Multiplexed Address Configuration . . . . . . . . .446
18.9.3 Analog Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .446
18.9.3.1 Analog-to-Digital Converter Operation. . . . . . . . . . . . . .446
18.9.3.2 Conversion Cycle Times . . . . . . . . . . . . . . . . . . . . . . . .446
18.9.3.3 Channel Decode and Multiplexer. . . . . . . . . . . . . . . . . .448
18.9.3.4 Sample Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .448
18.9.3.5 Digital-to-Analog Converter (DAC) Array. . . . . . . . . . . .449
18.9.3.6 Comparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .449
18.9.3.7 Bias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .449
18.9.3.8 Successive-Approximation Register . . . . . . . . . . . . . . .449
18.9.3.9 State Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .450
18.10 Digital Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .450
18.10.1 Queue Priority Timing Examples. . . . . . . . . . . . . . . . . . . .450
18.10.1.1 Queue Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .451
18.10.1.2 Queue Priority Schemes . . . . . . . . . . . . . . . . . . . . . . . .453
18.10.2 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .465
18.10.3 Scan Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .466
18.10.4 Disabled Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .467
18.10.5 Reserved Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .467
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Table of Contents
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Table of Contents 23
18.10.6 Single-Scan Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .467
18.10.6.1 Software-Initiated Single-Scan Mode. . . . . . . . . . . . . . .468
18.10.6.2 External Trigger Single-Scan Mode. . . . . . . . . . . . . . . .469
18.10.6.3 External Gated Single-Scan Mode. . . . . . . . . . . . . . . . .470
18.10.6.4 Interval Timer Single-Scan Mode. . . . . . . . . . . . . . . . . .470
18.10.7 Continuous-Scan Modes . . . . . . . . . . . . . . . . . . . . . . . . . .472
18.10.7.1 Software-Initiated Continuous-Scan Mode. . . . . . . . . . .473
18.10.7.2 External Trigger Continuous-Scan Mode. . . . . . . . . . . .474
18.10.7.3 External Gated Continuous-Scan Mode . . . . . . . . . . . .474
18.10.7.4 Periodic Timer Continuous-Scan Mode . . . . . . . . . . . . .475
18.10.8 QADC Clock (QCLK) Generation. . . . . . . . . . . . . . . . . . . .476
18.10.9 Periodic/Interval Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . .480
18.10.10 Conversion Command Word Table . . . . . . . . . . . . . . . . . .481
18.10.11 Result Word Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .485
18.11 Pin Connection Considerations . . . . . . . . . . . . . . . . . . . . . . .486
18.11.1 Analog Reference Pins. . . . . . . . . . . . . . . . . . . . . . . . . . . .486
18.11.2 Analog P ower Pins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .486
18.11.3 Conversion Timing Schemes . . . . . . . . . . . . . . . . . . . . . . .488
18.11.4 Analog Supply Filtering and Grounding . . . . . . . . . . . . . . .490
18.11.5 Accommodating Positive/Negative Stress Conditions . . . .494
18.11.6 Analog Input Considerations . . . . . . . . . . . . . . . . . . . . . . .495
18.11.7 Analog Input Pins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .497
18.11.7.1 Settling Time for the External Circuit . . . . . . . . . . . . . . .498
18.11.7.2 Error Resulting from Leakage . . . . . . . . . . . . . . . . . . . .499
18.12 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .500
18.12.1 Interrupt Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .500
18.12.2 Interrupt Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .501
Section 19. External Bus Interface Module (EBI)
19.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .503
19.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .504
19.3 Signal Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .505
19.3.1 Data Bus (D[31:0]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .506
19.3.2 Show Cycle Strobe (SHS) . . . . . . . . . . . . . . . . . . . . . . . . .506
19.3.3 Transfer Acknowledge (TA) . . . . . . . . . . . . . . . . . . . . . . . .506
19.3.4 Transfer Error Acknowledge (TEA) . . . . . . . . . . . . . . . . . .506
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
24 Table of Contents M OTOROLA
Table of Contents
19.3.5 Emulation Mode Chip Selects (CSE[1:0]) . . . . . . . . . . . . .506
19.3.6 Transfer Code (TC[2:0]). . . . . . . . . . . . . . . . . . . . . . . . . . .506
19.3.7 Read/Write (R/W). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .507
19.3.8 Address Bus (A[22:0]) . . . . . . . . . . . . . . . . . . . . . . . . . . . .507
19.3.9 Enabl e Byte (EB[3:0]). . . . . . . . . . . . . . . . . . . . . . . . . . . . .507
19.3.10 Chip Sele cts (CS[3:0]) . . . . . . . . . . . . . . . . . . . . . . . . . . . .507
19.3.11 Output Enable (OE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .507
19.3.12 Transfer Size (TSIZ[1:0]) . . . . . . . . . . . . . . . . . . . . . . . . . .507
19.3.13 Processor Status (PSTAT[3:0]) . . . . . . . . . . . . . . . . . . . . .507
19.4 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .508
19.5 Operand Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .508
19.6 Enabl e Byte Pins (EB[3:0]). . . . . . . . . . . . . . . . . . . . . . . . . . .510
19.7 Bus Master Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .510
19.7.1 Read Cycles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .511
19.7.1.1 State 1 (X1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .512
19.7.1.2 Optional Wait States (X2W). . . . . . . . . . . . . . . . . . . . . .512
19.7.1.3 State 2 (X2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .512
19.7.2 Write Cycles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .513
19.7.2.1 State 1 (X1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .514
19.7.2.2 Optional Wait States (X2W). . . . . . . . . . . . . . . . . . . . . .514
19.7.2.3 State 2 (X2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .514
19.8 Bus Exception Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .516
19.8.1 Transfer Error Termination. . . . . . . . . . . . . . . . . . . . . . . . .516
19.8.2 Transfer Abort Termination . . . . . . . . . . . . . . . . . . . . . . . .516
19.9 Emulation Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .516
19.9.1 Emulation Chip-Selects (CSE[1:0]) . . . . . . . . . . . . . . . . . .516
19.9.2 Internal Data Transfer Display (Show Cycles) . . . . . . . . . .517
19.9.3 Show Strobe (SHS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .518
19.10 Bus Monitor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .519
19.11 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .520
Section 20. Chip Select Module
20.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .521
20.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .521
20.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .522
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Table of Contents
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Table of Contents 25
20.4 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .523
20.5 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .524
20.6 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .524
20.6.1 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .524
20.6.2 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .525
20.7 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .530
20.8 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .531
Section 21. JTAG Test Access Port and OnCE
21.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .533
21.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .535
21.3 Top-Level Test Access Port (TAP). . . . . . . . . . . . . . . . . . . . .537
21.3.1 Test Clock (T CLK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .538
21.3.2 Test Mode Select (TMS) . . . . . . . . . . . . . . . . . . . . . . . . . .538
21.3.3 Test Data Input (TDI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .538
21.3.4 Test Data Output (TDO). . . . . . . . . . . . . . . . . . . . . . . . . . .538
21.3.5 Test Reset (TRST). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .538
21.3.6 Debug Event (DE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .538
21.4 Top-Level TAP Controller. . . . . . . . . . . . . . . . . . . . . . . . . . . .540
21.5 Instruction Shift Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . .541
21.5.1 EXTEST Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .541
21.5.2 IDCODE Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .542
21.5.3 SAMPLE/P RELOAD Instruction. . . . . . . . . . . . . . . . . . . . .543
21.5.4 ENABLE_MCU _ONCE Instruction. . . . . . . . . . . . . . . . . . .543
21.5.5 HIGHZ Instruction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .544
21.5.6 CLAMP Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .544
21.5.7 BYPASS Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .544
21.6 IDCODE Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .545
21.7 Bypass Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .546
21.8 Boundary SCAN Register. . . . . . . . . . . . . . . . . . . . . . . . . . . .546
21.9 Restrictions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .546
21.10 Non-Scan Chain Operation. . . . . . . . . . . . . . . . . . . . . . . . . . .547
21.11 Boundary Scan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .547
21.12 Low-Level TAP (OnCE) Module . . . . . . . . . . . . . . . . . . . . . . .553
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
26 Table of Contents M OTOROLA
Table of Contents
21.13 Signal Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .555
21.13.1 Debug Serial Input (TDI) . . . . . . . . . . . . . . . . . . . . . . . . . .555
21.13.2 Debug Serial Clock (TCLK) . . . . . . . . . . . . . . . . . . . . . . . .555
21.13.3 Debug Serial Output (TDO) . . . . . . . . . . . . . . . . . . . . . . . .555
21.13.4 Debug Mode Select (TMS). . . . . . . . . . . . . . . . . . . . . . . . .556
21.13.5 Test Reset (TRST). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556
21.13.6 Debug Event (DE ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556
21.14 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556
21.14.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .557
21.14.2 OnCE Controller and Serial Interface. . . . . . . . . . . . . . . . .558
21.14.3 OnCE Interface Signals . . . . . . . . . . . . . . . . . . . . . . . . . . .559
21.14.3 . 1 In terna l Debug Request Input (IDR) . . . . . . . . . . . . . . .559
21.14.3.2 CPU Debug Request (DBGRQ). . . . . . . . . . . . . . . . . . .560
21.14.3.3 CPU Debug Acknowledge (DBGACK). . . . . . . . . . . . . .560
21.14.3.4 CPU B reakpoint Request (BRKRQ). . . . . . . . . . . . . . . .560
21.14.3.5 CPU A ddress, Attributes (ADDR, ATTR). . . . . . . . . . . .560
21.14.3.6 CPU Status (PSTAT). . . . . . . . . . . . . . . . . . . . . . . . . . .560
21.14.3.7 OnCE Debug Output (DEBUG) . . . . . . . . . . . . . . . . . . .560
21.14.4 OnCE Controller Registers. . . . . . . . . . . . . . . . . . . . . . . . .561
21.14.4.1 OnCE Command Register . . . . . . . . . . . . . . . . . . . . . . .561
21.14.4.2 OnCE Control Register . . . . . . . . . . . . . . . . . . . . . . . . .564
21.14.4.3 OnCE Status Register . . . . . . . . . . . . . . . . . . . . . . . . . .568
21.14.5 OnCE Decoder (ODEC). . . . . . . . . . . . . . . . . . . . . . . . . . .570
21.14.6 Memory Breakpoint Logic. . . . . . . . . . . . . . . . . . . . . . . . . .570
21.14.6.1 Memory Address Latch (MAL). . . . . . . . . . . . . . . . . . . .571
21.14.6.2 Breakpoint Address Base Registers . . . . . . . . . . . . . . .571
21.14.7 Breakpoint Address Mask Registers . . . . . . . . . . . . . . . . .571
21.14.7.1 Breakpoint Address Comparators . . . . . . . . . . . . . . . . .572
21.14.7.2 Memory Breakpoint Counters . . . . . . . . . . . . . . . . . . . .572
21.14.8 OnCE Trace Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .572
21.14.8.1 OnCE Trace Counter. . . . . . . . . . . . . . . . . . . . . . . . . . .573
21.14.8.2 Trace Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .574
21.14.9 Methods of Entering Debug Mode . . . . . . . . . . . . . . . . . . .574
21.14.9.1 Debug Request During RESET . . . . . . . . . . . . . . . . . . .574
21.14.9.2 Debug Request During Normal Activity . . . . . . . . . . . . .575
21.14.9.3 Debug Request During Stop, Doze, or Wait Mode . . . .575
21.14.9.4 Software Request During Normal Activity . . . . . . . . . . .575
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Table of Contents
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Table of Contents 27
21.14.10 Enabling OnCE Trace Mode . . . . . . . . . . . . . . . . . . . . . . .575
21.14.11 Enabling OnCE Memory Breakpoints. . . . . . . . . . . . . . . . .576
21.14.12 Pipeline Information and Write-Back Bus Register . . . . . .576
21.14.12.1 Program Counter Register. . . . . . . . . . . . . . . . . . . . . . .577
21.14.12.2 Instruction Register . . . . . . . . . . . . . . . . . . . . . . . . . . . .577
21.14.12.3 Control State Register . . . . . . . . . . . . . . . . . . . . . . . . . .577
21.14.12.4 Writeback Bus Register . . . . . . . . . . . . . . . . . . . . . . . . .579
21.14.12.5 Processor Status Register. . . . . . . . . . . . . . . . . . . . . . .579
21.14.13 Instruction Address FIFO Buffer (PC FIFO). . . . . . . . . . . .580
21.14.14 Reserved Test Control Registers. . . . . . . . . . . . . . . . . . . .581
21.14.15 Serial Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .581
21.14.16 OnCE Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .582
21.14.17 Target Site Debug System Requirements . . . . . . . . . . . . .582
21.14.18 Interface Connector for JTAG/OnCE Serial Port . . . . . . . .582
Section 22. Electrical Specifications
22.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .585
22.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .585
22.3 Absolute Maximum Ratings . . . . . . . . . . . . . . . . . . . . . . . . . .586
22.4 Thermal Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . .587
22.5 Power Dissipation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .587
22.6 Electrostatic Discharge (ESD) Protection. . . . . . . . . . . . . . . .587
22.7 DC Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . .588
22.8 PLL Electrical Specifications. . . . . . . . . . . . . . . . . . . . . . . . . .590
22.9 QADC Electrical Characteristics. . . . . . . . . . . . . . . . . . . . . . .591
22.10 FLASH Memory Characteristics . . . . . . . . . . . . . . . . . . . . . . .594
22.11 External Interface T iming Characteristics. . . . . . . . . . . . . . . .596
22.12 Reset and Configuration Override Timing . . . . . . . . . . . . . . .601
22.13 SPI Timi ng Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . .602
22.14 OnCE, JTAG, and Boundary Scan Timing . . . . . . . . . . . . . . .605
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
28 Table of Contents M OTOROLA
Table of Contents
Section 23. Mechanical Specifications
23.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .609
23.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .609
23.3 Bond Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .610
23.4 Package Information for the 144-Pin LQFP . . . . . . . . . . . . . .611
23.5 Package Information for the 100-Pin LQFP . . . . . . . . . . . . . .611
23.6 144-Pin LQFP Mechanical Drawing . . . . . . . . . . . . . . . . . . . .612
23.7 100-Pin LQFP Mechanical Drawing . . . . . . . . . . . . . . . . . . . .613
Section 24. Ordering Information
24.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .615
24.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .615
24.3 MC Order Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .615
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA List of Figures 29
Technical Data MMC2107
List of Figures
Figure Title Page
1-1 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
2-1 Address Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
2-2 Register Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
3-1 Chip C onfiguration Module Block Diagram . . . . . . . . . . . . .92
3-2 Chip Configuratio n Register (CCR) . . . . . . . . . . . . . . . . . . .94
3-3 Reset Configuration Register (RCON) . . . . . . . . . . . . . . . . .97
3-4 Chip Identification Register (CIR). . . . . . . . . . . . . . . . . . . . .99
3-5 Chip Te st Register (CTR). . . . . . . . . . . . . . . . . . . . . . . . . .100
4-1 144-Pin LQFP Assignments. . . . . . . . . . . . . . . . . . . . . . . .115
4-2 100-Pin LQFP Assignments. . . . . . . . . . . . . . . . . . . . . . . .116
5-1 Reset Controller Block Diagram. . . . . . . . . . . . . . . . . . . . .131
5-2 Reset Control Reg ister (RCR) . . . . . . . . . . . . . . . . . . . . . .133
5-3 Reset Status Register (RSR) . . . . . . . . . . . . . . . . . . . . . . .134
5-4 Reset T e st Register (RTR). . . . . . . . . . . . . . . . . . . . . . . . .135
5-5 Reset Control Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139
6-1 MCORE Processor Block Diagram. . . . . . . . . . . . . . . . . .145
6-2 Programming Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147
6-3 Data Organization in Memory. . . . . . . . . . . . . . . . . . . . . . .149
6-4 Data Organization in Registers . . . . . . . . . . . . . . . . . . . . .149
7-1 Interrupt Controller Block Diagram. . . . . . . . . . . . . . . . . . .155
7-2 Interrupt Control Register (ICR) . . . . . . . . . . . . . . . . . . . . .157
7-3 Interrupt Status Register (ISR). . . . . . . . . . . . . . . . . . . . . .159
7-4 Interrupt Force Register High (IFRH). . . . . . . . . . . . . . . . .160
7-5 Interrupt Force Register Low (IFRL). . . . . . . . . . . . . . . . . .161
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
30 List of Figures MOTOROLA
Li st of Figu r e s
Figure Title Page
7-6 Interrupt Pending Register (IPR) . . . . . . . . . . . . . . . . . . . .162
7-7 Normal Interrupt Enable Register (NIER). . . . . . . . . . . . . .163
7-8 Normal Interrupt Pending Register (NIPR). . . . . . . . . . . . .164
7-9 Fast Interrupt Enable Register (FIER) . . . . . . . . . . . . . . . .165
7-10 Fast Interrupt Pending Register (FIPR) . . . . . . . . . . . . . . .166
7-11 Priority Level Select Registers (PLSR0PLSR39) . . . . . . .167
9-1 CMFR 128-Kbyte Block Diagram. . . . . . . . . . . . . . . . . . . .183
9-2 CMF R Array and Control Register Addressing . . . . . . . . .186
9-3 CMFR Module Configuration Register (CMFRMCR ) . . . . .188
9-4 CMFR Module Test Register (CMFRMTR) . . . . . . . . . . . .193
9-5 CMFR High-Voltage Control Register (CMFRCTL) . . . . . .196
9-6 Pulse Status Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .197
9-7 FLASH Programming Flowchart. . . . . . . . . . . . . . . . . . . . .209
9-8 Program State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . .210
9-9 FLASH Erasi ng Flowchart . . . . . . . . . . . . . . . . . . . . . . . . .216
9-10 Erase State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217
10-1 Clock Module Block Diagram. . . . . . . . . . . . . . . . . . . . . . .224
10-2 Synthesizer Control Register (SYNCR) . . . . . . . . . . . . . . .227
10-3 Synthesizer Status Register (SYNSR) . . . . . . . . . . . . . . . .230
10-4 Synthesizer Test Register (SYNTR). . . . . . . . . . . . . . . . . .233
10-5 Synthesizer Test Register 2 (SYNTR2) . . . . . . . . . . . . . . .234
10-6 Lock Detect Sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . .237
10-7 PLL Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .244
10-8 Crystal Oscillator Exam p le . . . . . . . . . . . . . . . . . . . . . . . . .244
11-1 Ports Module Block Diagram . . . . . . . . . . . . . . . . . . . . . . .248
11-2 Port Output Data Registers (PORTx). . . . . . . . . . . . . . . . .251
11-3 Port Data Direction Regi sters (DDRx) . . . . . . . . . . . . . . . .252
11-4 Port Pin Data/Set Data Registers (PORTxP/SETx) . . . . . .253
11-5 Port Clear Output Data Registers (CLRx) . . . . . . . . . . . . .254
11-6 Port C, D, I7, and I6 Pin Assignment
Register (PCDPAR). . . . . . . . . . . . . . . . . . . . . . . . . . . .255
11-7 Port E Pin Assignment Register (PEPAR) . . . . . . . . . . . . .256
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
List of Figures
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA List of Figures 31
Figure Title Page
11-8 Digital Input Timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .259
11-9 Digital Output Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . .259
12-1 EPORT Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . .262
12-2 EPORT Pin Assignm ent Regi ster (EPPAR). . . . . . . . . . . .264
12-3 EPORT Data Direction Register (EPDDR). . . . . . . . . . . . .266
12-4 EPORT Port Interrupt Enable Register (EPIER) . . . . . . . .267
12-5 EPORT Port Data Register (E PDR). . . . . . . . . . . . . . . . . .268
12-6 EPORT Port Pin Data Register (EPPDR) . . . . . . . . . . . . .268
12-7 EPORT Port Flag Register (EPFR) . . . . . . . . . . . . . . . . . .269
13-1 Watchdog Timer Block Diagram. . . . . . . . . . . . . . . . . . . . .273
13-2 Watchdog Control Register (WCR) . . . . . . . . . . . . . . . . . .275
13-3 Watchdog Modulus Register (WMR) . . . . . . . . . . . . . . . . .277
13-4 Watchdog Count Register (WCNTR) . . . . . . . . . . . . . . . . .278
13-5 Watchdog Service Register (WSR) . . . . . . . . . . . . . . . . . .279
14-1 PIT Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282
14-2 PIT Control and Status Register (PCSR). . . . . . . . . . . . . .285
14-3 PIT Modulus Register (PMR) . . . . . . . . . . . . . . . . . . . . . . .288
14-4 PIT Count Register (PCNTR). . . . . . . . . . . . . . . . . . . . . . .289
14-5 Counter Reloading from the Modulus Latch. . . . . . . . . . . .290
14-6 Counter in Free-Running Mode . . . . . . . . . . . . . . . . . . . . .291
15-1 Timer Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296
15-2 Timer Input Capture/Output Compare
Select Register (TIMIOS) . . . . . . . . . . . . . . . . . . . . . . .300
15-3 Timer Compare Force Register (TIMCFORC) . . . . . . . . . .301
15-4 Timer Output Compare 3 Mask Register (TIMOC3M) . . . .302
15-5 Timer Output Compare 3 Data Register (TIMOC3D). . . . .303
15-6 Timer Counter Register High (TIMCNTH) . . . . . . . . . . . . .304
15-7 Timer Counter Register Low (TIMCNTL) . . . . . . . . . . . . . .304
15-8 Timer System Control Register (TIMSCR1). . . . . . . . . . . .305
15-9 Fast Clear Flag Logic. . . . . . . . . . . . . . . . . . . . . . . . . . . . .306
15-10 Timer Toggle-On-Overflow Register (TIMTOV) . . . . . . . . .306
15-11 Timer Control Register 1 (TIMCTL1) . . . . . . . . . . . . . . . . .307
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
32 List of Figures MOTOROLA
Li st of Figu r e s
Figure Title Page
15-12 Timer Control Register 2 (TIMCTL2) . . . . . . . . . . . . . . . . .308
15-13 Timer Interr upt Enable Register (TIMIE) . . . . . . . . . . . . . .309
15-14 Timer System Control Register 2 (TIMSCR2) . . . . . . . . . .310
15-15 Timer Flag Register 1 (TIMFLG1) . . . . . . . . . . . . . . . . . . .312
15-16 Timer Flag Register 2 (TIMFLG2) . . . . . . . . . . . . . . . . . . .313
15-17 Timer Channel [0:3] Register High (TIMCxH) . . . . . . . . . .314
15-18 Timer Channel [0:3] Register Low (TIMCxL) . . . . . . . . . . .314
15-19 Pulse Accumulator Control Register (TIMPACTL). . . . . . .315
15-20 Pulse Accumulator Flag Register (TIMPAFLG) . . . . . . . . .317
15-21 Pulse Accumulator Counter Register High
(TIMPACNTH). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .318
15-22 Pulse Accumulator Counter Register Low
(TIMPACNTL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .318
15-23 Timer Port Data Register (TIMPORT) . . . . . . . . . . . . . . . .319
15-24 Timer Port Data Direction Register (TIMDDR). . . . . . . . . .32 0
15-25 Timer Test Register (TIMTST) . . . . . . . . . . . . . . . . . . . . . .321
15-26 Channel 3 Output Compare/Pulse Accumulator Logic. . . .324
16-1 SCI Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .332
16-2 SCI Baud Rate Register High (SCIBDH) . . . . . . . . . . . . . .336
16-3 SCI Baud Rate Register Low (SCIBDL). . . . . . . . . . . . . . .336
16-4 SCI Control Register 1 (SCICR1). . . . . . . . . . . . . . . . . . . .337
16-5 SCI Control Register 2 (SCICR2). . . . . . . . . . . . . . . . . . . .340
16-6 SCI Status Register 1 (SCISR1) . . . . . . . . . . . . . . . . . . . .342
16-7 SCI Status Register 2 (SCISR2) . . . . . . . . . . . . . . . . . . . .344
16-8 SCI Data Register High (SCIDRH). . . . . . . . . . . . . . . . . . .345
16-9 SCI Data Register Low (SCIDRL) . . . . . . . . . . . . . . . . . . .345
16-10 SCI Pullup and Reduced Drive Register (SCIPURD). . . . .346
16-11 SCI Port Data Register (SCIPORT) . . . . . . . . . . . . . . . . . .347
16-12 SCI Data Direction Register (SCIDDR) . . . . . . . . . . . . . . .348
16-13 SCI Data Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349
16-14 Transmitter Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . .351
16-15 SCI Receiver Block Diagram . . . . . . . . . . . . . . . . . . . . . . .356
16-16 Receiver Data Sampling. . . . . . . . . . . . . . . . . . . . . . . . . . .357
16-17 Start Bit Sear ch Example 1 . . . . . . . . . . . . . . . . . . . . . . . .359
16-18 Start Bit Sear ch Example 2 . . . . . . . . . . . . . . . . . . . . . . . .360
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
List of Figures
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA List of Figures 33
Figure Title Page
16-19 Start Bit Sear ch Example 3 . . . . . . . . . . . . . . . . . . . . . . . .360
16-20 Start Bit Sear ch Example 4 . . . . . . . . . . . . . . . . . . . . . . . .361
16-21 Start Bit Sear ch Example 5 . . . . . . . . . . . . . . . . . . . . . . . .361
16-22 Start Bit Sear ch Example 6 . . . . . . . . . . . . . . . . . . . . . . . .362
16-23 Slow Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .363
16-24 Fast Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364
16-25 Single-Wire Operation (LOOPS = 1, RSRC = 1) . . . . . . . .366
16-26 Loop Operation (LOOPS = 1, RSRC = 0) . . . . . . . . . . . . .367
17-1 SPI Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373
17-2 SPI Control Register 1 (SPICR1). . . . . . . . . . . . . . . . . . . .376
17-3 SPI Control Register 2 (SPICR2). . . . . . . . . . . . . . . . . . . .378
17-4 SPI Baud Rate Register (SPIBR). . . . . . . . . . . . . . . . . . . .379
17-5 SPI Status Register (SPISR) . . . . . . . . . . . . . . . . . . . . . . .381
17-6 SPI Data Register (SPIDR) . . . . . . . . . . . . . . . . . . . . . . . .382
17-7 SPI Pullup and Reduced Drive Register (SPIPURD). . . . .383
17-8 SPI Port Data Register (SPIPORT) . . . . . . . . . . . . . . . . . .384
17-9 SPI Port Data Direction Register (SPIDDR). . . . . . . . . . . .385
17-10 Full-Duplex Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .386
17-11 SPI Clock Format 1 (CPHA = 1). . . . . . . . . . . . . . . . . . . . .389
17-12 SPI Clock Format 0 (CPHA = 0). . . . . . . . . . . . . . . . . . . . .391
17-13 Transmission Error Due to Master/Slave Clock Skew . . . .392
18-1 QADC Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . .403
18-2 QADC Input and Output Signals . . . . . . . . . . . . . . . . . . . .406
18-3 QADC Module Configuration Register (QADCMCR) . . . . .411
18-4 QADC Test Register (QADCTEST) . . . . . . . . . . . . . . . . . .412
18-5 QADC Port QA Data Register (PORTQA) . . . . . . . . . . . . .413
18-6 QADC Port QB Data Register (PORTQB) . . . . . . . . . . . . .413
18-7 QADC Port QA Data Direction Register (DDRQA). . . . . . .415
18-8 QADC Control Register 0 (QACR0). . . . . . . . . . . . . . . . . .416
18-9 QADC Control Register 1 (QACR1). . . . . . . . . . . . . . . . . .419
18-10 QADC Control Register 2 (QACR2). . . . . . . . . . . . . . . . . .422
18-11 QADC Status Register 0 (QASR0). . . . . . . . . . . . . . . . . . .427
18-12 Queue Status Transition. . . . . . . . . . . . . . . . . . . . . . . . . . .435
18-13 QADC Status Register 1 (QASR1). . . . . . . . . . . . . . . . . . .436
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
34 List of Figures MOTOROLA
Li st of Figu r e s
Figure Title Page
18-14 Conversion Command Word T able (CCW) . . . . . . . . . . . .437
18-15 Right-Justified Unsigned Result Register (RJURR). . . . . .441
18-16 L eft-Justified Signed Result Register (LJS RR) . . . . . . . . .442
18-17 Left-Justified Unsigned Result Register ( LJURR) . . . . . . .4 42
18-18 External Multiplexing Configuration . . . . . . . . . . . . . . . . . .445
18-19 QADC Analog Subsystem Block Diagram . . . . . . . . . . . . .447
18-20 Conversion Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .447
18-21 Bypass Mode Conversion Timing. . . . . . . . . . . . . . . . . . . .448
18-22 QADC Queue Operation with Pause . . . . . . . . . . . . . . . . .452
18-23 CCW Priority Situation 1. . . . . . . . . . . . . . . . . . . . . . . . . . .455
18-24 CCW Priority Situation 2. . . . . . . . . . . . . . . . . . . . . . . . . . .456
18-25 CCW Priority Situation 3. . . . . . . . . . . . . . . . . . . . . . . . . . .457
18-26 CCW Priority Situation 4. . . . . . . . . . . . . . . . . . . . . . . . . . .457
18-27 CCW Priority Situation 5. . . . . . . . . . . . . . . . . . . . . . . . . . .458
18-28 CCW Priority Situation 6. . . . . . . . . . . . . . . . . . . . . . . . . . .459
18-29 CCW Priority Situation 7. . . . . . . . . . . . . . . . . . . . . . . . . . .459
18-30 CCW Priority Situation 8. . . . . . . . . . . . . . . . . . . . . . . . . . .460
18-31 CCW Priority Situation 9. . . . . . . . . . . . . . . . . . . . . . . . . . .460
18-32 CCW Priority Situation 10. . . . . . . . . . . . . . . . . . . . . . . . . .461
18-33 CCW Priority Situation 11. . . . . . . . . . . . . . . . . . . . . . . . . .461
18-34 CCW Freeze Situation 12. . . . . . . . . . . . . . . . . . . . . . . . . .462
18-35 CCW Freeze Situation 13. . . . . . . . . . . . . . . . . . . . . . . . . .462
18-36 CCW Freeze Situation 14. . . . . . . . . . . . . . . . . . . . . . . . . .463
18-37 CCW Freeze Situation 15. . . . . . . . . . . . . . . . . . . . . . . . . .463
18-38 CCW Freeze Situation 16. . . . . . . . . . . . . . . . . . . . . . . . . .463
18-39 CCW Freeze Situation 17. . . . . . . . . . . . . . . . . . . . . . . . . .464
18-40 CCW Freeze Situation 18. . . . . . . . . . . . . . . . . . . . . . . . . .464
18-41 CCW Freeze Situation 19. . . . . . . . . . . . . . . . . . . . . . . . . .464
18-42 QADC Clock Subsystem Functions . . . . . . . . . . . . . . . . . .477
18-43 QADC Clock Pro grammability Examples . . . . . . . . . . . . . .479
18-44 QADC Conversion Queue Operation. . . . . . . . . . . . . . . . .482
18-45 Equivalent Analog Input Circuitry. . . . . . . . . . . . . . . . . . . .487
18-46 Errors Resulting from Clipping . . . . . . . . . . . . . . . . . . . . . .488
18-47 External Positive Edge Trigger Mode
Timing With Pause . . . . . . . . . . . . . . . . . . . . . . . . . . . .489
18-48 Gated Mode, Single Scan Timing. . . . . . . . . . . . . . . . . . . .491
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
List of Figures
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA List of Figures 35
Figure Title Page
18-49 Gated Mode, Continuous S can Timing . . . . . . . . . . . . . . .491
18-50 Star-Ground at the Point of Power Supply Origin. . . . . . . .493
18-51 Input Pin Subjected to Negative Stress . . . . . . . . . . . . . . .494
18-52 Input Pin Subjected to Positive Stress . . . . . . . . . . . . . . . .494
18-53 External Multiplexing of Analog Signal Sources. . . . . . . . .496
18-54 Electrical Model of an A/D Input Pin. . . . . . . . . . . . . . . . . .497
19-1 Read Cycle Fl owchart . . . . . . . . . . . . . . . . . . . . . . . . . . . .511
19-2 Write Cycle Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . .513
19-3 M aster Mode 1-Clock Read and Write Cycle. . . . . . . . .515
19-4 M aster Mode 2-Clock Read and Write Cycle. . . . . . . . .515
19-5 Internal (Show) Cycle Followed . . . . . . . . . . . . . . . . . . . . . . . .
by External 1-Clock Read . . . . . . . . . . . . . . . . . . . . . . .518
19-6 Internal (Show) Cycle Followed
by External 1-Clock Write . . . . . . . . . . . . . . . . . . . . . . .519
20-1 Chip Select Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . .523
20-2 Chip Select Control Register 0 (CSCR0) . . . . . . . . . . . . . .525
20-3 Chip Select Control Register 1 (CSCR1) . . . . . . . . . . . . . .526
20-4 Chip Select Control Register 2 (CSCR2) . . . . . . . . . . . . . .526
20-5 Chip Select Control Register 3 (CSCR3) . . . . . . . . . . . . . .527
21-1 Top-Level Tap Module and Low-Level (OnCE)
TAP Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .536
21-2 Top-Level TAP Controller State Machine. . . . . . . . . . . . . .540
21-3 IDCODE Register Bit Specification . . . . . . . . . . . . . . . . . .545
21-4 OnCE Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . .553
21-5 Low-Level (OnCE) Tap Module Data Registers (DRs). . . .554
21-6 OnCE Controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .557
21-7 OnCE Controller and Serial Interface. . . . . . . . . . . . . . . . .559
21-8 OnCE Command Register (OCMR). . . . . . . . . . . . . . . . . .562
21-9 OnCE Control Register (OCR) . . . . . . . . . . . . . . . . . . . . . .564
21-10 OnCE Status Register (OSR). . . . . . . . . . . . . . . . . . . . . . .568
21-11 OnCE Memory Breakpoint Logic . . . . . . . . . . . . . . . . . . . .570
21-12 OnCE Trace Logic Block Diagram . . . . . . . . . . . . . . . . . . .573
21-13 CPU Scan Chain Register (CPUSCR). . . . . . . . . . . . . . . .576
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
36 List of Figures MOTOROLA
Li st of Figu r e s
Figure Title Page
21-14 Control State Register (CTL) . . . . . . . . . . . . . . . . . . . . . . .578
21-15 OnC E PC FIFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .580
21-16 Recommended Connector Interface
to JTAG/OnCE Port. . . . . . . . . . . . . . . . . . . . . . . . . . . .583
22-1 VPP versus Programming Time . . . . . . . . . . . . . . . . . . . . .595
22-2 VPP versus Programming Pulses. . . . . . . . . . . . . . . . . . . .595
22-3 CLKOUT Timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .597
22-4 Clock Read/Write Cycle Timing . . . . . . . . . . . . . . . . . . . . .598
22-5 Read/Write Cycle Timing with Wait States. . . . . . . . . . . . .599
22-6 Show Cycle Timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .600
22-7 RESET and Configuration Override Timing . . . . . . . . . . . .601
22-8 SPI Timing Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .603
22-9 Test Clock Input Timing . . . . . . . . . . . . . . . . . . . . . . . . . . .605
22-10 Boundary Scan (JTAG) Timing . . . . . . . . . . . . . . . . . . . . .606
22-11 Test Access Port Timing . . . . . . . . . . . . . . . . . . . . . . . . . .606
22-12 TRST Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .606
22-13 Debug Event Pin Timing. . . . . . . . . . . . . . . . . . . . . . . . . . .607
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA List of Tables 37
Technical Data MMC2107
List of Tables
Table Title Page
2-1 Register Address Location Map . . . . . . . . . . . . . . . . . . . . . . .53
3-1 Signal Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92
3-2 Write-Once Bits Read/Write Accessibility. . . . . . . . . . . . . . . .93
3-3 Chip C onfiguration Module Memory Map. . . . . . . . . . . . . . . .94
3-4 Chip Configuration Mode Selection . . . . . . . . . . . . . . . . . . . .95
3-5 Bus Monitor Timeout Values . . . . . . . . . . . . . . . . . . . . . . . . .97
3-6 Reset Configuration Pin States During Reset . . . . . . . . . . .101
3-7 Configuration During Reset . . . . . . . . . . . . . . . . . . . . . . . . .102
3-8 Chip Configuration Mode Selection . . . . . . . . . . . . . . . . . . .103
3-9 Chip Sele ct CS0 Configuration Encoding. . . . . . . . . . . . . . .104
3-10 Boot Device Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104
3-11 Output Pad Driver Strength Selection . . . . . . . . . . . . . . . . .105
3-12 Clock Mode Selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105
3-13 Internal FLASH Configuration. . . . . . . . . . . . . . . . . . . . . . . .106
4-1 Package Pinouts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110
4-2 Signal Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117
5-1 Reset Controller Signal Properties. . . . . . . . . . . . . . . . . . . .131
5-2 Reset Controller Module Memory Map. . . . . . . . . . . . . . . . .132
5-3 Reset Source Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . .136
6-1 MCORE Instruction Set. . . . . . . . . . . . . . . . . . . . . . . . . . . .150
7-1 Interrupt Controller Module Memory Map. . . . . . . . . . . . . . .156
7-2 MASK Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158
7-3 Priority Select Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . .167
7-4 Fast Interrupt Vector Number. . . . . . . . . . . . . . . . . . . . . . . .170
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
38 List of Tables MOTOROLA
Li st of Tab les
Table Title Page
7-5 Vector Table Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . .170
7-6 Interrupt Source Assignment . . . . . . . . . . . . . . . . . . . . . . . .172
9-1 Non-Volatile Memory FLASH Memory Map . . . . . . . . . . . . .187
9-2 Negative Voltage Modulation . . . . . . . . . . . . . . . . . . . . . . . .194
9-3 Drain Amplitude Modulation (GDB = 0) . . . . . . . . . . . . . . . .195
9-4 System Clock Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .198
9-5 Clock Period Exponent and Pulse Width Range . . . . . . . . .199
9-6 Determining SCLKR[2:0], CLKPE[1:0],
and CLKPM[6:0] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .200
9-7 Program Interlock State Descriptions. . . . . . . . . . . . . . . . . .210
9-8 Results of Programming Margin Read . . . . . . . . . . . . . . . . .212
9-9 Required Programming Algorithm . . . . . . . . . . . . . . . . . . . .213
9-10 Erase Interlock State Descriptions . . . . . . . . . . . . . . . . . . . .217
9-11 Required Erase Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . .219
10-1 Signal Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
10-2 Clock Module Memory Map . . . . . . . . . . . . . . . . . . . . . . . . .226
10-3 System Frequency Multiplier of the Reference
Frequency in Normal PLL Mode . . . . . . . . . . . . . . . . . . .228
10-4 STPMD[1:0] Operation in Stop Mode. . . . . . . . . . . . . . . . . .230
10-5 System Clock Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231
10-6 Clock-Out and Clock-In Relationships . . . . . . . . . . . . . . . . .235
10-7 Loss of Clock Summ ary . . . . . . . . . . . . . . . . . . . . . . . . . . . .239
10-8 Stop Mode Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240
10-9 Charge Pump Current and MFD
in Normal Mode Operation . . . . . . . . . . . . . . . . . . . . . . .245
11-1 I/O Port Module Memory Map . . . . . . . . . . . . . . . . . . . . . . .250
11-2 PEPAR Reset Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .256
11-3 Ports AI Supported Pin Functions . . . . . . . . . . . . . . . . . . .258
12-1 Edge P ort Module Memory Map. . . . . . . . . . . . . . . . . . . . . .263
12-2 EPPAx Fiel d Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265
13-1 Watchdog Timer Module Memory Map . . . . . . . . . . . . . . . .274
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
List of Tables
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA List of Tables 39
Table Title Page
14-1 Programmable Interrupt Timer Modules Memory Map. . . . .284
14-2 Prescaler Select Encoding . . . . . . . . . . . . . . . . . . . . . . . . . .286
14-3 PIT Interrupt Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . .292
15-1 Signal Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298
15-2 Timer Modules Memory Map . . . . . . . . . . . . . . . . . . . . . . . .299
15-3 Output Compare Action Selection . . . . . . . . . . . . . . . . . . . .307
15-4 Input Capture Edge Selection. . . . . . . . . . . . . . . . . . . . . . . .308
15-5 Prescaler Selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .311
15-6 Clock Selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .316
15-7 TIMPORT I/O Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . .325
15-8 Timer Interrupt Requests . . . . . . . . . . . . . . . . . . . . . . . . . . .326
16-1 Signal Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334
16-2 Seria l Commu nicati ons Inter face Module
Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .335
16-3 SCI Normal, Loop, and Single-Wire Mode
Pin Configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338
16-4 Example Baud Rates (System Clock = 33 MHz) . . . . . . . . .350
16-5 Example 10-Bit and 11-Bit Frames. . . . . . . . . . . . . . . . . . . .352
16-6 Start Bit Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .358
16-7 Data Bit Recovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .358
16-8 Stop B it Recovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359
16-9 SCI Port Control Summary. . . . . . . . . . . . . . . . . . . . . . . . . .368
16-10 SCI Interrupt Request Sources. . . . . . . . . . . . . . . . . . . . . . .369
17-1 Signal Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374
17-2 SPI Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
17-3 SS P in I/O Configurations. . . . . . . . . . . . . . . . . . . . . . . . . . .377
17-4 Bidirectional Pin Configurations . . . . . . . . . . . . . . . . . . . . . .378
17-5 SPI Baud Rate Selection (33-MHz Module Clock). . . . . . . .380
17-6 SPI Port Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .384
17-7 Normal Mode and Bidirectional Mode . . . . . . . . . . . . . . . . .394
17-8 SPI Interrupt Request Sources. . . . . . . . . . . . . . . . . . . . . . .397
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
40 List of Tables MOTOROLA
Li st of Tab les
Table Title Page
18-1 Multiplexed Analog Input Channels . . . . . . . . . . . . . . . . . . .409
18-2 QADC Memory Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .410
18-3 Prescaler Clock High Times. . . . . . . . . . . . . . . . . . . . . . . . .417
18-4 Prescaler Clock Low Times . . . . . . . . . . . . . . . . . . . . . . . . .418
18-5 Queue 1 Operating Modes. . . . . . . . . . . . . . . . . . . . . . . . . .420
18-6 Queue 2 Operating Modes. . . . . . . . . . . . . . . . . . . . . . . . . .423
18-7 Pause Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .429
18-8 Queue Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .433
18-9 Input Sample Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .439
18-10 Non-Multiplexed Channel Assignments
and Pin Designations. . . . . . . . . . . . . . . . . . . . . . . . . . . .440
18-11 M ul tiplexed C hanne l Assignment s
and Pin Designations. . . . . . . . . . . . . . . . . . . . . . . . . . . .440
18-12 Analog Input Channels. . . . . . . . . . . . . . . . . . . . . . . . . . . . .444
18-13 Trigger Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .454
18-14 Status Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .454
18-15 QADC Clock Programmability . . . . . . . . . . . . . . . . . . . . . . .479
18-16 External Circuit Settling Time to 1/2 LSB
(10-Bit Conversions) . . . . . . . . . . . . . . . . . . . . . . . . . . . .499
18-17 Error Resulting From Input Leakage (IOff) . . . . . . . . . . . . . .500
18-18 QADC Status Flags and Interrupt Sources. . . . . . . . . . . . . .500
19-1 Signal Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .505
19-2 Data Transfer Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .509
19-3 EB[3:0] Assertion Encoding . . . . . . . . . . . . . . . . . . . . . . . . .510
19-4 Emulation Mode Chip-Select Summary . . . . . . . . . . . . . . . .517
20-1 Signal Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .524
20-2 Chip Select Memory Map. . . . . . . . . . . . . . . . . . . . . . . . . . .524
20-3 Chip Select Wait States Encoding . . . . . . . . . . . . . . . . . . . .529
20-4 Chip Select Address Range Encoding . . . . . . . . . . . . . . . . .531
21-1 JTAG Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .542
21-2 List of Pins Not Scanned in JTAG Mode . . . . . . . . . . . . . . .548
21-3 Boundary-Scan Register Definition . . . . . . . . . . . . . . . . . . .549
21-4 OnCE Register Addressing . . . . . . . . . . . . . . . . . . . . . . . . .563
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
List of Tables
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA List of Tables 41
Table Title Page
21-5 Sequential Control Field Settings. . . . . . . . . . . . . . . . . . . . .565
21-6 Memory Breakpoint Control Field Settings. . . . . . . . . . . . . .567
21-7 Processor Mode Field Settings. . . . . . . . . . . . . . . . . . . . . . .569
22-1 Absolute Maximum Ratings . . . . . . . . . . . . . . . . . . . . . . . . .586
22-2 Thermal Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . .587
22-3 ESD Protection Characteristics . . . . . . . . . . . . . . . . . . . . . .587
22-4 DC Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . . .588
22-5 PLL Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . .590
22-6 QADC Absolute Maximum Ratings . . . . . . . . . . . . . . . . . . .591
22-7 QADC Electrical Specifications . . . . . . . . . . . . . . . . . . . . . .592
22-8 QADC Conversion Specifications. . . . . . . . . . . . . . . . . . . . .593
22-9 FLASH Program and Erase Characteristics. . . . . . . . . . . . .594
22-10 FLASH EEPROM Module Life Characteristics. . . . . . . . . . .594
22-11 External Interface Timing Characteristics. . . . . . . . . . . . . . .596
22-12 Reset and Configuration Override Timing . . . . . . . . . . . . . .601
22-13 SPI Timing Characteristics. . . . . . . . . . . . . . . . . . . . . . . . . .602
22-14 OnCE, JTA G, and Boundary Scan Timing. . . . . . . . . . . . . .605
24-1 MC Order Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .615
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
42 List of Tables MOTOROLA
Li st of Tab les
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA General Description 43
Technical Data MMC2107
Section 1. General Descrip tion
1.1 Contents
1.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
1.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
1.4 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48
1.2 Introduction
The MMC2107 is the first member of a family of general-purpose
microcontrollers (MCU) based on the M CORE M210 central
processor unit (CPU).
As a low-voltage part, the MMC2107 operates at voltages between
2. 7 volts and 3.6 volts. It is particul arly suited fo r use in bat tery-pow ered
applications. The operating frequency is up to a maximum of 33 MHz
over a temperature range of –40°C to 85°C.
Available packages are 100-pin low-profile quad flat pack (LQFP)
or a 144-pin LQFP for applications requiring the full external memory
interface support or a large number of general-purpose inputs/outputs
(GPIO).
™M•CORE is a trademark of Mot orola, Inc.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
44 Gen eral D es cri ptio n MOTOR OLA
General Description
1.3 Featur es
Features of the MMC2107 include:
M•CORE M210 integer processor:
32-bit reduced instruction set computer (RISC) architecture
Low power and high performance
OnCE debug support
On-chip 128-Kbyte FLASH:
Motorolas one transistor, CDR MoneT(1) FLASH bit cell
Page mode (2111) read access
External VPP required for programming
16-K block size
On-chip, 8-Kbyte static random-access memory (SRAM):
One cl ock per access (i n cluding bytes, half- words, a nd wor ds)
Byte, half-word (16 bits), and word (32 bits) read/write
accesses
Standby power supply support
Serial peripheral interface (SPI):
Master mode and slave mode
Wired-OR mode
Slave sel ect output
Mode fault error flag with CPU interrupt capability
Double-buffered operation
Serial clock with programmable polarity and phase
Control of SPI operation during wait mode
Reduc ed dri ve control
OnCE is a trademar k of Motorola, Inc.
1. CDR MoneT desig nates the Motorola one-transi stor bitcell.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
General Description
Features
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA General Description 45
Two serial communications interfaces (SCI):
Full-duplex operation
Standard mark/space non-return-to- zero (NRZ) format
13-bit baud rate selection
Programmable 8-bit or 9-bit data format
Separately enabled transmitter and receiver
Separate receiver and transmitter CPU interrupt requests
Programmable transmitter output polarity
Two receiver wakeup methods (idle line and address mark)
Interrupt-driven operation with eight flags
Receiver framing error detection
Hardware parity checking
1/16 bit-time noise detection
General-purpose input/output port
Two timers:
Four 16-bit input capture/output compare channels
16-bit architecture
16-bit pulse accumulator
Pulse widths variable from microseconds to seconds
Prescaler
Toggle-on-overflow feature for pulse-width modulator (PWM)
generation
Timer port pullups enabled on reset
Queued analog-to-digital converter (QADC):
Eight analog input channels
10-bit resolution ±2 counts accuracy
Minimum 7 µs conversion time
Internal sample and hold
Programmable input sample time for various source
impedances
Two conversion command queues with a total of 64 entries
Subqueues possible using pause mechanism
Queue complete and pause software interrupts available on
both queues
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
46 Gen eral D es cri ptio n MOTOR OLA
General Description
Queue po inters indicate current location for each queue
Automated queue modes initiated by:
External edge trigger and gated trigger
Periodic/interval timer, within queued analog-to-digital
converter (QADC) module {queue1 and queue2}
Software command
Single-scan or continuous-scan of queues
Output da ta readable in three formats:
Right-justified unsigned
Left-justified signed
Left-justified unsigned
Unused analog channels can be used as digital input/output
(I/O)
Minimum pin set configuration implemented
Interrupt controller:
Up to 40 interrupt sources
32 unique programmable priority levels for each interrupt
source
Independent enable/disable of pending interrupts based on
priority level
Select normal or fast interrupt request for each priority level
Fast interrupt requests always have priority over normal
interrupts.
Ability to mask interrupts at and below a defined priority level
Ability to select between autovectored or vectored interrupt
requests
Vectored interrupts generated based on priority level
Ability to generate a separate vector number for normal and
fast interrupts
Ability for software to self-schedule interrupts
Softwar e visibility of pending inte rrupts an d interr upt signals t o
core
Asynchronous operation to support wakeup from low-power
modes
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
General Description
Features
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA General Description 47
External interrupts supported:
Rising/falling edge select
Low-level sensitive
Ability for software generation of external interrupt event
General-purpose input/output support
Periodic interval timer:
16-bit counter
Selectable as free running or count down
Watchdog timer:
16-bit counter
Low-power mode support
Phase-lock loop (PLL):
Reference crystal from 2 to 10 MHz
Low-power modes supported
Separate clock-out signal
Reset:
Sepa rate reset in and reset out sign als
Six sources of reset:
Power- on re set (P OR )
External
Software
Watchdog
Loss of clock
Loss of lock
Status flag indication of source of last reset
Chip configur ations:
Support for single-chip, master, emulation, and test modes
System configuration during reset
Bus monitor
Configurable output pad drive strength control
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
48 Gen eral D es cri ptio n MOTOR OLA
General Description
General-purpose input/output (GPIO):
Up to 72 bits of GPIO
Coherent 32-bit control
Bit manipulation supported via set/clear functions
Unused peripheral pins may be used as extra GPIO.
Reduc ed dri ve control
M•CORE to IPbus interface:
Complete interfacing between the MCORE bus and the IPbus
peripheral bus
Mi nimum of three clocks for peripheral bus access
Data alignment and data width conversion between the
M•CORE 32-bit data bus and the IPbus peripheral data buses
External interface:
Provides for direct support of asynchronous random-access
memory (RAM), read-only memory (ROM), and FLAS H
Support interfacing to 16-bit and 32-bit data buses
32-bit external bidirectional data bus
23-bit address bus
Four chip selects
Byte/write enables
Ability to boot from internal or external memories
Internal bus activity is visible via show-cycle mode
Special chip selects support replacement of GPIO with
external logic (port replacement logic)
Emulation of internal page mode FLASH support
Joint Test Action Gr oup (JTAG) support for system -l evel board
testing
1.4 Block Diagram
The basic structure of the MMC2107 is shown in Figure 1-1.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
General Description
Block Diagram
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA General Description 49
Figure 1-1. Block Diagram
FLASH
CONTR OLL E R OSC/PLL
RESET
SPI
SRAM
SCI1 SCI2
INTERRUPT
IPBUS
INTERFACE
TMS
TDI
TDO
TCLK
DE
TRST
INT[7:0]
MISO
TXD2
RXD2
TIM1 TIM2
ICOC1[3:0]
PQB[3:0]
VRL, VRH
VDDA, VSSA
EXTAL
XTAL
VDDSYN
VSSSYN
CLKOUT
RESET
RSTOUT
D[31:0]
VPP
VDDF, VSSF
VSS x 8
VDD x 8
PORTS
128-KBYTE
8-KBYTE
VSTBY
ICOC2[3:0]
TXD1
RXD1
POR
PROGRAMMABLE
INTERVAL
TIMER 2
WATCHDOG
TIMER
ADC
MOSI
SCK
SS
CS
TEST
PROGRAMMABLE
INTERVAL
TIMER 1
EDGE
PORT
PSTAT[3:0]
M•CORE
(M210)
A[22:0]
R/W
EB[3:0]
CS[3:0]
TC[2:0]
SHS
CSE[1:0]
TA
TEA
OE
TEST
PQA[4:3]
PQA[1:0]
VDDH
MCORE BUS
EXTERNAL MEMORY INTERFACE
IPBUS
OnCE
JTAG
TAP
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
50 Gen eral D es cri ptio n MOTOR OLA
General Description
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 51
Technical Data MMC2107
Section 2. System Memory Map
2.1 Contents
2.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
2.3 Address Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
2.4 Register Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
2.2 Introduction
The address map, shown in Figure 2- 1, includes:
128 Kbytes of internal FLASH
8 Kbytes of internal static random-access memory (SRAM)
Internal memory mapped registers
External address space
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
52 System Memory Map MOTOR OLA
System Memory Map
2.3 Address Map
Figure 2-1. Address Map
INTERNAL FLASH
INTERNAL SRAM
EXTERNAL MEMORY
0x00c0_0000
0
8 KBYTES
128
K
BYTES
0x0080_0000
REGISTERS
SEE 2.4 Register Map
0x8000_0000
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Address Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 53
Table 2-1. Register Address Location Map(1)
1. See modul e se ction s for d etail s of h ow much of each blo ck is being dec oded. Access es t o
addresses outsi de the mod ule memory maps (and also the reserved are a
0x00d1_00000x7fff_ffff) wi ll not be responded to and will result in a bus moni tor transfer
error exception.
Base Address (Hex) Usage
0x00c0_0000 Ports(2) (PORTS)
2. The port register space is mir rored/re peated in the 64-Kbyte block. This all ows the f ull
64-Kbyte block to be decoded and used to execute an external access to a port
replacement uni t i n emu lat ion mode.
0x00c1_0000 Chip configuration (CCM)
0x00c2_0000 Chip selects (CS)
0x00c3_0000 Clocks (CLOCK)
0x00c4_0000 Reset (RESET )
0x00c5_0000 Interrupt controller (INTC)
0x00c6_0000 Edge port (EPORT)
0x00c7_0000 Watchdog timer (WDT)
0x00c8_0000 Programmable interrupt timer 1 (PIT1)
0x00c9_0000 Programmable interrupt timer 2 (PIT2)
0x00ca_0000 Queued analog-to-digital converter (QADC)
0x00cb_0000 Serial peripheral interface (SPI)
0x00cc_0000 Serial communications interface 1 (SCI1)
0x00cd_0000 Serial communications interface 2 (SCI2)
0x00ce_0000 Timer 1 (TIM1)
0x00cf_0000 Timer 2 (TIM2)
0x00 d0_000 0 FLASH reg isters (C MF R)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
54 System Memory Map MOTOR OLA
System Memory Map
2.4 Register Map
Address Register Name Bit Number
Po r ts (PORTS)
Bit 7654321Bit 0
0x00c0_0000 Port A Output Data
Register (PORTA)
See page 251.
Read: PORTA7 PORTA6 PORTA5 PORTA4 PORTA3 PORTA2 PORTA1 PORTA0
Write:
Reset:11111111
Bit 7654321Bit 0
0x00c0_0001 Port B Output Data
Register (PORTB)
See page 251.
Read: PORTB7 PORTB6 PORTB5 PORTB4 PORTB3 PORTB2 PORTB1 PORTB0
Write:
Reset:11111111
Bit 7654321Bit 0
0x00c0_0002 Port C Output Data
Register (PORTC)
See page 251.
Read: PORTC7 PORTC6 PORTC5 PORTC4 PORTC3 PORTC2 PORTC1 PORTC0
Write:
Reset:11111111
Bit 7654321Bit 0
0x00c0_0003 Port D Output Data
Register (PORTD)
See page 251.
Read: PORTD7 PORTD6 PORTD5 PORTD4 PORTD3 PORTD2 PORTD1 PORTD0
Write:
Reset:11111111
Bit 7654321Bit 0
0x00c0_0004 Port E Output Data
Register (PORTE)
See page 251.
Read: PORTE7 PORTE6 PORTE5 PORTE4 PORTE3 PORTE2 PORTE1 PORTE0
Write:
Reset:11111111
Bit 7654321Bit 0
0x00c0_0005 Port F Output Data
Register (PORTF)
See page 251.
Read: PORTF7 PORTF6 PORTF5 PORTF4 PORTF3 PORTF2 PORTF1 PORTF0
Write:
Reset:11111111
Bit 7654321Bit 0
0x00c0_0006 Port G Outp u t Da ta
Register (PORTG)
See page 251.
Read: PORTG7 PORTG6 PORTG5 PORTG4 PORTG3 PORTG2 PORTG1 PORTG0
Write:
Reset:11111111
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 1 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 55
Bit 7654321Bit 0
0x00c0_0007 Port H Output Data
Register (PORTH)
See page 251.
Read: PORTH7 PORTH6 PORTH5 PORTH4 PORTH3 PORTH2 PORTH1 PORTH0
Write:
Reset:11111111
Bit 7654321Bit 0
0x00c0_0008 Po r t I Ou tp u t D a ta
Register (PORTI)
See page 251.
Read: PORTI7 PORTI6 PORTI5 PORTI4 PORTI3 PORTI2 PORTI1 PORTI0
Write:
Reset:11111111
Bit 7654321Bit 0
0x00c0_0009
0x00c0_000b Reserved Writes have no effect, reads ret urn 0s, and the ac cess terminates
without a transfer er ror exception.
Bit 7654321Bit 0
0x00c0_000c Port A Data Direc tion
Register (DDRA)
See page 252.
Read: DDRA7 DDRA6 DDRA5 DDRA4 DDRA3 DDRA2 DDRA1 DDRA0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c0_000d Port B Data Direction
Register (DDRB)
See page 252.
Read: DDRB7 DDRB6 DDRB5 DDRB4 DDRB3 DDRB2 DDRB1 DDRB0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c0_000e Port C Data Direc tion
Register (DDRC)
See page 252.
Read: DDRC7 DDRC6 DDRC5 DDRC4 DDRC3 DDRC2 DDRC1 DDRC0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c0_000f Port D Data Direction
Register (DDRD)
See page 252.
Read: DDRD7 DDRD6 DDRD5 DDRD4 DDRD3 DDRD2 DDRD1 DDRD0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c0_0010 Port E Data Direction
Register (DDRE)
See page 252.
Read: DDRE7 DDRE6 DDRE5 DDRE4 DDRE3 DDRE2 DDRE1 DDRE0
Write:
Reset:00000000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 2 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
56 System Memory Map MOTOR OLA
System Memory Map
Bit 7654321Bit 0
0x00c0_0011 Port F Data Direction
Register (DDRF)
See page 252.
Read: DDRF7 DDRF6 DDRF5 DDRF4 DDRF3 DDRF2 DDRF1 DDRF0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c0_0012 Port G Data Direction
Register (DDRG)
See page 252.
Read: DDRG7 DDRG6 DDRG5 DDRG4 DDRG3 DDRG2 DDRG1 DDRG0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c0_0013 Port H Data Direc tion
Register (DDRH)
See page 252.
Read: DDRH7 DDRH6 DDRH5 DDRH4 DDRH3 DDRH2 DDRH1 DDRH0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c0_0014 Port I Data Direction
Register (DDRI)
See page 252.
Read: DDRI7 DDRI6 DDRI5 DDRI4 DDRI3 DDRI2 DDRI1 DDRI0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c0_0015
0x00c0_0017 Reserved Writes have no effect, reads ret urn 0s, and the ac cess terminates
without a transfer er ror exception.
Bit 7654321Bit 0
0x00c0_0018
Por t A Pi n D a ta/ Set
Data Register
(PORTAP/SETA)
See page 253.
Read: PORTAP7 PORTAP6 PORTAP5 PORTAP4 PORTAP3 PORTAP2 PORTAP1 PORTAP0
Write: SETA7 SETA6 SETA5 SETA4 SETA3 SETA2 SETA1 SETA0
Reset:PPPPPPPP
Bit 7654321Bit 0
0x00c0_0019
Por t B Pi n D a ta/ Set
Data Register
(PORTBP/SETB)
See page 253.
Read: PORTBP7 PORTBP6 PORTBP5 PORTBP4 PORTBP3 PORTBP2 PORTBP1 PORTBP0
Write: SETB7 SETB6 SETB5 SETB4 SETB3 SETB2 SETB1 SETB0
Reset:PPPPPPPP
Bit 7654321Bit 0
0x00c0_001a
Port C Pin Data/Set
Data Register
(PORTCP/SETC)
See page 253.
Read: PORTCP7 PORTCP6 PORTCP5 PORTCP4 PORTCP3 PORTCP2 PORTCP1 PORTCP0
Write: SETC7 SETC6 SETC5 SETC4 SETC3 SETC2 SETC1 SETC0
Reset:PPPPPPPP
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 3 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 57
Bit 7654321Bit 0
0x00c0_001b
Port D Pin Data/Set
Data Register
(PORTDP/SETD)
See page 253.
Read: PORTDP7 PORTDP6 PORTDP5 PORTDP4 PORTDP3 PORTDP2 PORTDP1 PORTDP0
Write: SETD7 SETD6 SETD5 SETD4 SETD3 SETD2 SETD1 SETD0
Reset:PPPPPPPP
Bit 7654321Bit 0
0x00c0_001c
Por t E Pi n D a ta/ Set
Data Register
(PORTEP/SETE)
See page 253.
Read: PORTEP7 PORTEP6 PORTEP5 PORTEP4 PORTEP3 PORTEP2 PORTEP1 PORTEP0
Write: SETE7 SETE6 SETE5 SETE4 SETE3 SETE2 SETE1 SETE0
Reset:PPPPPPPP
Bit 7654321Bit 0
0x00c0_001d
Port F Pin Data/Set
Data Register
(PORTFP/SETF)
See page 253.
Read: PORTFP7 PORTFP6 PORTFP5 PORTFP4 PORTFP3 PORTFP2 PORTFP1 PORTFP0
Write: SETF7 SETF6 SETF5 SETF4 SETF3 SETF2 SETF1 SETF0
Reset:PPPPPPPP
Bit 7654321Bit 0
0x00c0_001e
Port G Pin Data/Set
Data Register
(PORTGP/SETG)
See page 253.
Read: PORTGP7 PORTGP6 PORTGP5 PORTGP4 PORTGP3 PORTGP2 PORTGP1 PORTGP0
Write: SETG7 SETG6 SETG5 SETG4 SETG3 SETG2 SETG1 SETG0
Reset:PPPPPPPP
Bit 7654321Bit 0
0x00c0_001f
Port H Pin Data/Set
Data Register
(PORTHP/SETH)
See page 253.
Read: PORTHP7 PORTHP6 PORTHP5 PORTHP4 PORTHP3 PORTHP2 PORTHP1 PORTHP0
Write: SETH7 SETH6 SETH5 SETH4 SETH3 SETH2 SETH1 SETH0
Reset:PPPPPPPP
Bit 7654321Bit 0
0x00c0_0020
Por t I Pi n D ata / Set
Data Register
(PORTIP/SETI)
See page 253.
Read: PORTIP7 PORTIP6 PORTIP5 PORTIP4 PORTIP3 PORTIP2 PORTIP1 PORTIP0
Write: SETI7 SETI6 SETI5 SETI4 SETI3 SETI2 SETI1 SETI0
Reset:PPPPPPPP
Bit 7654321Bit 0
0x00c0_0021
0x00c0_0023 Reserved Writes have no effect, reads ret urn 0s, and the ac cess terminates
without a transfer er ror exception.
Bit 7654321Bit 0
0x00c0_0024 Port A Clear Outpu t
Data Register (CLRA)
See page 254.
Read: 0 0 0 0 0 0 0 0
Write: CLRA7 CLRA6 CLRA5 CLRA4 CLRA3 CLRA2 CLRA1 CLRA0
Reset:00000000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 4 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
58 System Memory Map MOTOR OLA
System Memory Map
Bit 7654321Bit 0
0x00c0_0025 Port B Clear Outpu t
Data Register (CLRB)
See page 254.
Read: 0 0 0 0 0 0 0 0
Write: CLRB7 CLRB6 CLRB5 CLRB4 CLRB3 CLRB2 CLRB1 CLRB0
Reset:00000000
Bit 7654321Bit 0
0x00c0_0026 Port C Clear Output
Data Register (CLRC)
See page 254.
Read: 0 0 0 0 0 0 0 0
Write: CLRC7 CLRC6 CLRC5 CLRC4 CLRC3 CLRC2 CLRC1 CLRC0
Reset:00000000
Bit 7654321Bit 0
0x00c0_0027 Port D Clear Output
Data Register (CLRD)
See page 254.
Read: 0 0 0 0 0 0 0 0
Write: CLRD7 CLRD6 CLRD5 CLRD4 CLRD3 CLRD2 CLRD1 CLRD0
Reset:00000000
Bit 7654321Bit 0
0x00c0_0028 Port E Clear Outpu t
Data Register (CLRE)
See page 254.
Read: 0 0 0 0 0 0 0 0
Write: CLRE7 CLRE6 CLRE5 CLRE4 CLRE3 CLRE2 CLRE1 CLRE0
Reset:00000000
Bit 7654321Bit 0
0x00c0_0029 Port F Clear Outpu t
Dat a Register (CLRF)
See page 254.
Read: 0 0 0 0 0 0 0 0
Write: CLRF7 CLRF6 CLRF5 CLRF4 CLRF3 CLRF2 CLRF1 CLRF0
Reset:00000000
Bit 7654321Bit 0
0x00c0_002a Port G Clear Outpu t
Data Register (CLRG)
See page 254.
Read: 0 0 0 0 0 0 0 0
Write: CLRG7 CLRG6 CLRG5 CLRG4 CLRG3 CLRG2 CLRG1 CLRG0
Reset:00000000
Bit 7654321Bit 0
0x00c0_002b Port H Clear Output
Data Register (CLRH)
See page 254.
Read: 0 0 0 0 0 0 0 0
Write: CLRH7 CLRH6 CLRH5 CLRH4 CLRH3 CLRH2 CLRH1 CLRH0
Reset:00000000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 5 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 59
Bit 7654321Bit 0
0x00c0_002c P o r t I C l e a r O u tp ut
Data Register (CLRI)
See page 254.
Read: 0 0 0 0 0 0 0 0
Write: CLRI7 CLRI6 CLRI5 CLRI4 CLRI3 CLRI2 CLRI1 CLRI0
Reset:00000000
Bit 7654321Bit 0
0x00c0_002d
0x00c0_002f Reserved Writes have no effect, reads ret urn 0s, and the access t erminates
without a transfer er ror exception.
Bit 7654321Bit 0
0x00c0_0030
Port C/D Pin
Assignment Register
(PCDPAR)
See page 255.
Read: PCDPA 0000000
Write:
Reset: See note 0 0 0 0 0 0 0
Note: Reset state determined during reset configuration. PCDPA = 1 except in single-chip
mode or when an external boot device is selected with a 16-bit port size in master mode.
Bit 7654321Bit 0
0x00c0_0031
Por t E Pi n
Assignment Register
(PEPAR)
See page 256.
Read: PEPA7 PEPA6 PEPA5 PEPA4 PEPA3 PEPA2 PEPA1 PEPA0
Write:
Reset: Reset state determined during reset configuration as shown in Table 11-2. PEPAR Reset Valu es.
Bit 7654321Bit 0
0x00c0_0032
0x00c0_003f Reserved Writes have no effect, reads ret urn 0s, and the access t erminates
without a transfer er ror exception.
Bit 7654321Bit 0
0x00c0_0040
0x00c0_ffff Reserved Ports register space (block of 0x00c0_0000 through 0x00c0_oo3f) is mirrored/repeated.
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 6 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
60 System Memory Map MOTOR OLA
System Memory Map
Chip Configuration Module (CCM)
Bit 15 14 13 12 11 10 9 Bit 8
0x00c1_0000
0x00c1_0001 Chip Configuration
Register
(CCR)
See page 94.
Read: LOAD 0SHEN EMINT 0 MODE2 MODE1 MODE0
Write:
Reset: Note 1 0 Note 2 Note 2 0 Note 1 Note 1 Note 1
Bit 7654321Bit 0
Read: 0 SZEN PSTEN SHINT BME BMD BMT1 BMT0
Write:
Reset: 0 Note 3 Note 2 0 1 0 0 0
Notes:
1. Determined during reset configuration
2. 0 for all configurations except emulation mode, 1 for emulation mode
3. 0 for all configurations except emulation and master modes, 1 for emulation and master modes
Bit 7654321Bit 0
0x00c1_0002 Reserved Writes have no effect, reads return 0s, and the access t erminates
without a transfer er ror exception.
Bit 7654321Bit 0
0x00c1_0003 Reserved Writes have no effect, reads ret urn 0s, and the ac cess terminates
without a transfer er ror exception.
Bit 15 14 13 12 11 10 9 Bit 8
0x00c1_0004
0x00c1_0005 Reset Configuration
Register (RCON)
See page 97.
Read: 0 0 0 0 0 0 0 0
Write:
Reset:00000000
Bit 7654321Bit 0
Read: 1
RPLLSEL 1
RPLLREF 0
RLOAD 01
BOOTPS 0
BOOTSEL 00
MODE
Write:
Reset:11001000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 7 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 61
Bit 15 14 13 12 11 10 9 Bit 8
0x00c1_0006
0x00c1_0007 Chip Identifica tion
Register (CIR)
See page 99.
Read: 0
PIN7 0
PIN6 0
PIN5 1
PIN4 0
PIN3 1
PIN2 1
PIN1 1
PIN0
Write:
Reset:00010111
Bit 7654321Bit 0
Read: 0
PRN7 0
PRN6 0
PRN5 0
PRN4 0
PRN3 0
PRN2 0
PRN1 0
PRN0
Write:
Reset: 00000000
Bit 15 14 13 12 11 10 9 Bit 8
0x00c1_0008
0x00c1_0009 Chip T es t Register
(CTR)
See page 100.
Read: 0 0 0 0 0 0 0 0
Write:
Reset:00000000
Bit 7654321Bit 0
Read: 0 0 0 0 0 0 0 0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c1_000a
0x00c1_000b Reserved Writes have no effect, reads ret urn 0s, and the ac cess terminates
without a transfer er ror exception.
Bit 7654321Bit 0
0x00c1_000c
0x00c1_000f Unimplemented Access results in the module generating an access termination transfer error .
Bit 7654321Bit 0
0x00c1_0010
0x00c1_ffff Unimplemented Access results in a bus monitor timeout generating an access t ermination transfer error.
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 8 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
62 System Memory Map MOTOR OLA
System Memory Map
Chip Selects (CS)
Bit 15 14 13 12 11 10 9 Bit 8
0x00c2_0000
0x00c2_0001 Chip Select Control
Register 0 (CSCR0)
See page 525.
Read: SO RO PS WWS WE WS2 WS1 WS0
Write:
Reset: 0 0 See note 1 1 1 1 1
Bit 7654321Bit 0
Read: 0 0 0 0 0 0 TAEN CSEN
Write:
Reset:0000001See note
Note: Reset state determined during reset configuration.
Bit 15 14 13 12 11 10 9 Bit 8
0x00c2_0002
0x00c2_0003 Chip Select Control
Register 1 (CSCR1)
See page 526.
Read: SO RO PS WWS WE WS2 WS1 WS0
Write:
Reset:00111111
Bit 7654321Bit 0
Read: 0 0 0000
TAEN CSEN
Write:
Reset:0000001See note
Note: Reset state determined during reset configuration
Bit 15 14 13 12 11 10 9 Bit 8
0x00c2_0004
0x00c2_0005 Chip Select Control
Register 2 (CSCR2)
See page 526.
Read: SO RO PS WWS WE WS2 WS1 WS0
Write:
Reset:00111111
Bit 7654321Bit 0
Read: 0 0 0 0 0 0 TAEN CSEN
Write:
Reset:00000010
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 9 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 63
Bit 15 14 13 12 11 10 9 Bit 8
0x00c2_0006
0x00c2_0007 Chip Select Control
Register 3 (CSCR3)
See page 527.
Read: SO RO PS WWS WE WS2 WS1 WS0
Write:
Reset:00111111
Bit 7654321Bit 0
Read: 0 0 0 0 0 0 TAEN CSEN
Write:
Reset:00000010
Bit 7654321Bit 0
0x00c2_0008
0x00c2_ffff Unimplemented Access results in a bus monitor timeout generating an access t ermination transfer error.
Clocks (CLOCK)
Bit 15 14 13 12 11 10 9 Bit 8
0x00c3_0000
0x00c3_0001 Synthesizer Control
Register (SYNCR)
See page 227.
Read: LOLRE MFD2 MFD1 MFD0 LOCRE RFD2 RFD1 RFD0
Write:
Reset:00100001
Bit 76 54 321Bit 0
Read: LOCEN DISCLK FWKUP RSVD4 STMPD1 STMPD0 RSVD1 RSVD0
Write:
Reset:00000000
Bit 76 54 321Bit 0
0x00c3_00 02 S ynthesizer Status
Register (SYNSR)
See page 230.
Read: PLLMODE PLLSEL PLLREF LOCKS LOCK LOCS 0 0
Write:
Reset: Note 1 Note 1 Note 1 Note 2 Note 2 0 0 0
Notes:
1. Reset state determined during reset configuration
2. See the LOCKS and LOCK bit descriptions.
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 10 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
64 System Memory Map MOTOR OLA
System Memory Map
Bit 7654321Bit 0
0x00c3_0003 Synthesizer Test Register
(SYNTR)
See page 233.
Read: 0 0 0 0 0 0 0 0
Write:
Reset:00000000
Bit 31 30 29 28 27 26 25 B it 24
0x00c3_0004
0x00c3_0005
0x00c3_0006
0x00c3_0007
Synthesizer Test
Register 2 (SYNTR2)
See page 234.
Read: 0 0 0 0 0 0 0 0
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 B it 16
Read: 0 0 0 0 0 0 0 0
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0 0 0 0 0 0 RSVD9 RSVD8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: RSVD7 RSVD6 RSVD5 RSVD4 RSVD3 RSVD2 RSVD2 RSVD0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c3_0008
0x00c3_ffff Unimplemented Access results in a bus monitor timeout generating an access t ermination transfer error.
Reset (RESET)
Bit 7654321Bit 0
0x00c4_0000 Reset Control Register
(RCR)
See page 133.
Read: SOFTRST FRC-
RSTOUT 000000
Write:
Reset:00000000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 11 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 65
Bit 7654321Bit 0
0x00c4_0001 Reset Status Register
(RSR)
See page 134.
Read: 0 0 SOFT WDR POR EXT LOC LOL
Write:
Reset: 0 0 Reset dependent
Bit 7654321Bit 0
0x00c4_0002 Reset Test Register
(RTR)
See page 135.
Read: 0 0 0 0 0 0 0 0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c4_0003 Reserved Writes have no effect, reads ret urn 0s, and the ac cess terminates
without a transfer er ror exception.
Bit 7654321Bit 0
0x00c4_0004
0x00c4_ffff Unimplemented Access results in a bus monitor timeout generating an access t ermination transfer error.
Interrupt Controller (INTC)
Bit 15 14 13 12 11 10 9 Bit 8
0x00c5_0000
0x00c5_0001 Interrupt Control Register
(ICR)
See page 157.
Read: AE FVE ME MFI 0000
Write:
Reset:10000000
Bit 7654321Bit 0
Read: 0 0 0 MASK4 MASK3 MASK2 MASK1 MASK0
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
0x00c5_0002
0x00c5_0003 Interrupt Status Register
(ISR)
See page 159.
Read: 0 0 0 0 0 0 INT FINT
Write:
Reset:00000000
Bit 7654321Bit 0
Read: 0 VEC6 VEC5 VEC4 VEC3 VEC2 VEC1 VEC0
Write:
Reset:00000000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 12 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
66 System Memory Map MOTOR OLA
System Memory Map
Bit 31 30 29 28 27 26 25 Bit 24
0x00c5_0004
0x00c5_0005
0x00c5_0006
0x00c5_0007
Interrupt Force Register
High (IFRH)
See page 160.
Read: 0 0 0 0 0 0 0 0
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: 0 0 0 0 0 0 0 0
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0 0 0 0 0 0 0 0
Write:
Reset:00000000
Bit 7654321Bit 0
Read: IF39 IF38 IF37 IF36 IF35 IF34 IF33 IF32
Write:
Reset:00000000
Bit 31 30 29 28 27 26 25 Bit 24
0x00c5_0008
0x00c5_0009
0x00c5_000a
0x00c5_000b
Interrupt Force Register
Low (IFRL)
See page 161.
Read: IF31 IF30 IF29 IF28 IF27 IF26 IF25 IF24
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: IF23 IF22 IF21 IF20 IF19 IF18 IF17 IF16
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: IF15 IF14 IF13 IF12 IF11 IF10 IF9 IF8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: IF7IF6IF5IF4IF3IF2IF1IF0
Write:
Reset:00000000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 13 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 67
Bit 31 30 29 28 27 26 25 Bit 24
0x00c5_000c
0x00c5_000d
0x00c5_000e
0x00c5_000f
Interrupt Pending
Register (IPR)
See page 162.
Read: IP31 IP30 IP29 IP28 IP27 IP26 IP25 IP24
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: IP23 IP22 IP21 IP20 IP19 IP18 IP17 IP16
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: IP15 IP14 IP13 IP12 IP11 IP10 IP9 IP8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: IP7 IP6 IP5 IP4 IP3 IP2 IP1 IP0
Write:
Reset:00000000
Bit 31 30 29 28 27 26 25 Bit 24
0x00c5_0010
0x00c5_0011
0x00c5_0012
0x00c5_0013
Normal Interrupt Enable
Register (NIER)
See page 163.
Read: NIE31 NIE30 NIE29 NIE28 NIE27 NIE26 NIE25 NIE24
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: NIE23 NIE22 NIE21 NIE20 NIE19 NIE18 NIE17 NIE16
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: NIE15 NIE14 NIE13 NIE12 NIE11 NIE10 NIE9 NIE8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: NIE7 NIE6 NIE5 NIE4 NIE3 NIE2 NIE1 NIE0
Write:
Reset:00000000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 14 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
68 System Memory Map MOTOR OLA
System Memory Map
Bit 31 30 29 28 27 26 25 Bit 24
0x00c5_0014
0x00c5_0015
0x00c5_0016
0x00c5_0017
Normal Interrupt Pending
Register (NIPR)
See page 164.
Read: NIP31 NIP30 NIP29 NIP28 NIP27 NIP26 NIP25 NIP24
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: NIP23 NIP22 NIP21 NIP20 NIP19 NIP18 NIP17 NIP16
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: NIP15 NIP14 NIP13 NIP12 NIP11 NIP10 NIP9 NIP8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: NIP7 NIP6 NIP5 NIP4 NIP3 NIP2 NIP1 NIP0
Write:
Reset:00000000
Bit 31 30 29 28 27 26 25 Bit 24
0x00c5_0018
0x00c5_0019
0x00c5_001a
0x00c5_001b
Fast Interrupt Enable
Register (FIER)
See page 165.
Read: FIE31 FIE30 FIE29 FIE28 FIE27 FIE26 FIE25 FIE24
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: FIE23 FIE22 FIE21 FIE20 FIE19 FIE18 FIE17 FIE16
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: FIE15 FIE14 FIE13 FIE12 FIE11 FIE10 FIE9 FIE8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: FIE7 FIE6 FIE5 FIE4 FIE3 FIE2 FIE1 FIE0
Write:
Reset:00000000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 15 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 69
Bit 31 30 29 28 27 26 25 Bit 24
0x00c5_001c
0x00c5_001d
0x00c5_001e
0x00c5_001f
Fast Interrupt Pending
Register (FIPR)
See page 166.
Read: FIP31 FIP30 FIP29 FIP28 FIP27 FIP26 FIP25 FIP24
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: FIP23 FIP22 FIP21 FIP20 FIP19 FIP18 FIP17 FIP16
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: FIP15 FIP14 FIP13 FIP12 FIP11 FIP10 FIP9 FIP8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: FIP7 FIP6 FIP5 FIP4 FIP3 FIP2 FIP1 FIP0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c5_0040
through
0x00c5_0067
Priority Level Select
Registers
(PLSR39PLSR0)
See page 167.
Read: 0 0 0 PLS4 PLS3 PLS2 PLS1 PLS0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c5_0068
0x00c5_007f Unimplemented Access results in the module generating an access termination transfer error .
Bit 7654321Bit 0
0x00c5_0080
0x00c5_ffff Unimplemented Access results in a bus monitor timeout generating an access t ermination transfer error.
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 16 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
70 System Memory Map MOTOR OLA
System Memory Map
Edge Port (EPORT)
Bit 15 14 13 12 11 10 9 Bit 8
0x00c6_0000
0x00c6_0001 EPORT Pin Assignmen t
Register (EPPAR)
See page 264.
Read: EPPA7 EPPA6 EPPA5 EPPA4
Write:
Reset:00000000
Bit 7654321Bit 0
Read: EPPA3 EPPA2 EPPA1 EPPA0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c6_0002 EPORT Data Direction
Register (EPDDR)
See page 266.
Read: EPDD7 EPDD6 EPDD5 EPDD4 EPDD3 EPDD2 EPDD1 EPDD0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c6_0003 EPORT Port Inte rru pt
Enable Register (EPIER)
See page 267.
Read: EPIE7 EPIE6 EPIE5 EPIE4 EPIE3 EPIE2 EPIE1 EPIE0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c6_0004 EPORT Port Data
Register (EPDR)
See page 268.
Read: EPD7 EPD6 EPD5 EPD4 EPD3 EPD2 EPD1 EPD0
Write:
Reset:11111111
Bit 7654321Bit 0
0x00c6_0005 EP ORT Port Pin Data
Register (EPPDR)
See page 268.
Read: EPPD7 EPPD6 EPPD5 EPPD4 EPPD3 EPPD2 EPPD1 EPPD0
Write:
Reset: P PPPPPPP
Bit 7654321Bit 0
0x00c6_0006 EPORT Port Flag Regiser
(EPFR)
See page 269.
Read: EPF7 EPF6 EPF5 EPF4 EPF3 EPF2 EPF1 EPF0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c6_0007 Reserved Writes have no effect, reads ret urn 0s, and the ac cess terminates
without a transfer er ror exception.
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 17 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 71
Bit 7654321Bit 0
0x00c6_0008
0x00c6_ffff Unimplemented Access results in a bus monitor timeout generating an access t ermination transfer error.
Watc hdog Timer (WDT)
Bit 15 14 13 12 11 10 9 Bit 8
0x00c7_0000
0x00c7_0001 Watchdog Control
Register (WCR)
See page 275.
Read: 0 0 0 0 0 0 0 0
Write:
Reset:00000000
Bit 7654321Bit 0
Read: 0 0 0 0 WAIT DOZE DBG EN
Write:
Reset:00001111
Bit 15 14 13 12 11 10 9 Bit 8
0x00c7_0002
0x00c7_0003 Watchdog Modulus
Register (WMR)
See page 277.
Read: WM15 WM14 WM13 WM12 WM11 WM10 WM9 WM8
Write:
Reset:11111111
Bit 7654321Bit 0
Read: WM7 WM6 WM5 WM4 WM3 WM2 WM1 WM0
Write:
Reset:11111111
Bit 15 14 13 12 11 10 9 Bit 8
0x00c7_0004
0x00c7_0005 Watchdog Count Register
(WCNTR)
See page 278.
Read: WC15 WC14 WC13 WC12 WC11 WC10 WC9 WC8
Write:
Reset:11111111
Bit 7654321Bit 0
Read: WC7 WC6 WC5 WC4 WC3 WC2 WC1 WC0
Write:
Reset:11111111
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 18 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
72 System Memory Map MOTOR OLA
System Memory Map
Bit 15 14 13 12 11 10 9 Bit 8
0x00c7_0006
0x00c7_0007 Watchdog Service
Register (WSR)
See page 279.
Read: WS15 WS14 WS13 WS12 WS11 WS10 WS9 WS8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: WS7 WS6 WS5 WS4 WS3 WS2 WS1 WS0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00c7_0008
0x00c7_ffff Unimplemented Access results in a bus monitor timeout generating an access t ermination transfer error.
Progr a m mable Inter rupt Timer 1 (PI T1 ) and Programmi ng Interrupt Timer 2 (PIT2 )
Note: Addresses for PIT1 are at 0x00c8_#### and addresses for PIT2 are at 0x00c9_####.
Bit 15 14 13 12 11 10 9 Bit 8
0x00c8_0000
0x00c8_0001
0x00c9_0000
0x00c9_0001
PIT Control and Status
Register (PCSR)
See page 285.
Read: 0 0 0 0 PRE3 PRE2 PRE1 PRE0
Write:
Reset:00000000
Bit 7654321Bit 0
Read: 0 PDOZE PDBG OVW PIE PIF RLD EN
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
0x00c8_0002
0x00c8_0003
0x00c9_0002
0x00c9_0003
PIT Modulus Register
(PMR)
See page 288.
Read: PM15 PM14 PM13 PM12 PM11 PM10 PM9 PM8
Write:
Reset:11111111
Bit 7654321Bit 0
Read: PM7 PM6 PM5 PM4 PM3 PM2 PM1 PM0
Write:
Reset:11111111
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 19 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 73
Bit 15 14 13 12 11 10 9 Bit 8
0x00c8_0004
0x00c8_0005
0x00c9_0004
0x00c9_0005
PIT Count Register
(PCNTR)
See page 289.
Read: PC15 PC14 PC13 PC12 PC11 PC10 PC9 PC8
Write:
Reset:11111111
Bit 7654321Bit 0
Read: PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0
Write:
Reset:11111111
Bit 7654321Bit 0
0x00c8_0006
0x00c8_0007 Unimplemented Access results in the mo dule generating an a ccess termination transfer error.
Bit 7654321Bit 0
0x00ca_0008
0x00ca_ffff Unimplemented Access results in a bus monitor timeout generating an access t ermination transfer error.
Queued Analog-to-D igital Converter (QADC)
Bit 15 14 13 12 11 10 9 Bit 8
0x00ca_0000
0x00ca_0001 QADC Module
Configuration Register
(QADCMCR)
See page 411.
Read: QSTOP QDBG 000000
Write:
Reset:00000000
Bit 7654321Bit 0
Read: SUPV 0000000
Write:
Reset:10000000
Bit 15 14 13 12 11 10 9 Bit 8
0x00ca_0002
0x00ca_0003 QADC Test Register
(QADCTEST)
See page 412.
Access results in the module generating an access termination transfer error if not in test mode.
Bit 7654321Bit 0
Access results in the module generating an access termination transfer error if not in test mode.
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 20 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
74 System Memory Map MOTOR OLA
System Memory Map
0x00ca_0004
0x00ca_0005 Reser ved Writes have no effect, reads ret urn 0s, and the access t erminates
without a transfer er ror exception.
Bit 7654321Bit 0
Writes have no effect, reads return 0s, and the access t erminates
without a transfer er ror exception.
Bit 7654321Bit 0
0x00ca_0006 QA DC Port A D ata
Register (PORTQA)
See page 413.
Read: 0 0 0 PQA4 PQA3 0PQA1 PQA0
Write:
Reset: 0 0 0 P P 0 P P
Bit 7654321Bit 0
0x00ca_0007 QA DC Port B D ata
Register (PORTQB)
See page 413.
Read: 0 0 0 0 PQB3 PQB2 PQB1 PQB0
Write:
Reset:0000PPPP
Bit 15 14 13 12 11 10 9 Bit 8
0x00ca_0008
0x00ca_0009 QA DC Port A D ata
Direction Register
(DDRQA)
See page 415.
Read: 0 0 0 DDQA4 DDQA3 0DDQA1 DDQA0
Write:
Reset:00000000
Bit 7654321Bit 0
Read: 0 0 0 0 0 0 0 0
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
0x00ca_000a
0x00ca_000b QADC Control Regis ter 0
(QACR0)
See page 416.
Read: MUX 00
TRG 000
PSH8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: PSH7 PSH6 PSH5 PSH4 PSA PSL2 PSL1 PSL0
Write:
Reset:00110111
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 21 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 75
Bit 15 14 13 12 11 10 9 Bit 8
0x00ca_000c
0x00ca_000d QADC Control Regis ter 1
(QACR1)
See page 419.
Read: CIE1 PIE1 0MQ112 MQ111 MQ110 MQ19 MQ18
Write: SSE1
Reset:00000000
Bit 7654321Bit 0
Read: 0 0 0 0 0 0 0 0
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
0x00ca_000e
0x00ca_000f QA DC Control Regis ter 2
(QACR2)
See page 422.
Read: CIE2 PIE2 0MQ212 MQ211 MQ210 MQ29 MQ28
Write: SSE2
Reset:00000000
Bit 7654321Bit 0
Read: RESUME BQ26 BQ25 BQ24 BQ23 BQ22 BQ21 BQ20
Write:
Reset:01111111
Bit 15 14 13 12 11 10 9 Bit 8
0x00ca_0010
0x00ca_0011 QADC Status Register 0
(QASR0)
See page 427.
Read: CF1 PF1 CF2 PF2 TOR1 TOR2 QS9 QS8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: QS7 QS6 CWP5 CWP4 CWP3 CWP2 CWP1 CWP0
Write:
Reset:00000000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 22 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
76 System Memory Map MOTOR OLA
System Memory Map
Bit 15 14 13 12 11 10 9 Bit 8
0x00ca_0012
0x00ca_0013 QADC Status Register 1
(QASR1)
See page 436.
Read: 0 0 CWPQ15 CWPQ14 CWPQ13 CWPQ12 CWPQ11 CWPQ10
Write:
Reset:00111111
Bit 7654321Bit 0
Read: 0 0 CWPQ25 CWPQ24 CWPQ23 CWPQ22 CWPQ21 CWPQ20
Write:
Reset:00111111
Bit 7654321Bit 0
0x00ca_0014
0x00ca_01ff Reserved Writes have no e ffect, reads return 0s, and t he access terminates
without a transfer er ror exception.
Bit 15 14 13 12 11 10 9 Bit 8
0x00ca_0200
0x00ca_027e Conversion Command
Word Register
(CCW)
See page 437.
Read: 0 0 0 0 0 0 PBYP
Write:
Reset:000000UU
Bit 7654321Bit 0
Read: IST1 IST0 CHAN5 CHAN4 CHAN3 CHAN2 CHAN1 CHAN0
Write:
Reset:UUUUUUUU
Bit 15 14 13 12 11 10 9 Bit 8
0x00ca_0280
0x00ca_02fe Right-Justified Unsigned
Result Register (RJURR)
See page 441.
Read: 0 0 0 0 0 0 RESULT
Write:
Reset:000000
Bit 7654321Bit 0
Read: RESULT
Write:
Reset:
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 23 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 77
Bit 15 14 13 12 11 10 9 Bit 8
0x00ca_0300
0x00ca_037e Left-Justified Signed
Result Register (LJSRR)
See page 442.
Read: SRESULT
Write:
Reset:
Bit 7654321Bit 0
Read: RESULT 000000
Write:
Reset: 000000
Bit 15 14 13 12 11 10 9 Bit 8
0x00ca_0380
0x00ca_03fe Left-Justified Unsigned
Result Register (LJURR)
See page 442.
Read: RESULT
Write:
Reset:
Bit 7654321Bit 0
Read: RESULT 000000
Write:
Reset: 000000
Bit 7654321Bit 0
0x00ca_0400
0x00ca_ffff Unimplemented Access results in a bus monitor timeout generating an access t ermination transfer error.
Serial Peripheral Interface (SPI)
Bit 7654321Bit 0
0x00cb_0000 SPI Control Regis ter 1
(SPICR1)
See page 376.
Read: SPIE SPE SWOM MSTR CPOL CPHA SSOE LSBFE
Write:
Reset:00000100
Bit 7654321Bit 0
0x00cb_0001 SPI Control Regis ter 2
(SPICR2)
See page 378.
Read: 0 0 0 0 0 0 SPISDOZ SPC0
Write:
Reset:00000000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 24 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
78 System Memory Map MOTOR OLA
System Memory Map
Bit 7654321Bit 0
0x00cb_0002 SPI Baud Rate Register
(SPIBR)
See page 379.
Read: 0 SPPR6 SPPR5 SPPR4 0SPR2 SPR1 SPR0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00cb_0003 SPI Status Register
(SPISR)
See page 381.
Read: SPIF WCOL 0 MODF 0 0 0 0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00cb_0004 Reserved Writes have no effect, reads return 0s, and the access terminates
without a transfer er ror exception.
Bit 7654321Bit 0
0x00cb_0005 SPI Data Register
(SPIDR)
See page 382.
Read: Bit 7654321Bit 0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00cb_0006
SPI Pullup and Reduced
Drive Register
(SPIPURD)
See page 383.
Read: 0 0 RSVD5 RDPSP 00
RSVD1 PUPSP
Write:
Reset:00000000
Bit 7654321Bit 0
0x00cb_0007 SPI Port Data Register
(SPIPORT)
See page 384.
Read: RSVD7 RSVD6 RSVD5 RSVD4 PORTSP3 PORTSP2 PORTSP1 PORTSP0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00cb_0008 SPI Port Data D i rectio n
Register (SPIDDR)
See page 385.
Read: RSVD7 RSVD6 RSVD5 RSVD4 DDRSP3 DDRSP2 DDRSP1 DDRSP0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00cb_0009
0x00cb_000f Reserved Writes have no effect, reads ret urn 0s, and the access t erminates
without a transfer er ror exception.
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 25 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 79
Bit 7654321Bit 0
0x00cb_0010
0x00cb_ffff Unimplemented Access results in a bus monitor timeout generating an access t ermination transfer error.
Serial Communications Interface 1 (SCI1) and Serial Communications Interface 2 (SCI2)
Note: Addresses for SCI1 are at 0x00c c_### # and addresses for S CI 2 are at 0x 00cd_# ###.
Bit 7654321Bit 0
0x00cc_0000
0x00cd_0000
SCI Baud Rate
Register High (SCIBDH)
See page 336.
Read: 0 0 0 SBR12 SBR11 SBR10 SBR9 SBR8
Write:
Reset:00000000
Bit 7654321Bit 0
0x00cc_0001
0x00cd_0001
SCI Baud Rate
Register Low (SCIBDL)
See page 336.
Read: SBR7 SBR6 SBR5 SBR4 SBR3 SBR2 SBR1 SBR0
Write:
Reset:00000100
Bit 7654321Bit 0
0x00cc_0002
0x00cd_0002
SCI Control Register 1
(SCICR1)
See page 337.
Read: LOOPS WOMS RSRC M WAKE ILT PE PT
Write:
Reset:00000000
Bit 7654321Bit 0
0x00cc_0003
0x00cd_0003
SCI Control Register 2
(SCICR2)
See page 340.
Read: TIE TCIE RIE ILIE TE RE RWU SBK
Write:
Reset:00000000
Bit 7654321Bit 0
0x00cc_0004
0x00cd_0004
SCI Status Register 1
(SCISR1)
See page 342.
Read: TDRE TC RDRF IDLE OR NF FE PF
Write:
Reset:11000000
Bit 7654321Bit 0
0x00cc_0005
0x00cd_0005
SCI Status Register 2
(SCISR2)
See page 344.
Read: 0 0 0 0 0 0 0 RAF
Write:
Reset:00000000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 26 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
80 System Memory Map MOTOR OLA
System Memory Map
Bit 7654321Bit 0
0x00cc_0006
0x00cd_0006
SCI Data Register High
(SCIDRH)
See page 345.
Read: R8 T8 000000
Write:
Reset:00000000
Bit 7654321Bit 0
0x00cc_0007
0x00cd_0007
SCI Data Register Low
(SCIDRL)
See page 345.
Read: R7 R6 R5 R4 R3 R2 R1 R0
Write: T7 T6 T5 T4 T3 T2 T1 T0
Reset:00000000
Bit 7654321Bit 0
0x00cc_0008
0x00cd_0008
SCI Pullup and Reduced
Drive Register
(SCIPURD)
See page 346.
Read: SCISDOZ 0RSVD5 RDPSCI 00
RSVD1 PUPSCI
Write:
Reset:00000000
Bit 7654321Bit 0
0x00cc_0009
0x00cd_0009
SCI Port Data Register
(SCIPORT)
See page 347.
Read: RSVD7 RSVD6 RSVD5 RSVD4 RSVD3 RSVD2 PORTSC1 PORTSC0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00cc_000a
0x00cd_000a
SCI Data Direction
Register (SCIDDR)
See page 348.
Read: RSVD7 RSVD6 RSVD5 RSVD4 RSVD3 RSVD2 DDRSC1 DDRSC0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00cc_000b
0x00cc_000f
0x00cd_000b
0x00cd_000f
Reserved Writes have no effect, reads return 0s, and the access t erminates
without a transfer er ror exception.
Bit 7654321Bit 0
0x00cc_0010
0x00cc_ffff
0x00cd_0010
0x00cd_ffff
Unimplemented A ccess results in a bus monitor timeout generating an access t ermination transfer error.
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 27 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 81
Timer 1 (TIM1) and Tim er 2 (TIM2)
Note: Addresses for TIM1 are at 0x00ce_#### and addresses for TIM2 ar e at 0x00cf_####.
Bit 7654321Bit 0
0x00ce_0000
0x00cf_0000
Timer Input Capture/
Output Compare Select
Register (TIMIOS)
See page 300.
Read: 0 0 0 0 IOS3 IOS2 IOS1 IOS0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_0001
0x00cf_0001
Timer Compare Force
Register (TIMCFORC)
See page 301.
Read: 0 0 0 0 0 0 0 0
Write: FOC3 FOC2 FOC1 FOC0
Reset:00000000
Bit 7654321Bit 0
0x00ce_0002
0x00cf_0002
Timer Output Compare 3
Mask Register
(TIMOC3M)
See page 302.
Read: 0 0 0 0 OC3M3 OC3M2 OC3M1 OC3M0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_0003
0x00cf_0003
Timer Output Compare 3
Data Register (TIMOC3D)
See page 303.
Read: 0 0 0 0 OC3D3 OC3D2 OC3D1 OC3D0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_0004
0x00cf_0004
Timer Counter Register
High (TIMCNTH)
See page 304.
Read: Bit 15 14 13 12 11 10 9 Bit 8
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_0005
0x00cf_0005
Timer Counter Register
Low (TIMCNTL)
See page 304.
Read: Bit 7 6 5 4 3 2 1 Bit 0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_0006
0x00cf_0006
Timer System Control
Register 1 (TIMSCR1)
See page 305.
Read: TIMEN 00
TFFCA 0000
Write:
Reset:00000000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 28 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
82 System Memory Map MOTOR OLA
System Memory Map
Bit 7654321Bit 0
0x00ce_0007
0x00cf_0007 Reserved Writes have no effect, reads return 0s, and the access t erminates
without a transfer er ror exception.
Bit 7654321Bit 0
0x00ce_0008
0x00cf_0008
Timer Toggle on Overf low
Register (TIMTOV)
See page 306.
Read: 0 0 0 0 TOV3 TOV2 TOV1 TOV0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_0009
0x00cf_0009
Timer Control
Register 1 (TIMCTL1)
See page 307.
Read: OM3 OL3 OM2 OL2 OM1 OL1 OM0 OL0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_000a
0x00cf_000a Reserved Writes have no effect, reads return 0s, and the access t erminates
without a transfer er ror exception.
Bit 7654321Bit 0
0x00ce_000b
0x00cf_000b
Timer Control
Register 2 (TIMCTL2)
See page 308.
Read: EDG3B EDG3A EDG2B EDG2A EDG1B EDG1A EDG0B EDG10
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_000c
0x00cf_000c
Timer Interrupt Enable
Register (TIMIE)
See page 309.
Read: 0 0 0 0 C3I C2I C1I C0I
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_000d
0x00cf_000d
Timer System Control
Register 2 (TIMSCR2)
See page 310.
Read: TOI 0PUPT RDPT TCRE PR2 PR1 PR0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_000e
0x00cf_000e
Timer Flag Register 1
(TIMFLG1)
See page 312.
Read: 0 0 0 0 C3F C2F C1F C0F
Write:
Reset:00000000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 29 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 83
Bit 7654321Bit 0
0x00ce_000f
0x00cf_000f
Timer Flag Register 2
(TIMFLG2)
See page 313.
Read: TOF 0000000
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
0x00ce_0010
0x00cf_0010
Timer Channel 0 Register
High (TIMC0H)
See page 314.
Read: Bit 15 14 13 12 11 10 9 Bit 8
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_0011
0x00cf_0011
Timer Channel 0 Register
Low (TIMC0L)
See page 314.
Read: Bit 7654321Bit 0
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
0x00ce_0012
0x00cf_0012
Timer Channel 1 Register
High (TIMC1H)
See page 314.
Read: Bit 15 14 13 12 11 10 9 Bit 8
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_0013
0x00cf_0013
Timer Channel 1 Register
Low (TIMC1L)
See page 314.
Read: Bit 7654321Bit 0
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
0x00ce_0014
0x00cf_0014
Timer Channel 2 Register
High (TIMC2H)
See page 314.
Read: Bit 15 14 13 12 11 10 9 Bit 8
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_0015
0x00cf_0015
Timer Channel 2 Register
Low (TIMC2L)
See page 314.
Read: Bit 7654321Bit 0
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
0x00ce_0016
0x00cf_0016
Timer Channel 3 Register
High (TIMC3H)
See page 314.
Read: Bit 15 14 13 12 11 10 9 Bit 8
Write:
Reset:00000000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 30 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
84 System Memory Map MOTOR OLA
System Memory Map
Bit 7654321Bit 0
0x00ce_0017
0x00cf_0017
Timer Channel 3 Register
Low (TIMC3L)
See page 314.
Read: Bit 7654321Bit 0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_0018
0x00cf_0018
Pulse Accu mulat o r
Control Register
(TIMPACTL)
See page 315.
Read: 0 PAE PAMOD PEDGE CLK1 CLK0 PAOVI PAI
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_0019
0x00cf_0019
Pulse Accumulator Flag
Register (TIMPAFLG)
See page 317.
Read: 0 0 0 0 0 0 PAOVF PAIF
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
0x00ce_001a
0x00cf_001a
Pulse Accu mulat o r
Counter Register High
(TIMPACNTH)
See page 318.
Read: Bit 15 14 13 12 11 10 9 Bit 8
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_001b
0x00cf_001b
Pulse Accu mulat o r
Counter Register Low
(TIMPACNTL)
See page 318.
Read: Bit 7654321Bit 0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_001c
0x00cf_001c Reserved Writes have no e ffect, reads return 0s, and t he access terminates
without a transfer er ror exception.
Bit 7654321Bit 0
0x00ce_001d
0x00cf_001d
Timer Port Data Register
(TIMPORT)
See page 319.
Read: 0 0 0 0 PORTT3 PORTT2 PORTT1 PORTT0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_001e
0x00cf_001e
Time r Port D ata D ire ction
Register (TIMDDR)
See page 320.
Read: 0 0 0 0 DDRT3 DDRT2 DDRT1 DDRT0
Write:
Reset:00000000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 31 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 85
Bit 7654321Bit 0
0x00ce_001f
0x00cf_001f
Timer Test Register
(TIMTST)
See page 321.
Read: 0 0 0 0 0 0 0 0
Write:
Reset:00000000
Bit 7654321Bit 0
0x00ce_0020
0x00ce_ffff
0x00cf_0030
0x00cf_ffff
Unimplemented Access re sults in the mo dule generating an access termination transf er error.
Non-Volatile Mem ory FLASH (CMFR)
Bit 31 30 29 28 27 26 25 Bit 24
0x00d0_0000
0x00d0_0001
0x00d0_0002
0x00d0_0003
CMFR Module
Configuration Register
(CMFRMCR)
See page 188.
Read: FSTOP FDBG 0EME SIE LOCKCTL DIS RSVD24
Write:
Reset: 0 0 0 Note 1 0 0 Note 1 0
Bit 23 22 21 20 19 18 17 Bit 16
Read: SUPV7 SUPV6 SUPV5 SUPV4 SUPV3 SUPV2 SUPV1 SUPV0
Write:
Reset:11111111
Bit 15 14 13 12 11 10 9 Bit 8
Read: DATA7 DATA6 DATA5 DATA4 DATA3 DATA2 DATA1 DATA0
Write:
Reset:00000000
Bit 7654321Bit 0
Read: PROTECT7 PROTECT6 PROTECT5 PROTECT4 PROTECT3 PROTECT2 PROTECT1 PROTECT0
Write:
Reset:11111111
Notes:
1. Reset state is defined by reset override.
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 32 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
86 System Memory Map MOTOR OLA
System Memory Map
Bit 31 30 29 28 27 26 25 Bit 24
0x00d0_0004
0x00d0_0005
0x00d0_0006
0x00d0_0007
CMFR Module Test
Register (CMFRMTR)
See page 193.
Read: 0 0 0 0 0 0 0 0
Write:
Reset:
Bit 23 22 21 20 19 18 17 Bit 16
Read: 0 0 0 0 0 0 0 0
Write:
Reset:
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0 0 0 0 NVR PAWS2 PAWS1 PAWS0
Write:
Reset: 0000
Bit 7654321Bit 0
Read: 0 RSVD6 GDB 00000
Write:
Reset:00000000
Bit 31 30 29 28 27 26 25 Bit 24
0x00d0_0008
0x00d0_0009
0x00d0_000a
0x00d0_000b
CMFR High-Voltage
Control Register
(CMFRCTL)
See page 196.
Read: HVS 0SCLKR2 SCLKR1 SCLKR0 0CLKPE1 CLKPE0
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: 0 CLKPM6 CLKPM5 CLKPM4 CLKPM3 CLKPM2 CLKPM1 CLKPM0
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: BLOCK7 BLOCK6 BLOCK5 BLOCK4 BLOCK3 BLOCK2 BLOCK1 BLOCK0
Write:
Reset:00000000
Bit 7654321Bit 0
Read: 0 RSVD6 100
ERASE SES EHV
Write:
Reset:00100000
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 33 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
System Memory Map
Register Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA System Mem ory Map 87
Bit 7654321Bit 0
0x00d0_000c
0x00d0_001c Unim plemented Access results in the mo dule generating an a ccess termination transfer error.
Bit 7654321Bit 0
0x00d0_001d
0x7fff_ffff Unimplemented Access results in a bus monitor timeout generating an access termination tra nsfer error.
Address Register Name Bit Number
P = Current pin state U = Unaf fected = Writes have no effect and the access terminates without a transfer error exception.
Figure 2-2. Register Summary (Sheet 34 of 34)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
88 System Memory Map MOTOR OLA
System Memory Map
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Chip Configurat ion Module (CCM) 89
Technical Data MMC2107
Section 3. Chip Configuration Module (CCM)
3.1 Contents
3.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90
3.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90
3.4 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90
3.4.1 Master Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
3.4.2 Single-Chip Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
3.4.3 Emulation Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
3.4.4 Factory Access Slave Test (FAST) Mode . . . . . . . . . . . . . .91
3.5 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92
3.6 Signal Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92
3.7 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . . .93
3.7.1 Programming Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .93
3.7.2 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94
3.7.3 Register Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94
3.7.3.1 Chip Configuration Register. . . . . . . . . . . . . . . . . . . . . . .94
3.7.3.2 Reset Configuration Register. . . . . . . . . . . . . . . . . . . . . .9 7
3.7.3.3 Chip Identification Register . . . . . . . . . . . . . . . . . . . . . . .99
3.7.3.4 Chip T est Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100
3.8 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100
3.8.1 Reset Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101
3.8.2 Chip Mode Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103
3.8.3 Boot Device Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . .103
3.8.4 Output Pad Strength Configuration . . . . . . . . . . . . . . . . . .105
3.8.5 Clock Mode Selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . .105
3.8.6 Internal FLASH Configuration . . . . . . . . . . . . . . . . . . . . . .106
3.9 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106
3.10 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
90 Chi p C onfiguration Mo dule (CCM) MOTOROLA
Chip Configuration Module (CC M)
3.2 Introduction
The chip configuration module (CCM) controls the chip configuration and
mode of operation.
3.3 Featur es
The CCM performs these operations.
Selects the chip operating mode:
Master mode
Single-chip mode
Emulation mode
Factory access slave test (FAST) mode for factory test only
Selects external clock or phase-lock loop (PLL) mode with internal
or external reference
Selects output pad strength
Selects boot device
Selects module configuration
Selects bus monitor configuration
3.4 Mo des of Operation
The CCM configures the chip for four modes of operation:
Master mode
Single-chip mode
Emulation mode
FAST mode for factory test only
The operating mode is determined at reset and cannot be changed
thereafter.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Chip Configuration Module (CCM)
Modes of Op eration
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Chip Configurat ion Module (CCM) 91
3.4.1 Master Mode
In master mode, the internal central processor unit (CPU) can access
external memories and peripherals. Full master mode functionality
requires the bonding out of the optional pins. The external bus consists
of a 32-bit data bus and 23 address lines. Available bus control signals
include R/W, TC[2:0], TSIZ[1:0], TA, TEA, OE, and EB[3:0]. Up to four
chip selects can be programmed to select and control external de vices
and to provide bus cycle termination. When interfacing to 16-bit ports,
the ports C and D pins and EB[3:2] can be configured as
general-purpose input/output (I/O).
3.4.2 Single-Chip Mode
In si ngle-chip m ode, all memory is internal to the chip . External bus pins
are configured as digital I/O.
3.4.3 Emulation Mode
Emulation mode supports external port replacement logic. All ports are
emulated and all primary pin functions are enabled. Since the full
external bus must be visible to support the external port replacement
logic, the emulation mode pin configuration resembles master mode.
Full emulation mod e functionality requires bonding out the optional pins.
Emula tion mode chi p selects are provide d to give addition al informati on
about the bus cycle. Also, the signal SHS is provided as a strobe for
capturing addresses and data during show cycles.
3.4.4 Factory Access Slave Test (FAST) Mode
FAST mode is for factory test only.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
92 Chi p C onfiguration Mo dule (CCM) MOTOROLA
Chip Configuration Module (CC M)
3.5 Block Diagram
Figure 3-1. Ch ip Configuration Module Block Diagram
3.6 Signal Descriptions
Table 3-1 provides an overview of the CCM signals. For more detailed
information, refer to Section 4. Signal Description.
RESET
CHIP MODE
SELECTION
BOOT DEVICE
SELECTION
OU T PUT PAD
STRENGTH SELE CTI ON
CLOCK MO DE
SELECTION
MODULE
CONFIGURATION
CONFIGURATION
RESET CONFIGURATION REGISTER
CHIP CO NFIGURA TIO N RE G IS TE R
CHIP IDENTIFICATION REGISTER
CHIP TEST R EGI STER
Table 3-1. Signal Properties
Name Function Reset State
RCON Reset configuration select Internal weak pullup device
VDDSYN Clock mode select
D[31:16] Res et configuration overrides
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Chip Configuration Module (CCM)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Chip Configurat ion Module (CCM) 93
3.7 Memory Map and Registers
This subsection provides a description of the memory map and registers.
3.7.1 Programming Model
The CCM programming model consists of these registers:
The chip configuration register (CCR) controls the main chip
configuration.
The reset configuration register (RCON) indicates the default chip
configuration.
The chip identification register (CIR) contains a unique part
number.
The chip test register (CTR) contains chip-specific test functions.
Some control register bits are implemented as write-once bits. These
bits are always readable, but once the bit has been w ritten, additional
writes have no effect, except during debug mode and test operations.
Some write-once bits and test bits can be read and written while in debug
mode or test mode. When debug or test mode is exited, the chip
configuration module resumes operation based on the current register
valu es. If a write to a wr ite-once r egister bit occurs whi le in debug or test
mode, the re gister bit rem ains writable on exit from debug or t est mode.
Table 3-2 sho ws th e accessibility of write-once bits.
Table 3-2. Write-Once Bits Read/Write Accessibility
Configuration Read/Write Access
All configurations Read-always
Debug operation (all modes) Write-alway s
Test operation (all modes) Write-always
Master mode Write-once
Single-chip mode Write-once
FAST mode Write-once
Emulation mode Write-once
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
94 Chi p C onfiguration Mo dule (CCM) MOTOROLA
Chip Configuration Module (CC M)
3.7.2 Memory Map
3.7.3 Register Descriptions
The following subsection describes the CCM registers.
3.7.3.1 Chip Configuration Register
Table 3-3. Chip Configur ation Module Memory Map
Address Bits 3116 Bi ts 150 Access(1)
0x00c1_0000 Chip configuration register (CCR) Reserved(2) S
0x0 0 c1 _0004 Reset configuration register (RCON) Chip identification register (CIR ) S
0x00c1_0008 Chip test register (CTR) Reserved(2) S
0x00c1_000c Unimplemented(3)
1. S = CPU supervisor mode access only. User mode accesses to supervisor only addresses have no effect and result in a
cycle termina ti on transfer error.
2. Writing to reserved addresses has no effect; reading ret urns 0s.
3. Accessi ng an unimplemented address has no effect and causes a cycle terminati on transfer error.
Address: 0x00 c1_0000 and 0x00c1_0001
Bit 15 14 13 12 11 10 9 Bit 8
Read: LOAD 0SHEN EMINT 0 MODE2 MODE1 MODE0
Write:
Reset: Note 1 0 Note 2 Note 2 0 Note 1 Note 1 Note 1
Bit 7654321Bit 0
Read: 0 SZEN PSTEN SHINT BME BMD BMT1 BMT0
Write:
Reset:0Note 3Note 201000
= Writes have no effect and the access terminates without a transfer error exception.
Notes:
1. Determined during reset configuration
2. 0 for all configurati ons e xcept emulation m ode, 1 for emul ation mode
3. 0 for all configurati ons e xcept emulation and m aster modes, 1 for em ulation and master
modes
Figure 3-2. Chip Configuration Register (CCR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Chip Configuration Module (CCM)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Chip Configurat ion Module (CCM) 95
LOAD Pad Driver Load Bit
The LOAD bit selects full or default drive strength for selected pad
output drivers. For maximum capacitive load, set the LOAD bit to
select full drive strength. For reduced power consumption, clear the
LOAD bit to select default drive strength.
1 = Full drive strength
0 = Default drive strength
Table 3-2 shows th e read/write accessibility of this write-once bit.
SHEN Show Cycle Enable Bit
The SHEN bit enables the external memory interface to drive the
external bus during internal transfer operations.
1 = Show cycles enabled
0 = Show cycles disabled
In emul ation mod e, the SHE N bit is rea d-only. In all other mo des, it is
a read/w rite bit.
EMINT Emulate Internal Address Space Bit
The EMINT bit enables chip select 1 (CS1) to decode the internal
memory address space.
1 = CS1 decodes internal memory address space.
0 = CS1 decodes external memory address space.
The EMINT bit is read-always but can be wr itten only in emulation
mode.
MODE[2:0] Chip Configuration Mode Field
This read-onl y field refl ects the chip configuration mode, as shown in
Table 3-4.
Table 3-4. Chip Configuration Mode Selection
MODE[2:0] Chip Configuration Mode
111 Master mode
110 Sing le-chip mode
10X FAST mode
0XX Em ulation mode
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
96 Chi p C onfiguration Mo dule (CCM) MOTOROLA
Chip Configuration Module (CC M)
SZEN TSIZ[1:0] Enable Bits
This rea d/write bit ena bles the TSIZ[1:0] f u nction o f the e xterna l pins.
1 = TSIZ[1:0] function enabled
0 = TSIZ[1:0] function disabled
PSTEN PSTAT[3:0] Signal Enable Bits
This read/write bit enables the PSTAT[3:0] function of the external
pins.
1 = PSTAT[3:0] function enabled
0 = PSTAT[3:0] function disabled
SHINT Show Interrupt Bit
The SHINT bit allows visibility to any active interrupt request to the
processor. If the SHINT bit i s set, the RSTOUT pin is the OR of the
fast and normal interrupt signals.
1 = Internal requests reflected on RSTOUT pin
0 = Normal RSTOUT pin function
The SHINT bit is read/write always.
NOTE: The FRCRSTOUT function in the reset controller has a higher priority
than the SHINT function.
BME Bus Monitor External Enable Bit
The BME bit enables the bus monitor to operate during external bus
cycles.
1 = Bus monitor enabled on external bus cycles
0 = Bus monitor disabled on external bus cycles
Table 3-2 shows th e read/write accessibility of this write-once bit.
BMD Bus Monitor Debug Mode Bit
The BMD bit controls how the bus monitor responds during debug
mode.
1 = Bus monitor enabled in debug mode
0 = Bus monitor disabled in debug mode
This bit is read/write always.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Chip Configuration Module (CCM)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Chip Configurat ion Module (CCM) 97
BMT[1:0] Bus Monitor Timing Field
The BM T field sele cts the timeout time for the bus monito r as shown
in Table 3-5.
Table 3-2 shows th e read/write accessibility of these write-once bits.
3.7.3.2 Reset Configuration Register
The reset configuration register (RCON) is a read-only register; writing
to RCON has no effect. At reset, RCON determines the default operation
of certain chip functions. All default functions defined by the RCON
valu es may be overr idden du ri ng re set config uratio n onl y if the exte rnal
RCON pin is asserted.
Table 3-5. Bus Monitor Timeout Values
BMT[1:0] Timeout Period
(in Sy stem C locks)
00 64
01 32
10 16
11 8
Address: 0x00c1_0004 and 0x00c1_0005
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0 0 000000
Write:
Reset:00000000
Bit 7654321Bit 0
Read: 1
RPLLSEL 1
RPLLREF 0
RLOAD 01
BOOTPS 0
BOOTSEL 00
MODE
Write:
Reset:11001000
= Writes have no effect and the access terminates without a transfer error exception.
Figu re 3-3. Re set Conf igu ra tio n Regi ste r (RCO N)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
98 Chi p C onfiguration Mo dule (CCM) MOTOROLA
Chip Configuration Module (CC M)
RPLLSEL PLL Mode Select Bit
When the PLL is enabled, the read-only RPLLSEL bit reflects the
default PLL mode.
1 = No rma l PLL mode
0 = 1:1 PLL mode
The default PLL mode can be overridden during reset configuration.
If the default mod e is o verr id den, the PLLSEL b i t in t he clock mod ul e
SYNSR reflects the PLL mode.
RPLLREF PLL Reference Bit
When the PLL is enabled in normal PLL mode, the read-only
RPLLREF bit reflects the default PLL reference.
1 = Crystal oscillator is PLL reference.
0 = External clock is PLL reference .
The default PLL reference can be overridden during reset
configuration. If the default mode is overridden, the PLLREF bit in the
clock module SYNSR reflects the PLL reference.
RLOAD Pad Driver Load Bit
The read-only RLOAD bit reflects the pad driver strength
configuration.
1 = Full drive strength
0 = Default drive strength
The default function of the pad driver strength can be overridden
during reset configuration. If the default mode is overridden, the
LOAD bit i n CCR reflects the pad driver strength configuration.
BOOTPS Boot Port Size Bit
If the boot device is co nfigured to be external, the read-only BOOTPS
bit reflects the default selection for the boot port size.
1 = Boot device uses 32-bit port.
0 = Boot device uses 16-bit port.
The default function of the boot port size can be overridden during
reset configuration. If the default mode is overridden, the PS bit in
CSCR0 reflects the boot device port size configuration.
BOOTSEL Boot Select Bit
This read-only bit reflects the default selection for the boot device.
1 = Boot from external boot device
0 = Boot from internal boot device
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Chip Configuration Module (CCM)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Chip Configurat ion Module (CCM) 99
The de fault functi on of the b oot select can b e overridde n during r eset
configuration. If the default mode is overridden, the CSEN bit in
CSCR0 bit reflects the boot device configuration.
MODE Chip Conf iguration Mode Bit
The read -onl y MODE bi t reflects the de fault chip confi gur ation mo de.
1 = Master mode
0 = Single-chip mode
The defa ult mode can be over ridden during reset con figura tion. If the
default mode is ov errid den, the MODE0 bit in CCR reflects the mode
configuration.
3.7.3.3 Chip Identification Register
The chip identification register (CIR) is a read-only register; writing to
CIR has no effect.
PIN[7:0] Part Identification Number Field
This read-only field contains a unique identification number for the
part.
PRN[7:0] Part Revision Number Fi eld
This read-only field contains the full-layer mask revision number. This
number is increased by one for each new full-layer mask set of this
part. The revision numbers are assigned in chronological order.
Address: 0x00 c1_0006 and 0x00c1_0007
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0
PIN7 0
PIN6 0
PIN5 1
PIN4 0
PIN3 1
PIN2 1
PIN1 1
PIN0
Write:
Reset:00010111
Bit 7654321Bit 0
Read: 0
PRN7 0
PRN6 0
PRN5 0
PRN4 0
PRN3 0
PRN2 0
PRN1 0
PRN0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 3-4. Chip Identification Register (CIR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
100 Chip Configurat ion Module (CCM ) MOTOR OLA
Chip Configuration Module (CC M)
3.7.3.4 Chip Test Register
The chip test register (CTR) is reserved for factory testing.
NOTE: To safeg uard agai nst uninte ntionally ac tivating te st logic, write $0000 to
the lock-out test features. Setting any bit in CTR may lead to
unpredictable results.
3.8 Functional D escription
Six functions are defined within the chip configuration module:
1. Reset configuration
2. Chip mode selection
3. Boot devi ce selection
4. Output pad strength configuration
5. Clock mode selection
6. Module configuration
These functions are described here.
Address: 0x00 c1_0008 and 0x00c1_0009
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0 0 000000
Write:
Reset:00000000
Bit 7654321Bit 0
Read: 0 0 000000
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 3-5. Chip Test Register (CTR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Chip Configuration Module (CCM)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Chip Configurat ion Module (CCM) 101
3.8.1 Reset Configuration
During reset, the pins for the reset override functions are immediately
configured to known states, even if the clock source is not present.
Table 3-6 shows the states of the external pins while in reset.
If the RCON pin is not asse rted du ri ng re set, the chip con fi gura tion and
the reset configuration pin functions after reset are determined by RCON
or fixed defaults, regardless of the states of the external data pins. The
internal configurat ion signals are driven to levels specified by the RCON
registers reset state for default module configuration.
If the external RCON pin is asserted during reset, then various chip
functi ons, includi n g the reset configura ti on pin functio ns after re set, are
configured according to the levels driven onto the external data pins.
(See Table 3-7.) The internal configurati on signals are driven to reflect
the levels on the external configuration pins to allow for module
configuration.
Table 3-6. Reset Configuration Pin Stat es During Reset
Pin Pin
Function(1)
1. If the external RCON pin is not asser ted duri ng reset, pin functions are deter m ined by th e
default operation mode defined in the RCON register. If the external RCON pin is asserted,
pin functions are determine d by the chi p operation mode defi ned by the override values
driven on the external data bus pins.
I/O Output
State Input
State
D[28, 26, 23:21, 19:16],
PA[4 , 2], PB[7:5, 3:0] Digital I/O or prim ary
function Input Mus t be driven
by external logic
RCON RCON function for all
modes(2)
2. Dur ing res et, the ex ternal RCON pin ass umes its RCON p in func tion, but th is pin chang es
to t he funct ion def ined by the chip oper atio n mode i mmediate ly aft er res et. See Table 3-7.
Input Internal weak
pullup device
VDDSYN Not affected Input Must be driven by
external logic
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
102 Chip Configurat ion Module (CCM ) MOTOR OLA
Chip Configuration Module (CC M)
Table 3 -7. Configuration During Reset(1)
Pin(s) Affected Default
Configuration Override Pin s
in Reset(2),(3) Function
D[31:0], SHS, TA, TEA,
CSE[1:0], TC[2:0], OE,
A[22:0], EB[3:0] , CS[3:0 ]
VDD, VDD,
RCON0
D[26,17:16] Chip Mode Selected
111 Master mode
110 Sin gle-chip mode
10X FAST mode
0XX Emulation mode
CS[1:0] RCON[3:2]
D [19:18] Boot Device
X0 Internal with 32-bit po rt
01 External with 16-bit port
11 External with 32-bit port
All output pins RCON5
D21 Ou tput P ad D ri v e Strengt h
0 D efault strength
1 Full strength
Clock mode VDDSYN,
RCON[7:6]
VDDSYN, D[23:22] Clock Mode
0XX Ext ernal clock mode (PLL disabled )
10X 1:1 PLL mod e
110 N ormal PLL mode with external clock reference
111 N ormal PLL mode w/crystal oscillator reference
Internal FLASH
configuration VDD
D28 Modul e Confi gu r at i on
1 Internal FL ASH enabled
0 Internal FL ASH disabled
1. Modif ying the defa ult configura ti ons is possible only if the exter nal RCON pin is asserted.
2. The D[31:29, 27, 25:24 , 20, 15:0] pins do not af fect reset configuration.
3. The external reset override circuitry drives the data bus pins wit h the override values while RSTOUT is asserted. It must
stop dr iving t he data bu s p ins wi thin one CLKO UT cyc le after RST OUT is negat ed. To preven t content ion wi th t he exter nal
reset override circuitry, the reset override pins are for ced to inputs duri ng reset and do not beco me outputs until at least
one CLKOUT cycle after RSTOUT is negated.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Chip Configuration Module (CCM)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Chip Configurat ion Module (CCM) 103
3.8.2 Chip Mo de Selection
The chip mode is selected dur ing reset and refl ected in the MODE field
of the chip configuration register (CCR). Once reset is exited, the
operating mode cannot be changed. Tab le 3-8 shows the mode
selection during reset configuration.
During reset, certain module configurations depend on whether
emulation mode is active as determined by the state of the internal
emulation signal.
3.8.3 Boot Device Selection
During reset configuration, the CS0 chip select pin is optionally
configured to select an external boot device. In this case, the CSEN bit
in CSCR0 is set, enabling CS0 after reset. CS0 will be asserted for the
initial boot fetch accessed from address 0x0. It is assumed that the reset
vect or loaded fro m address 0x0 causes the CPU to start exe cuting fr om
ext erna l memor y space deco ded by CS 0. Also, the P S bit is configu red
for either a 16-bit or 32-bit port size depending on the external boot
device. See Tab le 3-9.
In emulation mode, the CS1 chip select pin is optionally configured for
emulating an internal memory. In emulation mode and booting from
internal memory, the CSEN bit in CSCR1 is set, enabling CS1 after
reset.
Table 3-8. Chip Configuration Mode Selection(1)
1. Modifying the default configurations i s possible only if the external RCON pi n is asserted.
Chip Configuration
Mode CCR Register MODE Field
MODE2 MODE1 MODE0
Mast er mode D26 driven high D17 driven high D16 driven high
Single-chip m ode D26 driven high D17 driven high D16 driven low
FAST mode D26 driven high D17 driven low D16 dont c a re
Em ulation mode D26 driven low D17 dont care D16 dont ca re
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
104 Chip Configurat ion Module (CCM ) MOTOR OLA
Chip Configuration Module (CC M)
Once r eset i s exited, the state s of the CSEN an d P S bits in CS CR 0 an d
the CSEN bit in CSCR1 remain, but can be modified by software.
NOTE: When booting exter nall y, the D28 pi n should be dr iven lo w during reset
configuration to disable the internal FLASH located at address 0x0 so
that no conflict exists with the external boot device.
The boot device selection during reset configuration is summarized in
Table 3-10.
Table 3-9. Chip Select CS0 Config uration Encoding
Chip Select CS0 Control
CSCR0
Register CSCR1
Register
CSEN Bit PS Bit CSEN Bit
Chip select disabled (32-bit port size) 0 1 1(1)
1. CSCR1 CSEN is initially set only in emulation mode when booting from internal memory
and is cl eared otherwi se.
Chip select enabled with 16-bit port size 1 0 0
Chip select enabled with 32-bit port size 1 1 0
Table 3-10. Boot Device Selection(1)
1. Modifying the default configurations i s possible only if the external RCON pi n is asserted.
Boot Device Selection
CSCR0
Register CSCR1
Register
CSEN Bit PS Bit CSEN Bit
Internal boot device;
default 32-bit port D18 driven low D19 dont care D18 driven low
Exte rnal boot device
with 16-bit port D18 driven high D19 driven low D18 driven high
Exte rnal boot device
with 32-bit port D18 driven high D19 driven high D18 driven high
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Chip Configuration Module (CCM)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Chip Configurat ion Module (CCM) 105
3.8.4 Output Pad Strength Configuration
Output pad strength is determined during reset configuration as shown
in Table 3-11. Once reset is exited, the output pad strength configuration
can be changed by programming the L O AD bi t of the ch ip conf ig urat ion
register.
3.8.5 Clock Mo de Selection
The clock mode i s selected dur ing reset a nd reflected in the PL LMODE,
PLLSEL, and PLLREF bits of SYNSR. Once reset i s exited, the clock
mode cannot be changed.
Table 3-12 summarizes clock mode selection during reset configuration.
Table 3-11. Output Pad Driver Strength Selection(1)
1. Modifying the default configurations is possible only if the external RCON pin is asserted
low.
Optional Pin Function Selection CC R Register LOAD Bit
Outp ut pads configured for default strength D 2 1 driven low
Outp ut pads configured for full strength D2 driven high
Table 3-12. Clock Mode Selection(1)
Clock Mode Syn thesizer Statu s Register (SYNS R)
MODE Bit PLLSEL Bit PLLREF Bit
Exte rnal clock mode; PLL disab led VDDSYN driv en low D23 dont care D22 dont care
1:1 PLL mode VDDSYN dr iven hig h D23 driven low D22 dont care
Normal PLL mo de; external clock reference VDDSYN driven high D23 driven high D22 driven low
Nor mal P L L mode; cry sta l os c illato r r e fe renc e VDDSYN driven hig h D23 driven high D22 dri ven high
1. Modifying the default configurations is possible only if the exter nal RCON pin is asser ted l ow.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
106 Chip Configurat ion Module (CCM ) MOTOR OLA
Chip Configuration Module (CC M)
3.8.6 Internal FLASH Configuration
During reset configuration, the D28 pin controls whether or not the
internal FLASH is enabled or disabled as shown in Table 3-13.
3.9 Reset
Rese t initial izes CC M reg i sters to a known sta rtup state as de scribed in
3. 7 Memor y Ma p an d R eg ister s. T he CCM con trol s chip co nfigur ation
at reset as described in 3.8 Functional Description.
3.10 Interrupts
The CCM does not generate interrupt requests.
Table 3-13. Internal FLASH Configuration(1)
1. Modifying the default configurations is possible only if the external RCON pin is asserted
low.
Internal FLASH Configuration External D28 State
Internal FLASH enabled D28 pin driven high
Internal FLASH disabled D28 pin driven low
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Signal Description 107
Technical Data MMC2107
Section 4. Signal Description
4.1 Contents
4.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109
4.3 Package Pinout Summary . . . . . . . . . . . . . . . . . . . . . . . . . . .110
4.4 MMC2107 Specific Implementation Signal Issues . . . . . . . . .120
4.4.1 RSTOUT Signal Functions. . . . . . . . . . . . . . . . . . . . . . . . .120
4.4.2 INT Signal Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121
4.5 Signal Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121
4.5.1 Reset Signals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121
4.5.1.1 Reset In (RESET) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121
4.5.1.2 Reset Out (RSTOUT). . . . . . . . . . . . . . . . . . . . . . . . . . .121
4.5.2 Phase-Lock Loop (PLL) and Clock Signals . . . . . . . . . . . .122
4.5.2.1 External Clock In (EXTAL). . . . . . . . . . . . . . . . . . . . . . .122
4.5.2.2 Crystal (XTAL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122
4.5.2.3 Clock Out (CLKOUT) . . . . . . . . . . . . . . . . . . . . . . . . . . .122
4.5.2.4 Synthesizer Power (VDDSYN and VSSSYN). . . . . . . . . . .122
4.5.3 External Memory Interface Signals . . . . . . . . . . . . . . . . . .122
4.5.3.1 Data Bus (D[31:0]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122
4.5.3.2 Show Cycle Strobe (SHS) . . . . . . . . . . . . . . . . . . . . . . .123
4.5.3.3 Transfer Acknowledge (TA). . . . . . . . . . . . . . . . . . . . . .123
4.5.3.4 Transfer Error Acknowledge (TEA) . . . . . . . . . . . . . . . .123
4.5.3.5 Emulation Mode Chip Selects (CSE [1:0]) . . . . . . . . . . .123
4.5.3.6 Transfer Code (TC[2:0]). . . . . . . . . . . . . . . . . . . . . . . . .123
4.5.3.7 Read/Write (R/W). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123
4.5.3.8 Address Bus (A[22:0]) . . . . . . . . . . . . . . . . . . . . . . . . . .124
4.5.3.9 Enabl e Byte (EB[3:0]) . . . . . . . . . . . . . . . . . . . . . . . . . .124
4. 5.3.10 Chip Sele ct (CS[3:0]). . . . . . . . . . . . . . . . . . . . . . . . . . .124
4.5.3.11 Output Enable (OE) . . . . . . . . . . . . . . . . . . . . . . . . . . . .124
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
108 Signal Description MOTOROLA
Signal Descri ption
4.5.4 Edge P ort Signals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124
4.5.4.1 External Interrupts (INT[7:6]) . . . . . . . . . . . . . . . . . . . . .124
4.5.4.2 External Interrupts (INT[5:2]) . . . . . . . . . . . . . . . . . . . . .124
4.5.4.3 External Interrupts (INT[1:0]) . . . . . . . . . . . . . . . . . . . . .125
4.5.5 Serial Peripheral Interface Module Signals . . . . . . . . . . . .125
4.5.5.1 Master Out/Slave In (MOSI). . . . . . . . . . . . . . . . . . . . . .125
4.5.5.2 Master In/Slave Out (MISO). . . . . . . . . . . . . . . . . . . . . .125
4.5.5.3 Serial Clock (SCK). . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
4.5.5.4 Slave Select (SS). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
4.5.6 Serial Communications Interface Module Signals . . . . . . .125
4.5.6.1 Receive Data (RXD1 and RXD2). . . . . . . . . . . . . . . . . .125
4.5.6.2 Transmit Data (TXD1 and TXD2). . . . . . . . . . . . . . . . . .126
4.5.7 Timer Signals (ICOC1[3:0] and ICOC2[3:0]) . . . . . . . . . . .126
4.5.8 Analog-to-Digital Converter Signals. . . . . . . . . . . . . . . . . .126
4.5.8.1 Analog Inputs (PQA[4:3], PQA[1:0], . . . . . . . . . . . . . . . . . .
and PQB[3:0]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126
4.5.8.2 Analog Reference (VRH and VRL) . . . . . . . . . . . . . . . . .126
4.5.8.3 Analog Supply (VDDA and VSSA) . . . . . . . . . . . . . . . . . .126
4.5.8.4 Positive Supply (VDDH) . . . . . . . . . . . . . . . . . . . . . . . . .126
4.5.9 Debug and Emulation Support Signals . . . . . . . . . . . . . . .127
4.5.9.1 Test Reset (TRST). . . . . . . . . . . . . . . . . . . . . . . . . . . . .127
4.5.9.2 Test Clock (TCLK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127
4.5.9.3 Test Mode Select (TMS ) . . . . . . . . . . . . . . . . . . . . . . . .127
4.5.9.4 Test Data Input (TDI) . . . . . . . . . . . . . . . . . . . . . . . . . . .127
4.5.9.5 Test Data Output (TDO). . . . . . . . . . . . . . . . . . . . . . . . .127
4.5.9.6 Debug Event (DE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127
4.5.10 Test Signal (TEST). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128
4.5.11 Power and Ground Signals . . . . . . . . . . . . . . . . . . . . . . . .128
4.5.11.1 Power for FLASH Erase/Program (VPP) . . . . . . . . . . . .128
4.5.11.2 Power and Ground for FLASH Array
(VDDF and VSSF) . . . . . . . . . . . . . . . . . . . . . . . . . . . .128
4.5.11.3 Standby Power (VSTBY) . . . . . . . . . . . . . . . . . . . . . . . . .128
4.5.11.4 Positive Supply (VDD). . . . . . . . . . . . . . . . . . . . . . . . . . .128
4.5.11.5 Ground (VSS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Signal Description
Introduction
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Signal Description 109
4.2 Introduction
The MMC2107 is available in two packages:
100-pin Joint-Electron Device Engineering Council (JEDEC)
low-profile quad flat pack (LQFP) The 100-pin device is a
minimum pin set for single-chip mode implementation.
144-pin JEDEC LQFP The 144-pin implementation includes 44
optional pins as a bond-out option to:
Accommodate an expanded set of features
Allow expansion of the number of general-purpose
input/output (I/O)
Utilize off-chip memory
Provide enhanced support for development purposes
The optional group of pins includes:
23 address output lines
Four chip selects
Two emulation chip selects
Four byte/wr it e enables
Read/write (R/W) signal
Output enable signal
Three transfer code signals
Six power/ground pins
NOTE: The optional pins are either all present or none of them are present.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
110 Signal Description MOTOROLA
Signal Descri ption
4.3 Package Pinout Summary
Refer to:
Table 4-1 for a summary of the pinouts for both packages
Figure 4-1 and Figure 4-2 for a pictorial view of the pinouts
Table 4-2 for a brief description of each signal
Table 4-1. Package Pinouts (Sheet 1 of 5)
Pin N u mber Pin Name
144-Pin Package 100-Pi n Package
1 1 D30 / PA6
2 2 D29 / PA5
3 3 D28 / PA4
4 4 D27 / PA3
5 5 D26 / PA2
6 A11
7 6 D25 / PA1
8 VSS
9 VDD
10 7 D24 / PA0
11 A10
12 8 D23 / PB7
13 A9
14 A8
15 9 D22 / PB6
16 10 D21 / PB5
17 11 D20 / PB4
18 12 VSS
19 13 VDD
20 14 D19 / PB3
21 15 D18 / PB2
22 16 D17 / PB1
23 A7
24 A6
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Signal Description
Package P inou t Summary
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Signal Description 111
25 17 D16 / PB0
26 A5
27 18 D15 / PC7
28 A4
29 A3
30 19 D14 / PC6
31 20 D13 / PC5
32 21 VSS
33 22 VDD
34 23 D12 / PC4
35 24 D11 / PC3
36 25 D10 / PC2
37 26 D 9 / PC1
38 27 D 8 / PC0
39 28 D 7 / PD7
40 29 D 6 / PD6
41 30 D 5 / PD5
42 31 D 4 / PD4
43 32 D 3 / PD3
44 VSS
45 VDD
46 33 D 2 / PD2
47 A2
48 34 D 1 / PD1
49 A1
50 A0
51 35 D 0 / PD0
52 36 ICOC23
53 37 ICOC22
54 38 ICOC21
55 39 ICOC20
Table 4-1. Package Pinouts (Sheet 2 of 5)
Pin N u mber Pin Name
144-Pin Package 100-Pi n Package
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
112 Signal Description MOTOROLA
Signal Descri ption
56 40 ICOC13
57 41 ICOC12
58 42 ICOC11
59 R/W
60 CSE1
61 43 ICOC10
62 CSE0
63 44 TEST
64 VSS
65 VDD
66 45 TXD2
67 TC2
68 46 RXD2
69 47 TXD1
70 48 RXD1
71 49 INT0
72 50 INT1
73 51 VSSF
74 52 VDDF
75 53 INT2
76 54 VSS
77 55 VDD
78 TC1
79 56 INT3
80 TC0
81 CS3
82 57 INT4
83 CS2
84 58 INT5
85 CS1
Table 4-1. Package Pinouts (Sheet 3 of 5)
Pin N u mber Pin Name
144-Pin Package 100-Pi n Package
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Signal Description
Package P inou t Summary
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Signal Description 113
86 CS0
87 59 VPP
88 60 INT6
89 61 INT7
90 62 MOSI
91 63 MISO
92 64 VSTBY
93 65 SCK
94 66 SS
95 OE
96 EB3
97 67 SHS / PE7
98 EB2
99 68 TA / PE6
100 EB1
101 EB0
102 69 TEA / PE5
103 70 VDDH
104 71 PQB3
105 72 PQB2
106 73 PQB1
107 74 PQB0
108 75 PQA4
109 76 PQA3
110 77 PQA1
111 78 PQA0
112 79 VRL
113 80 VRH
114 81 VSSA
115 82 VDDA
Table 4-1. Package Pinouts (Sheet 4 of 5)
Pin N u mber Pin Name
144-Pin Package 100-Pi n Package
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
114 Signal Description MOTOROLA
Signal Descri ption
116 A22
117 A21
118 83 RESET
119 A20
120 84 RSTOUT
121 A19
122 A18
123 85 VDDSYN
124 86 XTAL
125 87 EXTAL
126 88 VSSSYN
127 89 VSS
128 90 CLKOUT
129 91 VDD
130 92 TCLK
131 A17
132 A16
133 93 TDI
134 A15
135 94 TDO
136 A14
137 A13
138 95 TMS
139 A12
140 96 VSS
141 97 VDD
142 98 TRST
143 99 DE
144 100 D31 / PA7
Table 4-1. Package Pinouts (Sheet 5 of 5)
Pin N u mber Pin Name
144-Pin Package 100-Pi n Package
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Signal Description
Package P inou t Summary
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Signal Description 115
Figure 4-1. 144-Pin LQFP Assignments
144
143
142
141
140
139
138
137
136
135
134
133
132
131
130
129
128
127
126
125
124
123
122
121
120
119
118
117
116
115
114
113
112
111
110
109
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
108
107
106
105
104
103
102
101
100
99
98
97
96
95
94
93
92
91
90
89
88
87
86
85
84
83
82
81
80
79
78
77
76
75
74
73
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
PQA4
PQB0
PQB1
PQB2
PQB3
VDDH
TEA
EB0
EB1
TA
EB2
SHS
EB3
OE
SS
SCK
VSTBY
MISO
MOSI
INT7
INT6
VPP
CS0
CS1
INT5
CS2
INT4
CS3
TC0
INT3
TC1
VDD
VSS
INT2
VDDF
VSSF
D30
D29
D28
D27
D26
A11
D25
VSS
VDD
D24
A10
D23
A9
A8
D22
D21
D20
VSS
VDD
D19
D18
D17
A7
A6
D16
A5
D15
A4
A3
D14
D13
VSS
VDD
D12
D11
D10
D9
D8
D7
D6
D5
D4
D3
V
SS
V
DD
D2
A2
D1
A1
A0
D0
ICOC23
ICOC22
ICOC21
ICOC20
ICOC13
ICOC12
ICOC11
R/W
CSE1
ICOC10
CSE0
TEST
V
SS
V
DD
TXD2
TC2
RXD2
TXD1
RXD1
INT0
INT1
D31
DE
TRST
V
DD
V
SS
A12
TMS
A13
A14
TDO
A15
TDI
A16
A17
TCLK
V
DD
CLKOUT
V
SS
V
SSSYN
EXTAL
XTAL
V
DDSYN
A18
A19
RSTOUT
A20
RESET
A21
A22
V
DDA
V
SSA
V
RH
V
RL
PQA0
PQA1
PQA3
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
116 Signal Description MOTOROLA
Signal Descri ption
Figure 4-2. 100-Pin LQFP Assignments
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
100
99
98
97
96
95
94
93
92
91
90
89
88
87
86
85
84
83
82
81
80
79
78
77
76
73
74
75
PA6
PA5
PA4
PA3
PA2
PA1
PA0
PB7
PB6
PB5
PB4
VSS
VDD
PB3
PB2
PB1
PB0
PC7
PC6
PC5
VSS
VDD
PC4
PC3
PC2
PC1
PC0
PD7
PD6
PD5
PD4
PD3
PD2
PD1
PD0
ICOC23
ICOC22
ICOC21
ICOC20
ICOC13
ICOC12
ICOC11
ICOC10
TEST
TXD2
RXD2
TXD1
RXD1
INT0
INT1PQA3
PQA1
PQA0
V
RL
V
RH
V
SSA
V
DDA
RESET
RSTOUT
V
DDSYN
XTAL
EXTAL
V
SSSYN
V
SS
CLKOUT
V
DD
TCLK
TDI
TDO
TMS
V
SS
V
DD
TRST
DE
PA7
VSSF
VDDF
INT2
VSS
VDD
INT3
INT4
INT5
VPP
INT6
INT7
MOSI
MISO
VSTBY
SCK
SS
PE7
PE6
PE5
VDDH
PQB3
PQB2
PQB1
PQB0
PQA4
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Signal Description
Package P inou t Summary
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Signal Description 117
Table 4-2. Signal Descriptions (Sheet 1 of 3)
Name(1) Alternate Qty. Dir. Input
Hyst. Input
Sync.(2)
Drive
Strength
Control(3) Pullup(4) Output
Driver
(ST/OD/SP)(5)
Reset
RESET 1 I/O(6) YY Pullup
RSTOUT SHOWINT 1I/O(6) LOAD ST
Clock
EXTAL 1 I N N SP
XTAL 1 O SP
CLKOUT 1 I/O(6) LOAD ST
VDDSYN 1 I
VSSSYN 1 I
External Memory Interface an d Ports
D[31:0] PA[7:0], PB[7:0 ]
PC[7:0], PD[7:0] 32 I/O Y Y LOAD ST
SHS RCON / PE7 1I/O Y Y LOAD Pullup ST
TA PE6 1I/O Y Y LOAD Pullup ST
TEA PE5 1I/O Y Y LOAD Pullup ST
CSE[1:0] PE[4:3] 2I/O Y Y LOAD Pullup ST
TC[2:0] PE[2:0] 3I/O Y Y LOAD Pullup ST
R/W PF7 1I/O Y Y LOAD Pullup ST
A[22:0] PF[6:0], PG[7:0 ]
PH[7:0] 23 I/O Y Y LOAD Pullup ST
EB[3:0] PI[7:4] 4I/O Y Y LOAD Pullup ST
CS[3:0] PI[3:0] 4I/O Y Y LOAD Pullup ST
OE 1 I/O(6) LOAD ST
Edge Port
INT[7:6] TSIZ[1:0] / GPIO 2I/O Y Y LOAD
INT[5:2] PSTA T[3:0] / GPIO 4I/O Y Y LOAD
INT[1:0] GPIO 2I/O Y Y LOAD
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
118 Signal Description MOTOROLA
Signal Descri ption
Serial Peripher al Interface (SPI)
MOSI GPIO 1I/O Y Y RDPSP0 Pullup(4) ST / OD(7)
MISO GPIO 1I/O Y Y RDPSP0 Pullup(4) ST / OD(7)
SCK GPIO 1I/O Y Y RDPSP0 Pullup(4) ST / OD (7)
SS GPIO 1I/O Y Y RDPSP0 Pullup(4) ST / OD(7)
Serial Communication Interface (SCI1 and SCI2)
TXD1 GPIO 1I/O Y Y RDPSCI0 Pullup(4) ST / OD(7)
RXD1 GPIO 1I/O Y Y RDPSCI0 Pullup(4) ST / OD (7)
TXD2 GPIO 1I/O Y Y RDPSCI0 Pullup(4) ST / OD(7)
RXD2 GPIO 1I/O Y Y RDPSCI0 Pullup(4) ST / OD (7)
Timer 1 and Timer 2
ICOC13 IC / OC / PAI / GPIO 1I/O Y Y RDPT Pullup(4) ST
ICOC1[2:0] IC / OC / GPIO 3I/O Y Y RDPT Pullup(4) ST
ICOC23 IC / OC / PAI / GPIO 1I/O Y Y RDPT Pullup(4) ST
ICOC2[2:0] IC / OC / GPIO 3I/O Y Y RDPT Pullup(4) ST
Queued Analog-to- Digital Converter (QADC)
PQA4PQA3,
PQA1PQA0 GPIO 4I/O Y Y ST
PQB[3:0] GPI 4 I Y Y
VRH 1 I
VRL 1 I
VDDA 1 I
VSSA 1 I
VDDH 1 I
Table 4-2. Signal Descriptions (Sheet 2 of 3)
Name(1) Alternate Qty. Dir. Input
Hyst. Input
Sync.(2)
Drive
Strength
Control(3) Pullup(4) Output
Driver
(ST/OD/SP)(5)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Signal Description
Package P inou t Summary
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Signal Description 119
Debug and JTAG Test Port Control
TRST 1 I Y N Pullup
TCLK 1 I Y N Pullup
TMS 1 I Y N Pullup
TDI 1 I Y N Pullup
TDO 1 O(8) LOAD ST
DE 1 I/O Y N LOAD Pullup OD
Test
TEST 1 I Y N
Pow er Sup plies
VPP 1 I
VDDF 1 I
VSSF 1 I
VSTBY 1 I
VDD 5 I
VSS 5 I
VDD 3 I
VSS 3 I
Total 100
Total with optional pins 144
1. Shaded signals are for optional bond-out for 144-pin package.
2. Synchronize d input used only if signal configured a s a digital I/O. RESET signal is always synchronized, except in low-
power stop mode.
3. LOAD (chip configuratio n register bit), R DPSP0 (SPIPURD register bit in SPI), RDPSCI0 (SCIPURD register bit in both
SC Is ), RDP T (T IMSCR 2 re g is te r bit in both ti m e rs )
4. All pullups are disconnected when t he signal is programmed as an output.
5. Output driver ty pe: ST = standar d, OD = standard driver with open-drain pulldown option sel ected, SP = special
6. Di gital i nput f uncti on for RST OUT, CLKOUT, OE, and digital output functi on for RESET used onl y for JTAG bo undary s can
7. Open-drain and pullup function selectable via pr ogrammers model in mo dule configuration registers
8. Three-state output with no input function
Table 4-2. Signal Descriptions (Sheet 3 of 3)
Name(1) Alternate Qty. Dir. Input
Hyst. Input
Sync.(2)
Drive
Strength
Control(3) Pullup(4) Output
Driver
(ST/OD/SP)(5)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
120 Signal Description MOTOROLA
Signal Descri ption
4.4 MMC2107 Specific Implementation Signal Issues
Most modules are designed to allow expanded capabilities if all the
module signals to the pads are implemented. This subsection discusses
how these modules are implemented on the MMC2107.
4.4.1 RSTOUT Signal Func tions
The RSTOUT signal has these multiple functions:
Whenever the internal system reset is asserted, the RSTOUT
signal will always be asserted to indicate the reset condition to the
system.
If the internal reset is not asserted, then setting the FRCRSTOUT
bit in the reset control register will assert the RSTOUT signal for
as long as the FRCRSTOUT bit is set.
If the intern al reset is not asserted a nd the FR CRST OUT bit i s not
set, then setting the SHOWINT bit in the chip configuration
register will reflect internal interrupt requests out to the RSTOUT
signal.
If the intern al reset is not asserted a nd the FR CRST OUT bit i s not
set and the SHOWINT bit is not set, then the RSTOUT signal will
be negated to indicate to the system that there is no reset
condition.
CAUTION: External logic used to drive reset configuration data during reset needs
to be considered when using the RSTOUT signal for a function other
than an indication of reset.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Signal Description
Sig nal Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Signal Description 121
4.4.2 INT Signal Functions
The INT signals have these multiple functions:
If the SZEN bit in the chip configuration register is set, then
INT[7:6] will be used to reflect the state of the TSIZ[1:0] sig n als
from the MCORE.
If the PSTEN bit in the chip configuration register is set, then
INT[5:2] will be used to reflect the state of the PSTAT[3:0] signals
from the MCORE.
NOTE: If the SZEN or PSTEN bits are set during emulation mode, then the
corresp onding edge por t INT functions are lost and will not be emulated
externally.
The d efault reset values for PUP SCI1 and PUPSCI0 will be 0. Thus, th e
pullup function is disabled by default.
4.5 Signal Descriptions
This subsection provides a brief description of the signals. For more
detailed information, reference the module section.
4.5.1 Reset Signals
These signals are used to either reset the chip or as a reset indication.
4.5.1.1 Reset In (RESET)
This active-low input signal is used as an external reset request.
4.5.1.2 Reset Out (RSTOUT)
This active-low output signal is an indication that the internal reset
controller has reset the chip. When RSTOUT is active, the user may
drive override options on the data bus. RSTOUT is three-stated in
phase-lock loop (P LL) test mode.
RSTOUT may also be used to reflect an indication of an internal interrupt
request.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
122 Signal Description MOTOROLA
Signal Descri ption
4.5.2 Phase-Lock Loop (PLL) and Clock Signals
These sign als are used to support the on-chip clock generation circuitry.
4.5.2.1 External Clock In (EXTAL)
This input signal is always driven by an external clock input except when
used as a connection to the exter nal crystal when the inter nal oscillator
circuit is used. The clock source is configured during reset.
4.5.2.2 Crystal (XTAL)
This outpu t signal is used as a connection to the external crystal when
the internal oscillator circuit is used. XTAL should be grounded when
using an external clock input.
4.5.2.3 Clock Out (CLKOUT)
This output signal reflects the internal system clock.
4.5.2.4 Synthesizer Power (VDDSYN and VSSSYN)
These are dedicated quiet power and ground supply signals for the
frequency synthesizer circuit.
4.5.3 External Memory Interface Signals
In addition to the function stated here, these signals can be configured
as discrete I/O signals also.
4.5.3.1 Data Bus (D[31:0])
These three-state bidirectional signals provide the general-purpose data
path between the microcontroller unit (MCU) and all other devices.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Signal Description
Sig nal Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Signal Description 123
4.5.3.2 Show Cycle Strobe (SHS)
This output signal is used in emulation mode as a strobe for capturing
addresses, controls, and data during show cycles. This signal is also
used as RCON.
NOTE: This input signal, used only during reset, indicates whether the states on
the external signals affect the chip configuration.
4.5.3.3 Transfer Acknowledge (TA)
This signal indicates that the external data transfer is complete. During
a read cycle, when t he processor recognize s TA, it lat ches the data and
then t ermin ates the bus cycle. Dur ing a write cycle, when the pr ocessor
recognizes TA, the bus cycle is ter minated. This signal is an input in
master and emulation modes.
4.5.3.4 Transfer Error A cknowledge (TEA)
This signal indicates an error condition exists for the bus transfer. The
bus cycle is terminated and the central processor unit (CPU) begins
execution of the access error exception. This signal is an input in ma ster
and emulation modes.
4.5.3.5 Emulation Mode Chip Selects (CSE[1:0])
These output signals provide information for development support.
4.5.3.6 Transfer Code (TC[2:0])
These outp ut signal s indicate the dat a transfe r code for the current bus
cycle.
4.5.3.7 Read/Write (R/W)
This output signal indi cates the direct io n of the data tran sfer on the bus.
A logic 1 indicates a read from a slave device and a logic 0 indicates a
write to a slave device.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
124 Signal Description MOTOROLA
Signal Descri ption
4.5.3.8 Address Bus (A[22:0])
These output signals provide the address for the current bus transfer.
4.5.3.9 Enable Byte (EB[3:0])
These outpu t signals indicate w hich byt e of data is valid during exter nal
cycles.
4.5.3.10 Chip Select (CS[3:0])
These output signals select external devices for external bus
transactions.
4.5.3.11 Output Enable (OE)
This outpu t signal indicates when an external device can drive data
during external read cycles.
4.5.4 Edge Port Signals
These signals are used by the edge port module.
4.5.4.1 External Interrupts (INT[7:6])
These bidirectional signals function as either external interrupt sources
or GPIO. Also, these signals may be used to reflect the internal TSIZ[1:0]
signals and externally to provide an indication of the MCORE transfer
size.
4.5.4.2 External Interrupts (INT[5:2])
These bidirectional signals function as either external interrupt sources
or GPIO. Also, these signals may be used to reflect the internal
PSTAT[3:0] signals and externally to provide an indication of the
M•CORE processor status.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Signal Description
Sig nal Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Signal Description 125
4.5.4.3 External Interrupts (INT[1:0])
These bidirectional signals function as either external interrupt sources
or GPIO.
4.5.5 Serial Peripheral Interface Module Signals
These signals are used by the SPI module and may also be configured
to be discrete I/O signals.
4.5.5.1 Master Out/Slave In (MOSI)
This signal is the serial data output from the SPI in master mode and the
serial data input i n slave mode.
4.5.5.2 Master In/Slave Out (MISO)
This signal is the serial data input to the SPI in master mode and the
serial data output in slave mode.
4.5.5.3 Serial Clock (SCK)
The serial clock synchronizes data transmissions between master and
slave devices. SCK is an output if the S PI is co nfigured as a m aster and
SCK is an input if the SPI is configured as a slave.
4.5.5.4 Slave Select (SS)
This I/O sign al is the periph eral chip select sign al in master m ode and is
an active-low slave select in slave mode.
4.5.6 Serial Communications Interface Module Signals
These signals are used by the two SCI modules.
4.5.6.1 Receive Data (RXD1 and RXD2)
These signals are used for the SCI receiver data input and are also
available for GPIO when not configured for receiver operation.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
126 Signal Description MOTOROLA
Signal Descri ption
4.5.6.2 Transmit Data (TXD1 and TXD2)
These signals are used for the SCI transmitter data output and ar e also
available for GPIO when not configured for transmitter operation.
4.5.7 Timer Signals (ICOC1[3:0] and ICOC2[3:0])
These sig nals provi de the exter nal interface to the timer functions. T hey
may be configu red as ge nera l-pur pose I/O if t he tim er o utput functio n is
not needed. The default state at reset is general-purpose input.
4.5.8 Analog-to-Digital Converter Signals
These signals are used by the analog-to-digital converter (QADC)
module.
4.5.8.1 Analog Inputs (PQA[4:3], PQA[1:0], and PQB[3:0])
These signa ls provide the analog i nputs to the QADC. T he PQA signa ls
may also be used as general -pu rpose digital I/O. The PQB signa ls may
also be used as general-purpose digital inputs.
4.5.8.2 Analog Reference (VRH and VRL)
These signals serve as the high (VRH) and low (VRL) reference potentials
for the analog converter.
4.5.8.3 Analog Supply (VDDA and VSSA)
These dedicated power supply signals isolate the sensitive analog
circuitry from the normal levels of noise present on the digital power
supply.
4.5.8.4 Positive Supply (VDDH)
This signal supplies positive power to the ESD structures in the QADC
pads.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Signal Description
Sig nal Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Signal Description 127
4.5.9 Debug and Emulation Support Signals
These signal s are used as the interface to the on-chi p JTAG (Joint Test
Action Gr oup) controller and also to interface to the OnCE logic.
4. 5.9.1 Test Reset (TRS T)
This a ctive-low input signal is used to initialize the JTAG and OnCE logic
asynchronously.
4. 5.9.2 Test Clock (TCLK)
This input signal is the test clock used to synchronize the JTAG and
OnCE logic.
4.5.9.3 Test Mode Select (TMS)
This input signal is used to sequence the JTAG state machine. TMS is
sampled on the rising edge of TCLK.
4.5.9.4 Test Data Input (TDI)
This input signal is the serial input for test instructions and data. TDI is
sampled on the rising edge of TCLK.
4.5.9.5 Test Data Output (TDO)
This output signal is the seria l output for te st instru ctions and data . TDO
is three-stateable and is actively driven in the shift-IR and shift-DR
controller states. TDO changes on the falling edge of TCLK.
4. 5.9.6 Debug Event (DE)
This is a bidire ctional, act ive-low signa l. As an output , this signal will be
asserted for three system clocks, synchronous to the rising CLKOUT
edge, to acknowledge that the CPU has entered debug mode as a result
of a debug request or a breakpoint condition. As an input, this signal
provides multiple functions.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
128 Signal Description MOTOROLA
Signal Descri ption
4.5.10 Test Signal (TEST)
This input signal (TEST) is reserved for factory testing only and should
be con nected to V SS to prevent u nintentional activati on of test fun ctions.
4.5.11 Power and Ground Signals
These signals provide system power and ground to the chip. Multiple
signals are provided for adequate current capability. All power supply
signals must have adequate bypass capacitance for high-frequency
noise suppression.
4.5.11.1 Power for FLASH Erase/Program (VPP)
This signal supplies an isolated power for FLASH program and erase
operations.
4.5.11.2 Power and Ground for FLASH Array (VDDF and VSSF)
These sign als supply an isol ated power and ground to the FLASH arr ay.
4.5.11.3 Standby Power (VSTBY)
This signal is used to provide standby volta ge to the RAM array i f VDD is
lost.
4.5.11.4 Positive Supply (VDD)
This signal supplies positive power to the core logic and I/O pads.
4.5.11.5 Ground (VSS)
This signal is the negative supply (ground) to the chip.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Re set Controller Module 129
Technical Data MMC2107
Section 5. Reset Controller Module
5.1 Contents
5.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130
5.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130
5.4 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131
5.5 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131
5.6 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .132
5.6.1 Reset Control Register. . . . . . . . . . . . . . . . . . . . . . . . . . . .133
5.6.2 Reset Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . .134
5.6.3 Reset Test Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135
5.7 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136
5.7.1 Reset Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136
5.7.1.1 Power-On Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137
5.7.1.2 External Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137
5.7.1.3 Watchdog Timer Reset . . . . . . . . . . . . . . . . . . . . . . . . .137
5.7.1.4 Loss of Clock Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . .137
5.7.1.5 Loss of Lock Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . .138
5.7.1.6 Software Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138
5.7.2 Reset Control Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138
5.7.2.1 Synchronous Reset Requests . . . . . . . . . . . . . . . . . . . .138
5.7.2.2 Internal Reset Request . . . . . . . . . . . . . . . . . . . . . . . . .140
5.7.2.3 Power-On Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140
5.7.3 Concurrent Resets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140
5.7.3.1 Reset F low. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140
5.7.3.2 Reset Status Flags. . . . . . . . . . . . . . . . . . . . . . . . . . . . .141
5.8 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
130 Rese t Controller Module MOTOR OLA
Reset Controller Module
5.2 Introduction
The reset controller is provided to:
Determine the cause of reset
Assert the appropriate reset signals to the system
Keep a history of what caused the reset
5.3 Featur es
Features of the reset controller module include:
Six sources of reset:
External
Power- on re set (P OR )
Watchdog timer
Phase-lock loop (PLL) loss of lock
PLL loss of clock
Software
Software can assert external RSTOUT pin independent of chip
reset state.
Software readable status flags indicating the cause of the last
reset
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Reset Controller Module
Block Diagram
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Re set Controller Module 131
5.4 Block Diagram
Figure 5-1 shows the structure of the reset controller.
Figure 5-1. Reset Controller Block Diagram
5.5 Signals
See Table 5-1 for an overview of the reset controller signal properties.
For additional information, refer to Section 4. Signal Description.
POWER-ON
RESET
WATCHDOG
TIMER TIMEOUT
PLL
LOSS OF LOCK
PLL
LOSS OF CLOCK
RESET
CONTROLLER
RESET
PIN
RSTOUT
PIN
TO INTERNAL RESETS
SOFTWARE
RESET
Table 5- 1. Reset Controller Signal Properties
Name Alternate Direction Input
Hysteresis Input
Synchronization Pullup(1)
1. Pullups are disconnected from pins configured as outputs.
RESET pin IY Y(2)
2. RESET is al ways synchroni zed except when in lo w-power stop mode.
Y
RSTOUT pin SHOW INT O——
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
132 Rese t Controller Module MOTOR OLA
Reset Controller Module
5.6 Memory Map and Registers
The reset controller programming model consists of the following
registers:
Reset control register (RCR) Selects interrupt controlle r
functions
Reset status register (RSR) Refl ects the state of the last reset
source
Reset test register (RTR) Used only for factory test
Table 5-2. Reset Controller Module Memory Map
Address Bits 7–0 Access(1)
1. S/U = CPU superv isor or us er mode access. User mode acc esses to supervi sor only
ad dresses have no effect and result in a a cycle te rm ination tran sfer error.
0x000c4_0000 Reset control register (RCR) S/U
0x000c4_0001 Reset status register (RSR) S/U
0x000c4_0002 Reset test register (RTR) S/U
0x000c4_0003 Reserved(2)
2. Within the specified module memory map, accessing r eserved addresses does not
generate a bus error exception. Reads of reserved addres ses return 0s and writ es have
no effect.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Reset Controller Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Re set Controller Module 133
5.6.1 Reset Control Register
The reset control register (RCR) allows software control for requesting a
reset or for independently asserting the external RSTOUT pin. RCR is
read/write always.
SOFTRST Software Reset Request Bit
The SOFTRST bit allows software to request a reset. Note that the
reset caused by setting this bit clears this bit.
1 = Request software reset
0 = No software reset request
FRCRSTOUT Force RSTO UT Pin Bit
The FRCRSTOUT bit allows software to assert or negate the external
RSTOUT pin.
1 = Assert the RSTOUT pin.
0 = Do not assert the RSTOUT pin.
CAUTION: External logic driving reset configuration data during reset needs to be
considered when asserting the RSTOUT pin when setting
FRCRSTOUT.
Address: 0x000c4_0000
Bit 7654321Bit 0
Read: SOFTRST FRC-
RSTOUT 000000
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 5-2. Reset Control Register (RCR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
134 Rese t Controller Module MOTOR OLA
Reset Controller Module
5.6.2 Reset Status Register
The reset status register (RSR) contains a status bit for every reset
source. When reset is entered, the cause of the reset condition is latched
alo ng with a valu e of 0 for the o ther reset sou rces that were not pending
at the tim e of th e re set cond iti on. These va l ues ar e the n ref lected i n the
RSR. One or more status bits may be set at the same time. The cause
of any subsequent reset is also recorded in the register, overwriting
status from the previous reset condition.
RSR can be read at any time. Writing to RSR has no effect.
SOFT Software Reset Flag
SOFT indicates that the last reset was caused by software.
1 = Last reset caused by software
0 = No software reset
WDR Watchdog Timer Reset Flag
WDR indicates that the last reset was caused by a watchdog timer
timeout.
1 = Last reset caused by watchdog timer timeout
0 = No watchdog timer timeout reset
POR Power-On Reset Flag
POR indicates that the last reset was caused by a power-on reset.
1 = Last reset caused by power-on reset
0 = Last reset not caused by power-on reset
Address: 0x000c4_0001
Bit 7654321Bit 0
Read: 0 0 SOFT WDR POR EXT LOC LOL
Write:
Reset: 0 0 Reset dependent
= Writes have no effect and the access terminates without a transfer error exception.
Figure 5-3. Reset Status Register (RSR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Reset Controller Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Re set Controller Module 135
EXT External Reset Flag
EXT indicates that the last reset was caused by an external device
asserting the external R ESET pin.
1 = Last reset state caused by external device asserting the
external RESET pin
0 = No external reset
LOC Loss of Clock Reset Flag
LOC indicates that the last reset state was caused by a loss of clock
detected by the loss of clock circuit.
1 = Last reset caused by loss of clock
0 = No loss of clock reset
LOL Loss of Lock Reset Flag
LOL indicates that the last reset state was caused by a loss of lock
detected by the PLL circuit.
1 = Last r eset caused by loss of lock
0 = No loss of lock
5.6.3 Reset Test Register
The reset test regi ster (RTR) is used only for factory testing.
This register is read-only when not in test mode.
Address: 0x000c4_0002
Bit 7654321Bit 0
Read: 0 0 000000
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 5-4. Reset Test Register (RTR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
136 Rese t Controller Module MOTOR OLA
Reset Controller Module
5.7 Functional D escription
This subsection provides a function al description of the MM C2107 reset
controller module.
5.7.1 Reset Sources
Table 5-3 defines the sources of reset and the signals driven by the reset
controller.
To protect data integrity, a synchronous reset source is not acted upon
by the reset control logic until the end of the current bus cycle. Reset is
then asser ted on the next r ising edge of the system clock after the cycle
is terminated. Whenever the reset control logic must synchronize reset
to the end of the bus cycle, the internal bus monitor is automatically
enabled regardless of the BME bit setting in the chip configuration
register (CCR). T hen if the cur ren t bu s cycle is not ter minated n orm ally,
the bus monitor terminates the cycle based on the length of time
programmed in the BMT field of CCR.
Internal single-byte, half-word, or word writes are guaranteed to
complete without data corruption when a synchronous reset occurs.
External writes, including word writes to 16-bit ports, are also
guaran teed to compl ete.
Asynchronous reset sources usually indicate a catastrophic failure.
There fore , the reset contr ol logic do es not wait for the curr ent bu s cycle
to complete. Reset is asserted immediately to the system.
Table 5-3. Reset Source Summary
Source Type
Power on Asynchronous
External RESET pin (not stop mode) Synchronous
External RESET pin (during stop mode) Asynchron ous
Watchdog timer Synchronous
Loss of clock Asynchronous
Loss of lock Asyn ch ronous
Software Synchronous
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Reset Controller Module
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Re set Controller Module 137
5.7.1.1 Power-On Reset
At power -up, the reset cont roll er asse rts RSTOU T. RSTOUT continues
to be asserted until VDD has reached a minimum acceptable level and,
if a PLL clock mode is selected, until the PLL achieves phase lock. Then
after approximately another 512 cycles, RSTOUT is negated and the
part begins operation.
5.7.1.2 External Reset
Asserting the external RESET pin for at least four rising CLKOUT edges
causes the external reset request to be recognized and latched. The bus
monitor is enabled and the current bus cycle is completed. The reset
controller asserts RS TOUT for approximately 512 cycles after the
RESET pin is negated and the PLL has acquired lock. The part then exits
reset and begins operation.
In low-power stop mode, the system clocks are stopped. Asserting the
external RESET pin during stop mode causes an external reset to be
recognized.
5.7.1.3 Watchdog Timer Reset
A watchdog timer timeout causes the watchdog timer reset request to be
recognized and latched. The bus monitor is enabled and the current bus
cycle is completed. If the RESET pin is negated and the PLL has
acquired lock, the reset controller asserts RSTOUT for approximately
512 cycles. Then the part exits reset and begins operation.
5.7.1.4 Loss of Clock Reset
This reset condition occurs in PLL clock mode when the LOCRE bit in
SYNCR is set and either the PLL reference or the PLL fails. The reset
controller asserts RS TOUT for approximately 512 cycles after the PLL
has acquired lock. The part then exits reset and begins operation.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
138 Rese t Controller Module MOTOR OLA
Reset Controller Module
5.7.1.5 Loss of Lock Reset
This reset condition occurs in PLL clock mode when the LOLRE bit in
SYNCR is set and the PLL loses lock. The reset controller asserts
RSTOUT for approximately 512 cycles after th e PLL has acqu ired lock.
The part then exits reset and begins operation.
5. 7.1.6 Softw are Reset
A software reset occurs when the SOFT RST bit is set. If the RESET pin
is negated and the PLL has acquired lock, the reset controller asserts
RSTOUT for approximately 512 cycles. Then the part exits reset and
begins operation.
5.7.2 Reset Control Flow
Figure 5-5 shows the reset logic control flow. In the flow description that
follows, there are references in parentheses to the control state box
numbers in the figure. All cycle counts given are approximate.
5.7.2.1 Synchronous Reset Requests
If eit her th e exter nal RESE T pin is asse rted b y an external device fo r at
lea st fou r r ising CLK OUT edg es ( 3), or the watchdog time r tim es ou t, or
software requests a reset, the reset control logic latches the reset
request internally and enables the bus monitor (5). When the current bus
cycle is completed (6), RSTOUT is asserted (7). The reset control logic
waits until the RESET pin is negated (8) and for the PLL to attain lock
(9, 9A) before waiting 512 CLKOUT cycles (10) . The reset control logic
may latch the configuration according to the RCON pin level (11, 11A)
before negating RSTOUT (12).
If the external RESET pin is asserted by an external device for at least
four rising CLKOUT edges during the 512 count (10) or during the wait
for P LL lock (9 A), the re set flow swit ches to (8 ) and waits for the RES ET
pin to be negated before continuing.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Reset Controller Module
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Re set Controller Module 139
Fi gure 5-5. Re set Cont ro l Flow
ASSERT RSTOUT AND
LATCH RESET STATUS
RESET
PIN OR WD TIMEOUT
OR SW RESET?
LOSS OF CLOCK?
LOSS OF LOCK?
BUS CYCLE
ENABLE BUS MONITOR
COMPLETE?
RESET NEGATED?
PLL MODE?
WAIT 512 CLKOUT CYCLES
RCON ASSERTED? LATCH CONFIGURA TION
Y
PLL LOCKED?
POR
ASSERT RSTOUT AND
LATCH R ESET STATUS
NEGATE RSTOUT
Y
N
N
Y
N
N
N
Y
Y
N
Y
N
N
Y
Y
1
2
3
12 11
5
6
7
8
9
10
9A
11A
4
0
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
140 Rese t Controller Module MOTOR OLA
Reset Controller Module
5.7.2.2 Internal Reset Request
If reset i s asserted by an asynchronous internal reset source, such as
loss of clock (1) or loss of lock (2), the reset control logic asserts
RSTOUT (4). The reset control logic waits for the PLL to attain lock
(9, 9A) before waiting 512 CLKOUT cycles (10). Then the reset control
logic may latch the configuration according to the RCON pin level (11,
11A) before negating RSTOUT (12).
If a l oss of lo ck occurs dur ing the 5 12 count ( 10), the reset flow sw itches
to (9A) and waits for the PLL to lock before continuing.
5.7.2.3 Power-On Reset
When the reset sequence is initiated by power-on reset (0), the same
reset sequ ence is followed as for the other asynchr onous reset sources.
5.7.3 Concurrent Resets
This subsection describes the concurrent resets.
5.7.3.1 Reset Flow
If a pow er-o n reset cond ition is d etected dur in g any rese t sequence, t he
power-on reset sequence starts immediately (0).
If the external RESET pin is asserted for at least four rising CLKOUT
edges while waiting for PLL lock or the 512 cycles, the exter nal reset is
recognized. Reset processing switches to wait for the external RESET
pin to negate (8).
If a l oss of clock or loss of lock condition is detected while wa iting fo r the
current bus cycle to complete (5, 6) for an external reset request, the
cycle is terminated. T h e reset status bits are latched (7) and reset
processing waits for the external RESET pin to negate (8).
If a loss of clock or loss of lock condition is detected during the 512-cycle
wait, the reset sequence continues after a PLL lock (9, 9A).
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Reset Controller Module
Interrupts
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Re set Controller Module 141
5.7.3.2 Reset Status Flags
For a power-on reset, the POR bit in RSR is set, and the SOFT, WDR,
EXT, LOC, and LOL bits are cleared even if another type of reset
condition is detected during the reset sequence for the POR.
If a l oss of clock or loss of lock condition is detected while wa iting fo r the
current bus cycle to complete (5, 6) for an external reset request, the
EXT bit along with the LOC and/or LOL bits are set.
5.8 Interrupts
The reset controller does not generate interrupt requests.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
142 Rese t Controller Module MOTOR OLA
Reset Controller Module
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA MCORE M210 Central Processo r Unit (CPU) 143
Technical Data MMC2107
Section 6. MCORE M210 Central Processor Unit (CPU)
6.1 Contents
6.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143
6.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144
6.4 Microarchitecture Summary . . . . . . . . . . . . . . . . . . . . . . . . . .145
6.5 Programming Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147
6.6 Data F o rmat Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149
6.7 Operand Addressing Capabilities. . . . . . . . . . . . . . . . . . . . . .150
6.8 Instruction Set Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . .150
6.2 Introduction
The MCORE M210 central processor unit (CPU) architecture is one of
the most compact, full 32-bit core implementations available. The
pipelined reduced instruction set computer (RISC) execution unit uses
16-bit instructions to achieve maximum speed and code efficiency, while
conserving on-chip memory resources. The instruction set is designed
to suppor t high-le vel language i mplementat ion. A non-i ntrusive re sident
debugging system supports product development and in-situ testing.
The MCORE technology library also encompasses a full complement of
on-chip peripheral modules designed specifically for embedded control
applications.
Total system power consumption is determined by all the system
components, rather than the processor core alone. In particular, memory
power consumption (both on-chip and external) is a dominant factor in
total power consumption of the core plus memory subsystem. With this
in mind, the MCORE instruction set architecture trades absolute
performance capability for reduced total energy consumption. This is
accomplished while maintaining an acceptably high level of performance
at a given clock frequency.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
144 MCORE M210 Central Processo r Unit (CPU) MO TOR OLA
M•CORE M210 Central Processor Unit (CPU)
The stream lined execut ion engi ne uses many of the same perfor mance
enhance ments a nd i mplem enta tion techn iques i ncor porated i n de sktop
RISC processors. A strictly defined load/store architecture minimizes
control complexity. Use of a fixed, 16-bit instruction encoding
significantly lowers the memory bandwidth needed to sustain a high ra te
of instruction execution, and careful selection of the instruction set
allows the code density and overall memory efficiency of the MCORE
architecture to surpass those of complex instruction set computer
(CISC) architectures.
These factor s re duce system ener gy con sumption sign ifica ntly, a nd th e
fully static M CORE design uses other techniques to reduce it even
more. The core uses dynamic clock management to automatically
power-down internal functions that are not in use on a clock-by-clock
basis. It also incorporates three power-conservation operating modes,
which are invoked via dedicated instructions.
6.3 Featur es
The main features of the MCORE are:
32-bit load/store RISC architecture
Fixed 16-bit instruction length
16 entry, 32-bit general-purpose register file
Efficient 4-stage execution pipeline, hidden from application
software
Single-cycle execution for most instructions, 2-cycle branches and
memory accesses
Support for byte/half-word/word memory access
Fast interrupt support, with 16 entry user-controlled alternate
register file
Vectored and autovectored interrupt support
On-chip emulation support
Full static design for minimal power consumption
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
M•CO RE M210 Central Processor Unit (CPU)
Microarchitecture Summary
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA MCORE M210 Central Processo r Unit (CPU) 145
6.4 Microarchitecture Summary
Figure 6-1 is a block di agram of the MCORE processor.
The processor utilizes a 4-stage pipeline for instruction execution. The
instruction fetch, instruction decode/register file read, execute, and
regi ster file writeb ack stages oper ate in an over lapped fashi on, allow ing
single clock instruction execution for most instructions.
The execution unit consists of a 32-bit arithmetic/logic un it, a 32-bit
barrel shifter, a find-first-one unit, result feed-forward hardware, and
miscellaneous support hardware for multiplication, division, and
multiple-register loads and stores.
Figure 6-1. MCORE Processor Block Diagram
SCALE
ADDRESS GENERATION
ADDRESS MUX
GENERAL-PURPOSE
REGISTER FILE
32 BITS X 16
ALTERNATE
REGISTER FILE
32 BITS X 16
CONTROL
RE G ISTER FIL E
32 BITS X 13
IMMEDIATE
MUX
SIGN EXT.
MUX
BARREL SHIFTER
MULTIPLIER
DIVIDER
ADDER/LOGICAL PRIORITY ENCODER/
ZERO DETECT RESULT MUX
DAT A CAL CUL AT ION
PC
INCREMENT BRANCH
ADDER
INSTR UCT IO N PIPELI N E
INSTRUCTION DECODE
ADDRESS
BUS
DATA
X PORT Y PORT
MUX
WRITEBACK BUS
H/W ACCELERATOR INTERFACE BUS BUS
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
146 MCORE M210 Central Processo r Unit (CPU) MO TOR OLA
M•CORE M210 Central Processor Unit (CPU)
Arithmetic and logical operations are executed in a single cycle.
Multiplication is implemented with a 2-bit per clock, overlapped-scan,
modified Booth algorithm with early-out capability, to reduce execution
time for operations with small multipliers. Divide is implemented with a
1-bit per clock early-in algorithm. The find-first-one unit operates in a
single clock cycle.
The program counter unit incorporates a dedicated branch address
adder to minimize delays during change of flow operations. Branch
target addresses are calculated in parallel with branch instruction
decode. Taken branches and jumps require only two clocks; branches
which are not taken execute in a single clock.
Memory load and store operations are provided for 8-bit (byte), 16-bit
(half-word), and 32-bit (word) data, with automatic zero extension for
byte and half-word load operations. These instructions can execute in as
few as two clock cycles. Load and store multiple register instructions
allow low overhead context save and restore operations. These
instructions can execute in (N+1) clock cycles, where N is the number of
registers to transfer.
A condition code/carry (C) bit is provided for condition testing and for use
in imp lemen ti ng arith metic and log ical opera ti ons with oper ands/ resul ts
greate r than 32 bits. The C bit is typi cally set by explicit test /compa rison
operations, not as a side-effect of normal instruction operation.
Exceptions to this rule occur for specialized operations where it is
desirable to combine condition setting with actual computation.
The processor uses autovectors for both normal and fast interrupt
requests. Fast interrupts take precedence over normal interrupts. Both
types ha ve de di cated exceptio n sha dow r egi sters. F or se rvic e requests
of either kind, an automatic vector is generated when the request is
made.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
M•CO RE M210 Central Processor Unit (CPU)
Programming Model
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA MCORE M210 Central Processo r Unit (CPU) 147
6.5 Programming Model
Figure 6-2 shows the MCORE programming model. The model is
defined differently for supervisor and user privilege modes. By
conv ention, in both mod es R15 ser ves as the link r egister for sub routine
calls. R0 is typically used as stack pointer.
Figure 6-2. Programming Model
The user programming model consists of 16 general-purpose 32-bit
registers (R[15:0]), the 32-bit PC, and the C bit. The C bit is implemented
as bit 0 of the pr ocessor status regi ste r (PSR) and is the only portion of
the PSR accessible in the user model.
R0
R0
R1
R2
R3
R4
R5
R6
R7
R8
R9
R12
R13
R14
R15
R11
R10
C
US ER PROGRAMMER’S
MODEL
ALTER NATE FILE
SUPER VISOR PROGRAMM E R’S
MODEL
PC PC
C* BIT 0 OF PSR
PSR
VBR
EPSR
FPSR
EPC
FPC
SS0
SS1
SS2
CR0
CR1
CR2
CR3
CR4
CR5
CR6
CR7
CR8
CR9
SS4 CR10
GCR CR11
SS3
GSR CR12
R15
R0
R1
R2
R3
R4
R5
R6
R7
R8
R9
R12
R13
R14
R11
R10
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
148 MCORE M210 Central Processo r Unit (CPU) MO TOR OLA
M•CORE M210 Central Processor Unit (CPU)
The supervisor programming model consists of the user model plus 16
additional 32-bit general-purpose registers (R[15:0], or the alternate
file), the entire PSR, and a set of status/control registers (CR[12:0]).
Setting the S bit i n the PSR enables supervisor mode operation.
The alternate file allows very low overhead context switching for
real-time event handling. While the alternate file is enabled,
general-purpose operands are accessed from it.
The vector base register (VBR) determines the base address of the
excepti on vector ta ble. E xcep tion s hadow reg isters EPC a nd E P SR are
used to save the states of the program counter and PSR, respectively,
when an exception occurs. Shadow registers FPC and FPSR save the
states of the program counter and PSR, respectively, when an exception
occurs.
Scratch registers (SS[4:0]) are used to handle exception events.
The global control (GCR) and status (GSR) registers can be used for a
variety of system monitoring tasks.
The supervisor programming model includes the PSR, which contains
operation control and status information. In addition, a set of exception
shadow registers is provided to save the state of the PSR and the
program counter at the time an exception occurs. A separate set of
shadow registers is provided for fast interrupt support to minimize
context saving overhead.
Five scratch registers are provided for supervisor software use in
handling exception events. A single register is provided to alter the base
address of the exception vector table. Two registers are provided for
global control and status.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
M•CO RE M210 Central Processor Unit (CPU)
Data Format Summary
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA MCORE M210 Central Processo r Unit (CPU) 149
6.6 Data Format S ummary
The operand data formats supported by the integer unit are standard
two’s-complement dat a formats. The operand size for each instruction is
either explicitly encoded in the instruction (load/store instructions) or
implicitly defined by the instruction operation (index operations, byte
extr action). Typically, instructions operate on all 32 bits of the source
operand(s) and generate a 32-bit result.
Memory is viewed from a big-endian byte ordering perspective. The
most sign ificant byte (byte 0) of word 0 is located at address 0. Bits are
numbered within a word starting with bit 31 as the most significant bit.
Figur e 6-3. Data Organization in Memo ry
Figure 6-4. Data Or ganization in Registers
BYTE 0 BYTE 1 BYTE 2 BYTE 3 WORD AT 0X00 00 000 0
31 0
BYTE 4 BYTE 5 BYTE 6 BYTE 7 WORD AT 0X0000 000 4
BYTE 8 BYTE 9 BYTE A BYTE B WORD AT 0X0000 000 8
BYTE C BYTE D BYTE E BYTE F WORD AT 0X00 00 000 C
BYTE SIGNED BYTE
S
S S S S SS SSSSSSSSSSSSSSS S S S
0
8 7
31
BYTE UNS IGNED B Y TE
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
8 7
31
HALF-WORD SIGNED
S
S S S S S S S S S S S S S S S S
016 1531
HALF-WORD
HALF-WORD UNSIGNED
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
016 1531
HALF-WORD
0
31
WORD
BYTE 3 BYTE 2 BYTE 1 BYTE 0
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
150 MCORE M210 Central Processo r Unit (CPU) MO TOR OLA
M•CORE M210 Central Processor Unit (CPU)
6.7 Operand Addressing Capabilities
M•CORE accesses all memory operands through load and store
instructions, transferring data between the general-purpose registers
and memory. Register-plus-four-bit scaled displacement addressing
mode i s used for load a nd store instruct ions addressi ng byte, half-wo rd,
and word data.
Load and store multiple instructions allow a subset of the 16
general-purpose registers to be transferred to or from a base address
pointed to by register R0 (the default stack pointer by convention).
Load and store register quadrant instructions use register indirect
addressing to transfer a register quadrant to or from memory.
6.8 Instruction Set Overview
The instruction set is tailored to support high-level languages and is
optimized for those instructions most commonly executed. A standard
set of arithmetic and logical instructions is provided, as well as
instruction support for bit operations, byte extraction, data movement,
control flow modification, and a small set of conditionally executed
instructions which can be useful in eliminating short conditional
branches.
Table 6-1 is an alphabetized listing of the MCORE instruction set. Refer
to the MCORE Reference Manual (Motorol a document order number
MCORERM/AD) for more details on instruction operation.
Table 6-1. MCORE Instruction Set (Sheet 1 of 3)
Mnemonic Description
ABS
ADDC
ADDI
ADDU
AND
ANDI
ANDN
ASR
ASRC
Ab s olu t e Value
Add with C B it
Add Imm ediate
Add Unsigned
Logical AND
Logical AND Immedi ate
AND NOT
Ar it hmetic S h if t Rig ht
Arithmetic Shift Right, Update C Bit
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
M•CO RE M210 Central Processor Unit (CPU)
In stru ction Set Overview
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA MCORE M210 Central Processo r Unit (CPU) 151
BCLRI
BF
BGENI
BGENR
BKPT
BMASKI
BR
BREV
BSETI
BSR
BT
BTSTI
Bit Clear Immediate
Branch on C ondition False
Bit Generate Immediate
Bit Generate Register
Breakpoint
Bit Mask Imm e dia te
Branch
Bit Re ve r se
Bit Se t Imm e di a te
Branch to Subroutine
Branch on C ondition True
Bit Test Immediate
CLRF
CLRT
CMPHS
CMPLT
CMPLTI
CMPNE
CMPNEI
Clear Register on Condition False
Clear Register on Condition True
Compare High er or Same
Compare Less Than
Compare Less Than Immedia te
Compare Not Equa l
Compare Not Equal Immediate
DECF
DECGT
DECLT
DECNE
DECT
DIVS
DIVU
DOZE
Decrement on Condition False
Decrement Register and Set Condition if Result Greater T han Zero
Decrement Register and Set Condition if Result Less Than Zero
Decrement Register and Set Condition if Result Not E qual to Zero
Decrement on Condition True
Divide Signed Integer
Divide Unsigned Integer
Doze
FF1 F ind First One
INCF
INCT
IXH
IXW
Incremen t on Condition False
Incremen t on Condition True
Index Half-Word
Index Word
JMP
JMPI
JSR
JSRI
Jump
Jump Indirect
Jump to Subroutine
Jump to Subroutine Indirect
LD.[BHW]
LDM
LDQ
LOOPT
LRW
LSL, LSR
LSLC, LS RC
LSLI, LSRI
Load
Load Multiple Registers
Load Register Quadrant
Decrement with C-Bit Update and Branch if Condition True
Load Relative Word
Logical Shift Left and Right
Logical Shift Left and Right, Update C Bit
Logical Shift Left and Right by Im m edia te
Table 6-1. MCORE Instruction Set (Sheet 2 of 3)
Mnemonic Description
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
152 MCORE M210 Central Processo r Unit (CPU) MO TOR OLA
M•CORE M210 Central Processor Unit (CPU)
MFCR
MOV
MOVI
MOVF
MOVT
MTCR
MULT
MVC
MVCV
Move from Control Register
Move
Move Immediate
Move on Condition False
Move on Condition True
Move to Control Register
Multiply
Move C Bit to Regi ster
Move Inverted C Bit to Register
NOT Logical Complement
OR Logical Inclu sive-OR
ROTLI
RSUB
RSUBI
RTE
RFI
Rotate Lef t by Immediate
Reverse Subtract
Reverse Subtract Immed iate
Return from Exception
Return from Interrupt
SEXTB
SEXTH
ST.[BHW]
STM
STQ
STOP
SUBC
SUBU
SUBI
SYNC
Sign-Extend Byte
Sign-Extend Half-Word
Store
Store Multiple Registers
Stor e Register Quadrant
Stop
Subtract with C B it
Subtract
Subtrac t Immediate
Synchronize
TRAP
TST
TSTNBZ
Trap
Test Operan ds
Test for No Byte Equ al Zero
WAIT Wait
XOR
XSR
XTRB0
XTRB1
XTRB2
XTRB3
Exclus ive OR
Extended Sh ift Right
Extract Byte 0
Extract Byte 1
Extract Byte 2
Extract Byte 3
ZEXTB
ZEXTH Zero-Extend B yte
Zero-Extend Half-Word
Table 6-1. MCORE Instruction Set (Sheet 3 of 3)
Mnemonic Description
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Interrupt Controller Module 153
Technical Data MMC2107
Section 7. Interrupt Controlle r Module
7.1 Contents
7.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154
7.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154
7.4 L ow-Power Mode Operation. . . . . . . . . . . . . . . . . . . . . . . . . .154
7.5 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
7.6 External Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
7.7 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .155
7.7.1 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156
7.7.2 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157
7.7.2.1 Interrupt Control Register. . . . . . . . . . . . . . . . . . . . . . . .157
7.7.2.2 Interrupt Status Register . . . . . . . . . . . . . . . . . . . . . . . .159
7.7.2.3 Interrupt Force Registers . . . . . . . . . . . . . . . . . . . . . . . .160
7.7.2.4 Interrupt Pending Register. . . . . . . . . . . . . . . . . . . . . . .162
7.7.2.5 Normal Interrupt Enable Register. . . . . . . . . . . . . . . . . .163
7.7.2.6 Normal Interrupt Pending Register. . . . . . . . . . . . . . . . .164
7.7.2.7 Fast Interrupt Enable Register. . . . . . . . . . . . . . . . . . . .165
7.7.2.8 Fast Interrupt Pending Register. . . . . . . . . . . . . . . . . . .166
7.7.2.9 Priority Level Select Registers. . . . . . . . . . . . . . . . . . . .167
7.8 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .167
7.8.1 Interrupt Sources and Prioritization . . . . . . . . . . . . . . . . . .168
7.8.2 Fast and Normal Interrupt Requests . . . . . . . . . . . . . . . . .168
7.8.3 Autovectored and Vectored Interrupt Requests. . . . . . . . .169
7.8.4 Interrupt Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . .171
7.8.4.1 MCORE Processor Configuration. . . . . . . . . . . . . . . . .171
7.8.4.2 Interrupt Controller Configuration. . . . . . . . . . . . . . . . . .171
7.8.4.3 Interrupt Source Configuration. . . . . . . . . . . . . . . . . . . .172
7.8.5 Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
154 Interrupt Controller Module MOTOROLA
Inter rup t Contro lle r Module
7.2 Introduction
The inter rupt controll er collects requests fr om multiple interru pt sources
and provides an interface to the processor core interrupt logic.
7.3 Featur es
Features of the interrupt controller module include:
Up to 40 interrupt sources
32 unique programmable priority levels for each interrupt source
Independent enable/disable of pending interrupts based on
priority level
Select normal or fast interrupt request for each priority level
Fast interr upt requests al ways have priority over normal interr upts
Ability to mask interrupts at and below a defined priority level
Ability to select between autovectored or vectored interrupt
requests
Vectored interrupts generated based on priority level
Ability to generate a separate vector number for normal and fast
interrupts
Ability for software to self-schedule interrupts
Software visibility of pending interrupts and interrupt signals to
core
Asynchronous operation to support wakeup from low-power
modes
7.4 Low-Power Mode Operation
The interrupt controller is not affected by any low-power modes. All logic
between the input sources and generating the raw interrupt to the
M•CORE processor i s combinational. This allows the MCORE
processor to wake up during low-power stop mode when all system
clocks are stopped.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Interrupt Controller Module
Block Diagram
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Interrupt Controller Module 155
7.5 Block Diagram
Figure 7-1. Interrupt Controller Block Diagram
7.6 External Signals
No interrupt controller signals connect off-chip.
7.7 Memory Map and Registers
This subsection describes the memory map (see Table 7-1) and
registers.
INTERRUPT
SOURCES
F
I
E
R
F
I
P
R
N
I
P
R
ICR
VECTOR
N
I
E
R
32-TO-5
PRIORITY
ENCODER
OR
OR
&
FVE
NORMAL
AE
I
F
R
M
U
X
32
32
32
40 32
40 x 5 BITS 32
32
40
PLSR
PLSR
AUTOVECTOR
S
Y
N
C
S
Y
N
C
&
&
5
OR PRIORITY
LEVEL
SELECT
I
P
R
ISR
&
ME
5DECODE
MASK
MFI
32 32
32
&
&
FMASK
NMASK
NMASK &
FMASK
PLSR
PLSR
SELECT
AND FAST
INTERRUPTS
NUMBER
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
156 Interrupt Controller Module MOTOROLA
Inter rup t Contro lle r Module
7.7.1 Memory Map
Table 7-1. Interrupt Controller Module Memory Map
A ddres s B i ts 3124 Bits 2316 Bits 158Bits 70 Access(1)
0x00c5_000 0 I nterrupt control register (ICR) Interrupt status register (ISR) S/U
0x00c5_000 4 I nterrupt force register high (I FR H) S/U
0x00c5_000 8 IInterrupt force register low (IFRL) S/U
0x00c5_00 0c Interrupt pending register (IPR) S/U
0x00c5_001 0 Norm al interrupt enable register (NIER) S/U
0x00c5_0014 Norm al interrupt pending register (NIPR) S /U
0x00c5_001 8 Fast interrupt enable register (FIE R) S/U
0x00c5_00 1c Fast int errupt pending register (FIPR) S/ U
0x00c5_0020
through
0x00c5_003c Unimplemented(2)
Priority level sele ct re gisters (PLSR0PLSR39)
0x00c5_0040 PLSR0 PLSR1 PLSR2 PLSR3 S
0x00c5_0044 PLSR4 PLSR5 PLSR6 PLSR7 S
0x00c5_0048 PLSR8 PLSR9 PLSR10 PLSR11 S
0x00c5_004c PLSR12 PLSR13 PLSR14 PLSR15 S
0x00c5_0050 PLSR16 PLSR17 PLSR18 PLSR19 S
0x00c5_0054 PLSR20 PLSR21 PLSR22 PLSR23 S
0x00c5_0058 PLSR24 PLSR25 PLSR26 PLSR27 S
0x00c5_005c PLSR28 PLSR29 PLSR30 PLSR31 S
0x00c5_0060 PLSR32 PLSR33 PLSR34 PLSR35 S
0x00c5_0064 PLSR36 PLSR37 PLSR38 PLSR39 S
0x00c5_0068
through
0x00c5_007c Unimplemented(2)
1. S = CPU supervisor mode access onl y. S/U = CPU supervisor or us er mode access. User mode accesses to super visor
only addresses have no effect and result in a cycle termination transfer error.
2. Accesses to unimpl em ented address locations have no effect and res ult in a cycle termination transfer error.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Interrupt Controller Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Interrupt Controller Module 157
7.7.2 Registers
This subsection contains a des cription of the interr upt control ler module
registers.
7.7.2.1 Interrupt Control Register
The 16-bit interrupt control register (ICR) selects whether interrupt
requests are autovectored or vectored, and if vectored, whether fast
interrupts generate a different vector number than normal interrupts.
This register also controls the masking functions.
AE Autovector Enable Bit
The r ead/write A E bit enab les autovector ed interru pt requests. Reset
sets AE.
1 = Autovectored interrupt requests
0 = Vecto red interrupt reque sts
FVE Fast Vector Enable Bit
The read/write FVE bit enables fast vectored interrupt requests to
have vector numbers separate from normal vectored interrupt
requests. Reset clears FVE.
1 = Uni que vector numbers for fast vectored interrupt requests
0 = Same vector number for fast and normal vectored interrupt
requests
Address: 0x00 c5_0000 and 0x00c5_0001
Bit 15 14 13 12 11 10 9 Bit 8
Read: AE FVE ME MFI 0000
Write:
Reset:10000000
Bit 7654321Bit 0
Read: 0 0 0 MASK4 MASK3 MASK2 MASK1 MASK0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 7-2. Interrupt Control Register (ICR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
158 Interrupt Controller Module MOTOROLA
Inter rup t Contro lle r Module
ME Mask Enable Bit
The read/write ME bit enables interrupt masking. Reset clears ME.
1 = Interrupt masking enabled
0 = Interrupt masking disabled
MFI Mask Fast Interrupts Bit
The read/write MFI bit enables masking of fast interrupt requests.
Reset clears MFI.
1 = Fast interrupt requests masked by MASK value. All normal
interrupt requests are masked.
0 = Fast interrupt requests are not masked regardless of the MASK
value. The MASK only applies to normal interrupts. Reset
clears MFI.
MASK[4:0] Interrupt Mask Fi eld
The read/write MASK[4:0] field determines which interrupt priority
levels are masked. When the ME bit is set, all pending interrupt
requests at priority levels at and below the current MASK value are
masked. To mask all normal interrupts without masking any fast
interrupts, set the MASK value to 31 with the MFI bit cleared. See
Table 7-2. Reset clears MASK[4:0].
Table 7-2. MASK Encoding
MASK[4:0] Masked Priority
Levels
Decimal Binary
0 00000 0
1 00001 10
2 00010 20
3 00011 30
31 11111 31–0
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Interrupt Controller Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Interrupt Controller Module 159
7.7.2.2 Interrupt Status Register
The 16-bit, read-only interrupt status register (ISR) reflects the state of
the i nterr upt co ntroller outpu ts to the M CORE processor. Writes to this
register have no effect and are terminated normally.
INT — Normal Interrupt Request Flag
The read-only INT flag indicates whether the normal interrupt request
signal to the MCORE processor is asserted or negated. Reset clears
INT.
1 = Normal interrupt request asserted
0 = Normal interrupt request negated
FINT Fast Interrupt Request Flag
The read-only FINT flag indicates whether the fast interrupt request
signal to the MCORE processor is asserted or negated. Reset clears
FINT.
1 = Fast interrupt request asserted
0 = Fast interrupt request negated
VEC[6:0] Interrupt Vector Number Field
The read-only VEC[6:0] field reflects the state of the 7-bit interrupt
vector number. Reset clears VEC[6:0].
Address: 0x00 c5_0002 and 0x00c5_0003
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0 0 0000INTFINT
Write:
Reset:00000000
Bit 7654321Bit 0
Read: 0 VEC6 VEC5 VEC4 VEC3 VEC2 VEC1 VEC0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 7-3. Int errupt Status Register (ISR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
160 Interrupt Controller Module MOTOROLA
Inter rup t Contro lle r Module
7.7.2.3 Interrupt Force Registers
The two 32-bit read/write interrupt force registers (IFRH and IFRL)
individually force interrupt source requests.
Address: 0x00 c5_0004 through 0x00c5_0007
Bit 31 30 29 28 27 26 25 Bit 24
Read: 0 0 000000
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: 0 0 000000
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0 0 000000
Write:
Reset:00000000
Bit 7654321Bit 0
Read: IF39 IF38 IF37 IF36 IF35 IF34 IF33 IF32
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 7-4. Interrupt Force Register High (IFRH)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Interrupt Controller Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Interrupt Controller Module 161
IF[39:0] Interrupt Force Field
This read/write field forces interrupt requests at the corresponding
source numbers. IFRH and IFRL allow software generation of
inte rrupt r equests for functional o r debug purposes. W riting 0 to an IF
bit negates the interrupt request. Reset clears the IF[39:0] field.
1 = Force interrupt request
0 = Interrupt source not forced
Address: 0x00 c5_0008 through 0x00c5_000b
Bit 31 30 29 28 27 26 25 Bit 24
Read: IF31 IF30 IF29 IF28 IF27 IF26 IF25 IF24
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: IF23 IF22 IF21 IF20 IF19 IF18 IF17 IF16
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: IF15 IF14 IF13 IF12 IF11 IF10 IF9 IF8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: IF7 IF6 IF5 IF4 IF3 IF2 IF1 IF0
Write:
Reset:00000000
Figure 7-5. Interrupt Force Register Low (IFRL)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
162 Interrupt Controller Module MOTOROLA
Inter rup t Contro lle r Module
7.7.2.4 Interrupt Pending Register
The 32-bit, read-only interrupt pending register (IPR) reflects any
currently pending interrupts which are assigned to each priority level.
Writes to this register have no effect and are terminated normally.
IP[31:0] Interrupt Pending Field
A read-only IPx bit is set when at least one interrupt request is
asserted at priority level x. Reset clears IP[31:0].
1 = At least one interrupt request asserted at priority level x
0 = All interrupt requests at level x negated
Address: 0x0 0c5_000c through 0x00c5_000f
Bit 31 30 29 28 27 26 25 Bit 24
Read: IP31 IP30 IP29 IP28 IP27 IP26 IP25 IP24
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: IP23 IP22 IP21 IP20 IP19 IP18 IP17 IP16
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: IP15 IP14 IP13 IP12 IP11 IP10 IP9 IP8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: IP7 IP6 IP5 IP4 IP3 IP2 IP1 IP0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 7-6. Interrupt Pending Register (IPR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Interrupt Controller Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Interrupt Controller Module 163
7.7.2.5 Normal Interrupt Enable Register
The read/write, 32-bit normal interrupt enable register (NIER)
individually enables any current pending interrupts which are assigned
to each pri ori ty level as a norm al i nter rupt source. E nabling an i nterrupt
source which has an asserted request causes that request to become
pending, and a request to the MCORE processor is asserted if not
already outstanding.
NIE[31:0] Normal Interrupt Enable Field
The read/write NIE[31:0] field enables interrupt requests from sources
at the corresponding priority level as normal interrupt requests. Reset
clears NIE[31:0].
1 = Normal interrupt request enabled
0 = Normal interrupt request disabled
Address: 0x00 c5_0010 through 0x00c5_0013
Bit 31 30 29 28 27 26 25 Bit 24
Read: NIE31 NIE30 NIE29 NIE28 NIE27 NIE26 NIE25 NIE24
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: NIE23 NIE22 NIE21 NIE20 NIE19 NIE18 NIE17 NIE16
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: NIE15 NIE14 NIE13 NIE12 NIE11 NIE10 NIE9 NIE8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: NIE7 NIE6 NIE5 NIE4 NIE3 NIE2 NIE1 NIE0
Write:
Reset:00000000
Figure 7-7. Normal Inter rupt Enable Register (NIER)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
164 Interrupt Controller Module MOTOROLA
Inter rup t Contro lle r Module
7.7.2.6 Normal Interrupt Pending Register
The read-only, 32-bit normal interrupt pending register (NIPR) reflects
any currently pending normal interrupts which are assigned to each
priority level. Writes to this register have no effect and are terminated
normally.
NIP[31:0] Normal Interrupt Pending Field
A rea d-only NIPx bi t is set when at l east one nor mal interru pt request
is asserted at priority level x. Reset clears NIP[31:0].
1 = At least one norma l inte rrupt requ est asserted at prior it y level x
0 = All normal interrupt requests at priority level x negated
Address: 0x00 c5_0014 through 0x00c5_0017
Bit 31 30 29 28 27 26 25 Bit 24
Read: NIP31 NIP30 NIP29 NIP28 NIP27 NIP26 NIP25 NIP24
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: NIP23 NIP22 NIP21 NIP20 NIP19 NIP18 NIP17 NIP16
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: NIP15 NIP14 NIP13 NIP12 NIP11 NIP10 NIP9 NIP8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: NIP7 NIP6 NIP5 NIP4 NIP3 NIP2 NIP1 NIP0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 7-8. Normal Interrupt Pending Register (NIPR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Interrupt Controller Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Interrupt Controller Module 165
7. 7.2.7 Fast Interrupt Enable Register
The read/write, 32-bit fast interrupt enable register (FIER) enables any
curren t pe nding interrupts w hich are assign ed at each prior it y level as a
fast interrupt source. Enabling an interrupt source which has an asserted
request causes that interrupt to become pending, and a request to the
M•CORE processor is asserted if not already outstanding.
FIE[31:0] Fast Interrupt Enable Fiel d
The read/write FIE[31:0] field enables interrupt requests from sources
at the corresponding priority level as fast interrupts. Reset clears
FIE[31:0].
1 = Fast interrupt enabled
0 = Fast interrupt disabled
Address: 0x00 c5_0018 through 0x00c5_001b
Bit 31 30 29 28 27 26 25 Bit 24
Read: FIE31 FIE30 FIE29 FIE28 FIE27 FIE26 FIE25 FIE24
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: FIE23 FIE22 FIE21 FIE20 FIE19 FIE18 FIE17 FIE16
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: FIE15 FIE14 FIE13 FIE12 FIE11 FIE10 FIE9 FIE8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: FIE7 FIE6 FIE5 FIE4 FIE3 FIE2 FIE1 FIE0
Write:
Reset:00000000
Figure 7-9. Fast Inter rupt En able Register (FIER)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
166 Interrupt Controller Module MOTOROLA
Inter rup t Contro lle r Module
7. 7.2.8 Fast Interrupt Pending Register
The read-only, 32-bit fast interrupt pending register (FIPR) reflects any
currently pending fast interrupts which are assigned to each priority
level. Writes to this register have no effect and are terminated normally.
FIP[31:0] Fast Interrupt Pending Fiel d
A read-only FIP[x] bit is set when at least one interrupt request at
priority level x is pending and enabled as a fast interrupt. Reset clears
FIP[31:0].
1 = At least one fast interrupt request asserted at priority level x
0 = Any fast interrupt requests at priority level x negated
Address: 0x0 0c5_001c through 0x00c5_001f
Bit 31 30 29 28 27 26 25 Bit 24
Read: FIP31 FIP30 FIP29 FIP28 FIP27 FIP26 FIP25 FIP24
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: FIP23 FIP22 FIP21 FIP20 FIP19 FIP18 FIP17 FIP16
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: FIP15 FIP14 FIP13 FIP12 FIP11 FIP10 FIP9 FIP8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: FIP7 FIP6 FIP5 FIP4 FIP3 FIP2 FIP1 FIP0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfer error exception.
Figur e 7-10. Fast Interrupt Pending Register (FIPR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Interrupt Controller Module
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Interrupt Controller Module 167
7.7.2.9 Priority Level Select Registers
There are 40 read/write, 8-bit priority level select registers
PLSR0PLSR39, one for every interrupt source. The PLSRx register
assigns a priority level to interrupt source x.
PLS[4:0] Priority Level Select Field
The PLS[4:0] field assigns a priority level from 0 to 31 to the
corresponding interrupt source. Reset clears PLS[4:0].
7.8 Functional D escription
The interrupt controller collects interrupt requests from multiple interrupt
sources and provides an interface to the processor core interrupt logic.
Interrupt controller functions include:
Interrupt source prioritization
Fast and normal interrupt requests
Autovectored and vectored interrupt requests
Interrupt configuration
Address: 0x00 c5_0040 through 0x00c5_0067
Bit 7654321Bit 0
Read: 0 0 0 PLS4 PLS3 PLS2 PLS1 PLS0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 7-11. Priority Level Select Registers (PLSR0PLSR39)
Table 7-3. Priority Select Encoding
PLS[4:0] Priority Level Vector Numbe r
00000 0 (lowest) 00000
00001–11110 1–30 00001–11110
11111 31 (highest) 11111
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
168 Interrupt Controller Module MOTOROLA
Inter rup t Contro lle r Module
7.8.1 Interrupt Sources and Prioritization
Each interrupt source in the system sends a unique signal to the interrupt
controller. Up to 40 interrupt sources are supported. Each interrupt
source can be programmed to one of 32 priority levels using PLSR in the
interrupt controller. The highest priority level is 31 and l owest priority
level is 0. By default, each interrupt source is assigned to the priority
level 0. Each interrupt source is associated with a 5-bit priority level
select value tha t selects one of 32 priority levels. The inte rrupt controller
uses the priority levels as the basis for the generation of all interrupt
signals to the MCORE processor.
Interrupt requests may be forced by software by writing to IFRH and
IFRL. Each bit of IFRH and IFRL is logically ORed with the
corresponding interrupt source signal before the priority level select
logic. To negate the forced interrupt request, the interrupt handler can
clea r the app ropr iate IF R bit. IPR ref l ects the state of each pr iority level .
7.8.2 Fast and Normal Interrupt Requests
FIER allows individual enabling or masking of pending fast interrupt
requests. FIER is logically ANDed with IPR, and the result is stored in
FIPR. FIPR bits are bit-wise ORed together and inverted to form the fast
interrupt signal routed to the MCOR E processor. The FIP R allows
sof tware to quickly determine the highest pr iority pend i ng fast inter rupt.
The output of FIPR also feeds into a 32-to-5 priority encoder to generate
the vector number to present to the MCORE processor if vectored
interrupts are required.
NIER allows individual enabling or masking of pending normal inter rupt
requests. NIER is l ogically ANDed with IPR, and the result is stored in
NIPR. NIPR bits are bit-wise ORed together and inverted to form the
normal interrupt signal routed to the MCORE processor. The normal
interrupt signal is only asserted if the fast interrupt signal is negated. The
NIPR allows software to quickly determine the highest priority pending
normal interrupt. The output of NIPR also feeds into a 32-to-5 priority
encoder to generate the vector number to present to the MCORE
processor if vectored interrupts are required. If the fast interrupt signal is
asserted, then the vector number is determined by the highest priority
fast interrupt.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Interrupt Controller Module
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Interrupt Controller Module 169
If an interrupt is pending at a given priority level and both the
corresp onding FIE R and N IER b its are set, th en both the correspond ing
FIPR and NIPR bits are set, assuming these bits are not masked.
Fast interrupt requests always have priority over normal interrupt
request s , even if the norm al i nter rup t req uest is a t a hi g her prior ity level
than the highest fast interrupt request.
If the fast interr upt signal i s asser ted wh en th e n orma l inter rup t signa l i s
already asserted, then the normal interrupt signal is negated.
IPR, NIPR, and FIPR are read-only. To clear a pending interrupt, the
interrupt must be cleared at the source using a special clearing
sequence defined by each source. All interrupt sources to the interrupt
controller are to be held until recognized and cleared by the interrupt
service routine. The interrupt controller does not have any edge-detect
logic. Edge-triggered interrupt sources are handled at the source
module.
In ICR, the MASK[4:0] bits can mask interrupt sources at and below a
selected priority level. The MFI bit determines whether the mask applies
only to normal interrupts or to fast interrupts with all normal interrupts
being masked. The ME bit enables interrupt masking.
ISR reflects the current vector number and the states of the signals to
the MCORE processor.
The vector number and fast/normal interrupt sources are synchronized
before being sent to the MCORE processor. Thus, the interrupt
controller adds one clock of latency to the interrupt sequence. The fast
and normal interrupt raw sources are not synchronized to allow these
signals to be used to wake up the MCORE processor during stop mode
when all system clocks are stopped.
7.8.3 Autovectored and Vectored Interrupt Requests
The AE bit in ICR enables autovectored interrupt requests to the
M•CORE processor. AE is set by defau lt, and all interrupt requests are
autovecto red. An interr upt handler may read FIPR or NIPR to determine
the pri ority of the interr upt source. If m ultiple inte rrupt sour ces share the
same priority level, then it is up to the interrupt service routine to
determine the correct source of the interrupt.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
170 Interrupt Controller Module MOTOROLA
Inter rup t Contro lle r Module
If the AE bit is 0, then each interrupt request is presented with a vector
number. The low five bits of the vector number (40) are determined
based on the highest pending priority, with active fast interrupts having
pri ority over ac tive normal interru pts. The re maining tw o bits (vector bits
5 and 6) are deter mined base d on whethe r the i nterrup t request is a f ast
inte rrupt an d the set ting of the FVE bi t. If FVE is set, then a fa st interrup t
request has a vector number different from that of a normal interrupt
request as shown in Table 7-4.
If FV E is 0, bo th nor mal and fast interrupt s requests assigned t o prio ri ty
levels 031 are mapped to vector numbers 3263 in the vector table. If
FVE is 1, normal interrupt requests assigned to priority levels 031 are
mapped to vector numbers 3263 in the vector table.
If FVE is 1, then fast interrupt requests assigned to priority levels 031
are m apped to vector n umbers 6 495 in the vector table. See Table 7-5.
Table 7-4. Fast Inter ru pt Vecto r Number
Fast Inte rrup t FVE Interru pt Ve c tor
Bits 6:5
No X 01
X0 01
Yes 1 10
Table 7-5. Vector Table Mapping
Vector
Number Usage Inte rru pt Vector
Bits 6:5
0–31 Fixed exceptions (including autovectors) 00
32–63 Vectored interrupts
32 = l owest priority
63 = highest priority 01
64–95 Vectored interrupts
64 = l owest priority
95 = highest priority 10
96–127 Vect ored interrupts (not used) 11
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Interrupt Controller Module
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Interrupt Controller Module 171
7.8.4 Interrupt Configuration
After reset, all interrupts are disabled by default. To properly configure
the system to handle interrupt requests, configuration must be
performed at three levels:
M•CORE processor
Interrupt controller
Local interrupt sources
Configure the MCORE first, the interrupt controller second, and the
local interrupt sources last.
7. 8.4.1 MCORE Processor Configuration
For fast interrupts, set the FIE[x] bit in FIER in the MCORE processor.
For normal i nterr upts, set the NIE[x] bit. Both FIE and NIE are cleared a t
reset. To allow long latency, multicycle instr uctions to be interrupted
before completion, set the IC bit.
VBR in the MCORE processor defines the base address of the
exception vector table. If autovectors are to be used, then initialize the
INT and FINT autovectors (vector numbers 10 and 11, respectively). If
vect ored inter rup ts are to be used, then initialize t he ve ctore d inte rrup t s
(v ector numb ers 32–63 and/or 6495). Whether 32 or 64 vectors are
required depends on whether the fast interrupts share vectors with the
normal interr upt sou rces ba sed on the F VE bit i n th e inter rup t contr oller
ICR.
For each vector number, create an interrupt service routine to service
the interrupt, clear the local interrupt flag, and return from the interrupt
routine.
7.8.4.2 Interrupt Controller Configuration
By defau lt, each interrupt sou rce to the interru pt controll er is assigned a
priority level of 0 and disabled. Each interrupt source can be
programmed to one of 32 priority levels and enabled as either a fast or
normal interrupt source. Also, the FVE and AE bits in ICR can be
programmed to select autovectored/vectored interrupts and also
determine if the fast interrupt vector number is to be separate from the
normal interrupt vector.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
172 Interrupt Controller Module MOTOROLA
Inter rup t Contro lle r Module
7.8.4.3 Interrupt Source Configuration
Each module that is capable of generati ng an interrupt request has an
interrupt request enable/disable bit. To allow the interrupt source to be
asserted, set the local interrupt enable bit.
Once an interrupt request is asserted, the module keeps the source
asserted unti l the inte rru pt servi ce routine perf orms a speci al sequ ence
to cl ear the inte rrupt flag. Clearing the fla g negates th e interrupt request.
7.8.5 Interrupts
The interrupt controller assigns a number to each interrupt source, as
Table 7-6 shows.
Table 7-6. Interrupt Source Assignment
Source Mod ule Flag Source Desc ription Flag Clear ing Mechan ism
0
ADC
PF1 Queue 1 conversion pause Write PF1 = 0 after reading PF1 = 1
1 CF1 Queue 1 conver sion complete Write CF1 = 0 after reading CF1 = 1
2 PF2 Queue 2 conversion pause Write PF2 = 0 after reading PF2 = 1
3 CF2 Queue 2 conversion complete Write CF2 = 0 after reading CF2 = 1
4SPI MODF M ode fa ult Write to SPICR1 after re ading MODF = 1
5 SPIF Transfer complete Access SPIDR after reading SPIF = 1
6
SCI1
TDRE T ransmit data register empty Write SCIDRL after re ading TD RE = 1
7 TC T ransmit complete Write SCIDRL after re ading TC = 1
8 RDRF Receive data regist er full Read S CIDRL after reading RDRF = 1
9 OR Rec ei ver overrun Read SCIDRL after reading OR = 1
10 IDLE Receiver line idle Read SCIDRL after reading ID LE = 1
11
SCI2
TDRE T ransmit data register empty Write SCIDRL after re ading TD RE = 1
12 TC T ransmit complete Write S CIDRL after reading TC = 1
13 RDRF Receive data regist er full Read S CIDRL after reading RDRF = 1
14 OR Recei ver overrun Read SCIDRL after reading OR = 1
15 IDLE Receiver line idle Read SCIDRL after reading ID LE = 1
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Interrupt Controller Module
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Interrupt Controller Module 173
16
TIM1
C0F Timer channel 0 Write C0F = 1 or access IC/OC if TFFCA = 1
17 C1F Timer channel 1 Write 1 to C1F or access IC/OC if TFFCA = 1
18 C2F Timer channel 2 Write 1 to C2F or access IC/OC if TFFCA = 1
19 C3F Timer channel 3 Write 1 to C3F or access IC/OC if TFFCA = 1
20 TOF Timer overflow Write TOF = 1 or access TIMCNTH/L if TFFCA = 1
21 PAIF Pulse accumulator input Wri te PAIF = 1 or access PAC if TFFCA = 1
22 PAOVF Pulse accumu lator overflow Write P AOV F = 1 or access PAC if T FFC A = 1
23
TIM2
C0F Timer channel 0 Write C0F = 1 or access IC/OC if TFFCA = 1
24 C1F Timer channel 1 Write C1F = 1 or access IC/OC if TFFCA = 1
25 C2F Timer channel 2 Write C2F = 1 or access IC/OC if TFFCA = 1
26 C3F Timer channel 3 Write C3F = 1 or access IC/OC if TFFCA = 1
27 TOF Timer overflow Write TOF = 1 or access TIMCNTH/L if TFFCA = 1
28 PAIF Pulse accumulator input Wri te PAIF = 1 or access PAC if TFFCA = 1
29 PAOVF Pulse accumu lator overflow Write P AOV F = 1 or access PAC if T FFC A = 1
30 PIT1 PIF PIT interrupt flag Write PIF = 1 or write PMR
31 PIT2 PIF PIT interrupt flag Write PIF = 1 or write PMR
32
EPORT
EPF0 Edge port flag 0 Write EPF0 = 1
33 EPF1 E dge port flag 1 Write E P F1 = 1
34 EPF2 E dge port flag 2 Write E P F2 = 1
35 EPF3 E dge port flag 3 Write E P F3 = 1
36 EPF4 E dge port flag 4 Write EPF4 = 1
37 EPF5 Edge port flag 5 Wri te EPF5 = 1
38 EPF6 E dge port flag 6 Write E P F6 = 1
39 EPF7 E dge port flag 7 Write E P F7 = 1
Table 7-6. Interrupt Source Assignment (Continued)
Source Mod ule Flag Source Desc ription Flag Clear ing Mechan ism
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
174 Interrupt Controller Module MOTOROLA
Inter rup t Contro lle r Module
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Static Random-Access Memory (SRAM) 175
Technical Data MMC2107
Section 8. Static Random-Access Memory (SRAM)
8.1 Contents
8.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175
8.3 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175
8.4 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176
8.5 Standby Power Supply Pin (VSTBY) . . . . . . . . . . . . . . . . . . . .176
8.6 Standby Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176
8.7 Reset Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177
8.8 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177
8.2 Introduction
Features of the static random-access memory (SRAM) include:
On-chip, 8-Kbyte static random-access memory (SRAM)
Fixed address space
Byte, half-word (16-bit), or word (32-bit) read/write accesses
One clock per access (including bytes, half-words, and words)
Supervisor or user mode access
Stand by powe r sup pl y switch to support an external p ower supply
8.3 Mo des of Operation
Access to the SRAM is not restricted in any way. The array can be
accessed in all supervisor and user modes.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
176 Static Random- Access Memory (SRAM) MOTOROLA
Static Random- Access Memory (SRAM)
8.4 Low-Power Modes
In wait, doze, and stop modes, clocks to the SRAM are disabled. No
recovery time is required when exiting any low-power mode.
8.5 Standby Power Supply Pin (VSTBY)
The standby power supply pin (VSTBY) provides standby voltage to the
RAM array if VDD is lost. VSTBY is isolated from all other VDD nodes.
8.6 Standby Operation
When the chip is powered down, the contents of the SRAM array are
maintained by the standby power supply, VSTBY. If the standby voltage
falls below the minimum required voltage, the SRAM contents may be
corrupted. The SRAM automatically switches to standby operation with
no l oss o f dat a when the vol tage on VDD is below the voltage on V STBY.
In standby mode, the SRAM does not respond to any bus cycles.
Unexpected operation may occur if the central processor unit (CPU)
requests data from the SRAM in standby mode. If standby operation is
not needed, then the VSTBY pin should be connected to VDD.
The current on VSTBY may exceed its specified maximum value at some
time during the transition time during which VDD is at or below the
volta ge switch threshold to a thr eshold abo ve V SS. If the sta ndby power
supply cannot provide enough current to maintain VSTBY above the
requi red minimu m value, th en a capacitor must be provi ded from V STBY
to VSS. The value of the capacitor, C, can be calculated as:
where:
I is the differe nce between the transition current req ui rement a nd th e
maximum power supply current,
t is the duration of the VDD transition near the voltage switch
threshold, a nd
V is the difference between the minimum available supply voltage and
the required minimum VSTBY voltage.
CI
t
V
----
×=
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Static Random-Acce ss Memory (SRAM)
Reset Operation
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Static Random-Access Memory (SRAM) 177
8.7 Reset Op eration
The SRAM contents are undefined immediately following a power-on
reset. SRAM contents are unaffected by system reset.
If a synchronous reset occurs during a read or write access, then the
access completes normally and any pipelined access in progress is
stopped without corruption of the SRAM contents.
8.8 Interrupts
The SRAM module does not generate interrupt requests.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
178 Static Random- Access Memory (SRAM) MOTOROLA
Static Random- Access Memory (SRAM)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMFR) 179
Technical Data MMC2107
Section 9. Non-Volatile Memory FLASH (CMFR)
9.1 Contents
9.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .180
9.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .181
9.4 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .182
9.4.1 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .182
9.4.2 Disabled Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .182
9.5 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183
9.6 Glossary of Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185
9.7 Registers and Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . .186
9.7.1 Control Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187
9.7.1.1 CMFR Module Configuration Register. . . . . . . . . . . . . .188
9.7.1.2 CMFR Module Test Register . . . . . . . . . . . . . . . . . . . . .193
9.7.1.3 CMFR High-Voltage Control Register . . . . . . . . . . . . . .196
9.7.2 Array Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .203
9.7.2.1 Read Page Buffers. . . . . . . . . . . . . . . . . . . . . . . . . . . . .203
9.7.2.2 Program Page Buffers . . . . . . . . . . . . . . . . . . . . . . . . . .204
9.8 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205
9.8.1 Master Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205
9.8.2 Register Read and Write Operation. . . . . . . . . . . . . . . . . .205
9.8.3 Array Read Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .205
9.8.4 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206
9.8.4.1 Program Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . .207
9.8.4.2 Program Margin Reads . . . . . . . . . . . . . . . . . . . . . . . . .211
9.8.4.3 Programming Shadow Information. . . . . . . . . . . . . . . . .212
9.8.4.4 Program Pulse-Width and Amplitude Modulation . . . . .213
9.8.4.5 Overprogramming . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
180 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
9.8.5 Erasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214
9.8.5.1 Erase Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215
9.8.5.2 Erase Margin Reads . . . . . . . . . . . . . . . . . . . . . . . . . . .218
9.8.5.3 Erasing Shadow Information Words. . . . . . . . . . . . . . . .219
9.8.6 Erase Pulse Amplitude and W idth Modulation. . . . . . . . . .219
9.8.7 Emulation Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220
9.9 Master Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220
9.10 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220
9.2 Introduction
This section descr ibes th e ope ration of the embedded F LASH m emor y.
The FLASH memory can be read, programmed, and erased from a
single external programming voltage suppl y, VPP. The program and
erase operations are enabled through the use of an internal charge
pump.
The CDR MoneT FLASH uses the Motorola one-transistor bitcell
(MoneT). The 128-Kbyte CMFR array is divided into 16-Kbyte
(16,384 bytes) array blocks. The CMFR array size is created by using
eight array blocks.
The primary function of the CMFR is to serve as electrically
programmable and erasable NVM to store program instructions and/or
data. It is a class of nonvolatile solid state silicon memory device
consisting of an array of isolated elements, a means for selectively
adding and removing charge to the elements electrically and a me ans of
selectively sensing the stored charge in the elements. When power is
removed from the device, the stored charge of the isolated elements are
retained.
The CM FR is ar ran ged i nt o two m ajor se cti ons a s shown i n Figur e 9- 1 .
The first section is the MoneT array used to store system program and
data. The second section is the bus interface unit (BIU) that controls
access and operation of the CMFR array.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Features
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 181
9.3 Featur es
Features of the CMFR module include:
MoneT FLASH bitcell
128-Kbyte array size using 16-Kbyte blocks
Array block restriction control:
Array block erasing
Array protection for program and erase operations
Supervisor space and supervisor/unrestricted space selection
Data space and instruction/data spaces selection.
32-bit word length
Page mode read:
Retains two separate pages
Read page size of 32 bytes (8 words)
Off-page read access time of two clocks
On-page read access time of one clock
Programming:
Program up to 512 bytes at a time
Simultaneously program up to eight 64-byte pages located at
the same block offset address
External VPP program and erase power supply
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
182 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
9.4 Mo des of Operation
This subsection describes the two modes of operation:
1. S top mode
2. Disabled mode
9.4.1 Stop Mode
When the FSTOP bit in the CMFR module configuration register
(CMFRMCR) register is set, the CMFR enters a low-power operation
mode. Write to FSTOP bit is allowed only when SES = 0 in the CMFR
high-voltage control register (no high-voltage operations). When the
FSTOP bit is set, only CMFRMCR can be accessed, accesses to the
array are ignored, and accesses to other registers are terminated with
bus errors. To prevent unpredictable behavior it is recommended to
change this bit separately. The CMFR requires a recovery time of 16
clocks after exiting stop mode. This means that if a read access to the
array is done immediately after writing FSTOP = 0, the access is
completed after 16 clocks.
9.4.2 Disabled Mode
When the DI S bit in CMF RMCR is set, the arr ay is di sabled and the BIU
does not respond to array accesses. Write to DIS bit is allowed only
when SES = 0 (no high-voltage operations). Disabling the CMFR does
not place the module in the lowest power consumption mode like stop
mode, b ut does pl ace the CMFR in a safe state and preven ts the CMFR
from conflicting on the internal bus during an external boot. There is no
recovery time required when re-enabling the CMFR.
For details of the CMFR module configuration register (CMFRMCR) see
9.7.1.1 CMFR Module Configuration Register and 9.7.1.3 CMFR
High-Voltage Co ntrol Reg ister.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Block Diagram
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 183
9.5 Block Diagram
Figure 9-1. CMFR 128-Kbyte Block Diagram
The CMFR is divided into array blocks to allow for independent erase,
address attributes restriction, and protection from program and erase for
each array block. The size of an array b lock in the CMFR module is fixed
at 16 Kbytes. The total CMF R array is distributed into eight blocks. F or
a detailed description of the read page buffer operation see 9.7.2.1 Read
Page Buffers and 9.8.3 Array Read Operation.
BUS INTERFACE UNIT (BIU)
0x0001_c0000x0001_ffff
0x0001_80000x0001_bfff
0x0001_40000x0001_7fff
0x0000_c0000x0000_ffff
0x0000_80000x0000_bfff
0x0000_40000x0000_7fff
0x0000_00000x0000_3fff
0x0001_00000x0001_3fff
16-KBYTE ARRA Y BLOC K 0
16-KBYTE ARRA Y BLOC K 1
16-KBYTE ARRA Y BLOC K 2
16-KBYTE ARRA Y BLOC K 3
16-KBYTE ARRA Y BLOC K 4
16-KBYTE ARRA Y BLOC K 5
16-KBYTE ARRA Y BLOC K 6
16-KBYTE ARRA Y BLOC K 7
AND SHAD O W INFO RMA TION
64-BYTE PROGR AM PAGE BU FFER 0
64-BYTE PROGR AM PAGE BU FFER 1
32-BYTE READ PAG E BUFF ER 0
64-BYTE PROGR AM PAGE BU FFER 2
64-BYTE PROGR AM PAGE BU FFER 3
64-BYTE PROGR AM PAGE BU FFER 4
64-BYTE PROGR AM PAGE BU FFER 5
32-BYTE READ PAG E BUFF ER 1
64-BYTE PROGR AM PAGE BU FFER 6
64-BYTE PROGR AM PAGE BU FFER 7
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
184 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
To improve system performance, the BIU accesses information in the
array at 32 bytes per access. These 32 b ytes ar e cop ie d in a rea d pa ge
buffer aligned to the low-order addresses. A CMFR array contains two
non-over lapping read page buffers. The first read page buffer is
associated to the lower array blocks. The second r ead page buffer is
associated to the higher array blocks. Read access time of the data in
the cur rent r ead page buffers is one syste m clock, while the time to read
a new page into a page buffer and access the required information is two
system clocks. These accesses are known as an on-page read and an
off-page read, respectively. To prevent the BIU from accessing an
unnecessary page from the array, the CMFR monitors the address to
determine if the required information is in one of the two current read
page buffe rs and the access is valid for the module. This strategy allows
the CMFR to have a two-clock read for an off-page access and one-clock
for an on-p age access. In normal operation write accesses to the CMFR
array are not allowed, a write access causes a bus error.
The CMFR requires an external program or erase voltage, VPP, to
progr am or erase the arra y. Special contro l logic is includ ed to requi re a
specific series of read and write accesses.
To improve program performance, the CMFR programs up to eight
unique 64-byte pages simultaneously in eight separate array blocks.
These 64 bytes are aligned to the low-order addresses to form a
program page buffer.
Each of the page s being pr ogrammed si multaneously are located at the
same block offset address. Erasing is performed on one or more of the
selected array blocks simultaneously.
An extra row (256 bytes) of the CMFR array is used to provide reset
configuration information and is called shadow information. This row
may be accessed by setting the SIE bit in the CMFR module
configuration register and accessing the CMFR array. The shadow
information is in the lowest array block 0 of the CMFR array. Note that
the shadow row is erased with block 0.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Glossary of Terms
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 185
9.6 Glossary of Terms
Array block CMFR array subdivision is a 16-Kbyte contiguous block
of information. Each array block can be erased independently.
BIU Bus inter face unit that controls access and o peration of the CMFR
CMFRCDR MoneT FLASH ARray
Erase interlock write A write to any CMFR array address after
initializing the erase sequence
Era se margin r ead Special o ff-page re ad of the C MFR array i n which
the CMFR hardware adjusts the reference of the sense amplifier to
check for correct erase operation. All CMFR off-page reads between the
erase interlock write and clearing the SES bit are erase margin reads.
Initialize program/erase sequence The write to the high-voltage
control register that changes the SES bit from a 0 to a 1
MoneT The Motorola one-transistor bitcell
Off-page read Array read operation that requires two clocks and
updates a page buffer
On-page read Array read operation that accesses inform ati on in one
of the read page buffers and requires one clock.
Overprogrammed By exceeding the specified programming time
and/or voltage, a CMFR bit can be overprogrammed. This causes
erased bits in the same column in the same array block to read as
programmed.
Programm ing write A write to a CMFR array address to transfer
information into a program page buffer. The CMFR accepts
programming writes after initializing the program sequence until the EHV
bit is changed from a 0 to a 1.
Program m argin read Special off-page read of the CMFR array in
which the CMFR hardware adjusts the reference of the sense amplifier
to check for correct program operation. All CMFR array off-page reads
between the first programming write and clearing the SES bit are
program margin reads.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
186 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
Pr ogram p age buffe r 64 bytes of information used to program the
CMFR. This information is aligned to a 64-byte boundary within the
CMFR. The CMFR module has eight program page buffers, one per
array block.
Read page buffer 32-byte block of information that is read from the
CMFR array. This information is aligned to a 32-byte boundary within the
CMFR. The CMFR module has two read page buffers.
Shad ow information An extra row (256 bytes) of the CMFR array
used to provide Motorola internal use data and also possibly user
defi ned infor mat ion. This row may be accessed by setting the S IE bit in
the CMFR module configuration register and accessing the CMFR array.
The shadow information is the lowest array block 0 of the CMFR array.
9.7 Registers an d Memory Map
The CMFR module consists of two addressed sections. The first is the
32-byte control registers used to configure, program, era se, and test the
array while, the second is the array. See Figure 9-2.
Figure 9-2. CMFR Array and Control Register Addressing
0x00d0_0020
0x00d0_0000
0x0001_ffff
0x0000_0000
FLAS H CO NTRO L
32 BYTES
CMFR FLASH
128 KBYTE S
0x00d0_001f
0x00d0_000c
0x00d0_000b
0x00d0_0008
0x00d0_0007
0x00d0_0004
0x00d0_0003
0x00d0_0000
UNIMPLEMENTED
CMFR HIGH- V OL TAGE CONT RO L
REGISTER (CMFRCTL)
CMFR MO DULE TEST REGIS TER
(CMFRMTR)
CMFR MO DULE CONFIGURATION
REGIS TE R ( CMFRMCR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Registe rs and Memory Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 187
9.7.1 Contr ol Registers
The control registers control CMFR operation. On reset, the registers are
loaded with default reset information.
The access time of a CMFR register is one system clock for both read
and write accesses. Accesses to unimplemented registers cause the
BIU to generate a transfer error exception.
Table 9- 1. Non-Volatile Memory FLASH Me mory M ap
Address Control Register
Located in Supervisor Data Space
0x00d0_ 0000 Module configuration register (CMFR MCR)
0x00d0_ 0004 Module test register (CMFRMTR)
0x00d0_0008 High-voltage control register (CMFRCTL)
0x00d0_000c
through
0x00d0_001f Unimplemented
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
188 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
9.7.1.1 CMFR Module Configuration Register
The CMFR module configuration register (CMFRMCR) controls
operation of the CMFR array and BIU.
Address: 0x00d0_0000 through 0x00d0_0003
Bit 31 30 29 28 27 26 25 Bit 24
Read: FSTOP FDBG 0EME SIE LOCKCTL DIS RSVD24
Write:
Reset: 0 0 0 Note 1 0 0 Note 1 0
Bit 23 22 21 20 19 18 17 Bit 16
Read: SUPV7 SUPV6 SUPV5 SUPV4 SUPV3 SUPV2 SUPV1 SUPV0
Write:
Reset:11111111
Bit 15 14 13 12 11 10 9 Bit 8
Read: DATA7 DATA6 DATA5 DATA4 DATA3 DATA2 DATA1 DATA0
Write:
Reset:00000000
Bit 765 4321Bit 0
Read: PROTECT7 PROTECT6 PROTECT5 PROTECT4 PROTECT3 PROTECT2 PROTECT1 PROTECT0
Write:
Reset:11111111
= Writ es have no effect and the access terminates without a transfer error exception.
Notes:
1. Reset state is determined during reset configurati on.
Figure 9-3. CMFR Module Configuration Register (CMFRMCR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Registe rs and Memory Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 189
FSTOP FLASH Stop Enable Bit
The read-always FSTOP bit causes the CMFR to enter a low-power
stop m ode. W riting ha s n o e ffect if S ES = 1. W he n FS TOP is set, the
BIU continues to operate to allow accesses to CMFRMCR. Accesses
to other registers are terminated with bus error. Accesses to the array
are ignored. To prevent unpredictable behavior, change the FSTOP
bit in a separate write operation.
1 = CMFR in low-power stop mode
0 = CMFR in normal mode
FDBG FLASH Debug Enable Bit
The read/write FDBG bit determines whether the set-once LOCKCTL
bit is writable when the chip is in deb ug mode. Writing to the FDBG bit
must occur before the LOCKCTL bit is writable.
1 = Debug mode enabled
0 = Debug mode disabled
EME Emulation Enable Bit
The read-always EME bit enables the CMFR to enter emulation
mode. EME is writable when the LOCKCTL and DIS bits are set.
During emulation mode the CMFR terminates array access cycles,
but does not drive data. Array data can be emulated by reading an
external memory, and on-page/off-page timing is the same as in
non-emulation mode. Note that write accesses to the array space are
the same as normal mode.
1 = Emulation mode enabled
0 = Emulation mode disabled
For more information about emulation operation see 9.8.7 Emulation
Operation.
SIE Shadow Information E nable Bit
The read-always SIE bit selects the shadow information row. SIE is
write-protected when the ERASE bit is clear and the SES bit is set.
When SIE is set and an array location is read using supervisor data,
the shadow information is read from a location determined by the
column, 32 byte read page select, and word addresses of the access.
Accessing the control block registers accesses the registers and not
the shadow information.
1 = Shadow information enabled; normal array access disabled
0 = Shadow information disabl ed; normal array access enabled
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
190 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
The address range of the shadow information is the entire address
range of the array, but the high order array addresses, are not used
to encode the location.
NOTE: When SI E = 1, only the p rogr am p age buffer assoc ia ted with the lowest
block can be programmed. The other program page buffers cannot be
accessed and do not apply any programming voltages to their array
blocks while programming the shadow information. The shadow
information is in block 0.
LOCKCTL Lock Control Bit
The read-always, set-once LOCKCTL bit controls the write-lock
function. Once the LOCKCTL bit is set in normal operation, the
write-lock can only be disabled again by a master reset. The
LOCKCTL bit is writable if the device is in debug mode.
1 = Write-locked registers protected
0 = Write-lock disabled
Setting the LOCKCTL bit locks the SUPV[7:0], DATA[7:0] and
PROTECT[7:0] bits. Writing to these bits has no effect; the cycle ends
normally and the bits do not change.
NOTE: If LOCKCTL is set before PROTECT[7:0] is cleared, the device must use
debug mode to program or erase the CMFR.
The default reset state of LOCKCTL is 0. It can be set once after
master reset to allow protecti on of the write-locked register bits after
initialization.
If the LOCKCTL bit and write-locked register bits are written
simultaneously, the new value does not affect the current cycle.
DIS Disable Bit
The read-always DIS bit disables array information. Writing to DIS has
no effect if the SES bit is set. When DIS is set, the array is disabled
and the CMFR BIU does not respond to array accesses.
The reset value is defined during reset configuration by the external
D28 pin.
1 = Array information disabled
0 = Array information enabled
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Registe rs and Memory Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 191
RSVD24 Re served
Writing to this read/write bit updates the va lue but has no effect on
functionality.
SUPV[7:0] Supervisor Space Field
The read-always SUPV[7:0] field controls supervisor/unrestricted
address sp ace assignmen t of array blocks. The field is writable when
the LOCKCTL bit is clear.
Arr ay blocks that correspon d to 1s in SUPV[7:0] are sel ected for da ta
address space.
Each array block can be mapped into supervisor or unrestricted
address space. When an array block is mapped into supervisor
address space (SUPV [M] = 1) only supervisor a ccesses are allo wed.
A user access to a location in supervisor address space causes a
data error exception. When an array block is mapped into unrestricted
address space (SUPV[M] = 0) both supervisor and user accesses are
allowed.
The default reset state of SUPV[7:0] bits are supervisor address
space (SUPV[M] = 1).
1 = Array block in supervisor address space
0 = Array block in unrestricted address space
DATA[7:0] Data Space Fiel d
The read-always DATA[7:0] field controls data/program address
space assignment of array blocks. When LOCKCTL = 1, the
DATA[7:0] field is write-protected, and writing to it has no effe ct.
Array blocks th at correspo nd to 1s in DATA[7:0 ] are selected for data
address space.
Each array block can be mapped into data address space or both data
and program address space. When an array block is mapped into
data address space (DATA[M] = 1) only data accesses are allowed.
A pr ogra m access to a loca tion in d ata ad dress space cau s es a d ata
error exception. When an array block is mapped into both data and
program address space (DATA[M] = 0) both data and program
accesses are allowed.
The default reset state of DATA[7:0] bits are data and prog ram
address space (D ATA[ M] = 0).
1 = Array block in data address space
0 = Array block is both data and program address space
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
192 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
PROTECT[7:0] Block Protect Field
The read-always PROTECT[7:0] field protects array blocks from
program and erase operations. If LOCKCTL = 1 or SES = 1, writing to
PROTECT[7:0] has no effect.
Array blocks that cor respond to 1s in PRO TECT[7:0 ] are selected for
data address space.
Each array block can be protected from program and erase operation
by setting its PROTECT bit. The CMFR BIU performs all programming
and era s e interl ocks excep t that th e pro gram and e rase vo ltages a re
not applied to locations within the protected array block(s).
The default reset state of PROTE CT[7:0] bits are protected
(PROTECT[M] = 1).
1 = Array block protected
0 = Array block not protected
CAUTION: If the LOCKCTL bit is set before PROTECT[7:0] is cleared, the device
must use debug mode to program or erase the CMFR.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Registe rs and Memory Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 193
9.7.1.2 CMFR Module Test Register
The CMFR module test register (CMFRMTR) controls the CMFR array
and BIU.
Address: 0x00d0_0004 through 0x00d0_0007
Bit 31 30 29 28 27 26 25 Bit 24
Read: 0 0 000000
Write:
Reset:
Bit 23 22 21 20 19 18 17 Bit 16
Read: 0 0 000000
Write:
Reset:
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0 0 0 0 NVR PAWS2 PAWS1 PAWS0
Write:
Reset: 0000
Bit 7654321Bit 0
Read: 0 RSVD6 GDB 00000
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfe r error exception.
Figure 9-4. CMFR Module Test Register (CMFRMTR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
194 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
NVR Negative Voltage Range Select Bit
The read-always NVR bit modulates the negative pump output to
select the negative voltage range in program and erase modes as
shown in Table 9-2. NVR is writable when the HVS bit is clear but has
no effect when the GDB bit is clear.
1 = Negative voltage low range
0 = Negative voltage high range
PAWS[2:0] Pulse Amplitude/Width Select Field
The read-always PAWS[2:0] field selects the pulse drain amplitude
and width for program or erase operations. PAWS[2:0] is writable
when the HVS bit is clear. PAWS[2] must be set for all program and
erase o pera ti ons. If G DB = 1, the gate/source volta ge app lied dur ing
program/erase is determined by PAWS[1:0] and NVR and shown in
Table 9-2.
NOTE: The program pulse time is equal to the value selected by the pulse width
timing control. When SES = 1, write to SCLKR[2:0], CLKPE[1:0], and
CLKP M[6:0 ] only whe n P AWS[2] = 1. Do not wr ite to P A WS[2: 0] dur ing
high-voltage operations.
RSVD6 Reserved
Reserved for factory test and must remain clear at all times
Table 9-2. Negative Voltage Modulation
PAWS[2:0] NVR = 0 NVR = 1
100 6 V –2 V
101 7 V –3 V
110 8 V –4 V
111 9 V –5 V
0XX Reserved(1)
1. When PAWS[2] = 0 and PAWS[1:0] have no ef fec t.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Registe rs and Memory Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 195
GDB — Gate or Drain/Source Select Bit
The read-always GDB bit selects gate, source, or drain for voltage
modulation. GDB is writable when the SES bit is clear.
GDB selects the ga te, source, or drain. In programming , GDB selects
gate ( GD B = 1) or dra in (GD B = 0) voltage for amp litu de m odulat io n.
When PAWS[2] = 0, mask plugs control amplitude modulation. When
PAWS[2] = 1, the PAWS[1:0] bits control amplitude modulation.
1 = Gate selected
0 = Drain/source selected
Table 9-3. Drain Amplitude Modulation (GDB = 0)
PAWS[2:0] Drain Voltage
100 60% VPP
101 70% VPP
110 80% VPP
111 VPP
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
196 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
9.7.1.3 CMFR High-Voltage Control Register
The CMFR high-voltage control register (CMFRCTL) controls the
program and erase operations of the CMFR.
HVS High Voltage Status Bit
The re ad-only HVS bit reflects th e status of the program/e rase pul se.
Writing to HVS has no effect. HVS is set when a pulse is active and
during recovery. While HVS = 1, accesses to the array cause a bus
error , and S ES cannot b e chan ged. T he pu lse becom es acti ve when
the EHV bit is set and is terminated by clearing EHV or by the pulse
width timing control. See Figure 9-6.
1 = Pulse applied to array or CMFR in recovery
0 = Pulse not applied to array
Address: 0x00d0_0008 through 0x00d0_000b
Bit 31 30 29 28 27 26 25 Bit 24
Read: HVS 0SCLKR2 SCLKR1 SCLKR0 0CLKPE1 CLKPE0
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: 0 CLKPM6 CLKPM5 CLKPM4 CLKPM3 CLKPM2 CLKPM1 CLKPM0
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: BLOCK7 BLOCK6 BLOCK5 BLOCK4 BLOCK3 BLOCK2 BLOCK1 BLOCK0
Write:
Reset:00000000
Bit 7654321Bit 0
Read: 0 RSVD6 100
ERASE SES EHV
Write:
Reset:00100000
= Writes have no effect and the access terminates without a transfe r error exception.
Figure 9-5. CMFR High-Voltage Control Register (CMFRCTL)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Registe rs and Memory Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 197
Figure 9-6. Pulse Status Timing
The recovery time is the time that the CMFR requires to remove the
program or erase voltage from the array before sw itching to another
mode of operation. The recovery time is determined by the
SCLKR[2:0] field and the ERASE bit. If SCLKR is not 000, the
recovery time is 48 of the scaled clock periods. If SCLKR = 000 the
recovery time is 128 clocks.
Once reset is completed HVS indicates no program or erase pulse
(HVS = 0).
SCLKR[2:0] System Clock Range Field
The read/write SCLKR[2:0] field selects the system clock range for
program/erase pulse timing.
NOTE: The SCLKR[2:0] bits are not write protected by the SES bit. Unless the
PAWS[2] bit is set, writes to SCLKR[2:0] in software should not be
changed if SES = 1.
To control the pulse widths for program and erase operations, the CMFR
uses the system clock and the timing control in CMFRCT L. The total
pulse time is defined by:
pulse width = system clock period × R × 2N × M
Where:
R = clock scaling (see Table 9-4)
N = 5 + CLKPE[1:0] + ( (ERASE) × 10)
M = 1 + CLKPM[6:0]
EHV
HVS
Recovery = 48 scaled clocks or 128 clocks
RECOVERY
PULSE WID T H
RECOVERY
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
198 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
The control of the program/erase pulse timing is divided into three
functions.
The first term of the timing con trol is the clock scaling, R. T he value of R
is determined by the system clock range (SCLKR[2:0]). SCLKR[2:0]
defines the base clock of the pulse timer. Use Table 9-4 to set
SCLKR[2:0] based on the system clock frequency.
CAUTION: If the correct value for SCLKR[2:0] is not selected from the table, the
pulse timer may run too fast and cause damage to the device.
The system clock period is mu ltiplied by the clock scaling value to
generate a 83.3-ns to 125-ns scaled clock. This scaled clock is used to
run the charge pump submodule and the next functional block of the
timing control.
NOTE: The mi nimum specified system clock frequency for program and erase
operations is 8.0 MHz. The C M FR does not h ave any m eans to m onitor
the system clock frequency and cannot prevent program or erase
operation at frequencies below 8.0 MHz. Attempting to program or erase
the CMFR at system clock frequencies lower than 8.0 MHz does not
damage the device if the maximum pulse times and total times are not
exceeded. While some bits in the CMFR array may change state if
progr ammed or era sed at sys tem clock frequencies bel ow 8.0 MHz, the
full program or erase transition is not assured.
Table 9-4. System Clock Range
SCLKR[2:0] System Clock Frequency (MHz) Clock Scaling (R)
Minimum Maximum(1)
1. The ma ximu m system clock frequency is 33 MHz.
000 Reserved
001 8 12 1
010 12 18 3/2
011 18 24 2
100 24 36 3
101 36 40 4
110 and 111 Reserved by Motorola for future use
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Registe rs and Memory Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 199
CAUTION: Never stop or alter the system clock frequency during a program or
erase operation. Changin g the clock fr equency du ring program or eras e
results in inaccurate pulse widths and variations in the charge pump
output.
The default reset state of SCLKR[2:0] is 000, giving a clock scaling
of 1, and the program or erase pulse is not terminated until EHV is
cleared by a softw are write.
CLKPE[1:0] Clock Period Exponent Field
The read/write CLKPE[1:0] field selects the clock period exponent for
progr am/er ase pulse timi ng. Th e second ter m of the timing contr ol is
the clock multiplier, 2N. The program pulse number (pulse), clock
peri od expo nent bits (CLK P E[1:0]), an d ERA SE define the exponent
in the 2N multiply of the clock period. The exponent, N, is defined by
the equation: N = 5 + CLKPE[1:0] + [(ERASE) × 10]
All of the exponents are shown in Table 9-5.
NOTE: The CLKPE[1:0] bits are not write protected by the SES bit. Unless the
PAWS[2] bit is set, writes to CLKPE[1:0] in software should not be
changed if SES = 1.
The default reset state of CLKPE[1:0] is 00 .
Table 9-5. Clock Period Exponent a nd Pulse Width Range
ERASE CLKPE[1:0] Exponent (N)
Pulse Width Range for all System Clock
Frequ encies from 8. 0 MHz to 3 3.0 MH z
Minimum
2N × 1.25E – 7 Maximum(1)
2N × 128 × 8.33E – 8
1. The ma ximu m system clock frequency is 33 MHz.
0
00 5 4.00 µs 0.34 ms
01 6 8.00 µs 0.68 ms
10 7 16.00 µs 1.36 ms
11 8 32.0 µs 2.73 ms
1
00 15 4.096 ms 349.5 ms
01 16 8.192 ms 699.0 ms
10 17 16.39 ms 1.398 s
11 18 32.77 ms 2.796 s
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
200 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
CLKPM[6:0] Clock Period Multiplier Field
The third term of the timing control is the linear clock multiplier, M. The
clock period multiplier, CLKPM[6:0], defines a linear multiplier for the
program or erase pulse. M is defined by:
M = 1 + (CLKPM[6:0])
This allows the program/erase pulse to be from 1 to 128 times the
pulse set by the system clock period, SCLKR[2:0] and CLKPE[1:0].
The default reset state of CLKPM[6:0] is binary 000 0000, which gives
a multiplier of 1.
NOTE: The C LKPM[ 6:0] bits are not write pro t ected by the SES bi t. Unless the
PAWS[2] bit is set, writes to CLKPM[6:0] in software should not be
changed if SES = 1.
Table 9-6 shows an example of calculating the values of SCLKR[2:0],
CLKP E[1:0] and CLKPM[6:0] f or a 1 -ms p rogr am p ulse, E RASE = 0,
in a system with a 33.0-MHz system clock ha ving a per iod of 30.3 ns.
Table 9-6. Determining SCLKR[2:0], CLKPE[1:0],
and CLKPM[6:0]
No. Example Calculation
1Determine SCLKR[2:0] Table 9-4 shows that a SCLKR[2: 0] value of 100
and an R value of 3 gives a system clock frequency from 24 MHz to 36 MHz.
2
Determi n e CLKPE[1:0] 9.7.1 Control Registers shows that when
ERASE = 0, a 1-ms program pulse can be generated by an N value of 7
(CLKPE[1:0] = 10) or 8 (C LKPE [ 1:0] = 11). An N value of 8 is used in this
example.
3
Determin e CLKPM[6:0] Using the selected values of N and R in the pulse
width equation, pulse width = system clock period × R × 2N × M and solving
for M yield s 42.97. Rounding M to 43 and using the M equation,
M = 1 + (CLKPM[6:0]) and solving for CLKPM[6:0] yields 42.
4Check the results pulse width = 30.3 ns × 3 × 28 × 43 = 1.00 ms where
SCLKR[2:0] = 100, CLKPE[1:0 ] = 11, CLKPM[6:0] = 0101010, ERAS E = 0,
system clock frequency = 33.0 MHz
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Registe rs and Memory Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 201
BLOCK[7:0] Block Program and Erase Field
The read/write BLOCK[7:0] field selects array blocks for program or
erase operation. BLOCK[7:0] is writable when the SES bit is clear. If
SES is written in the same cycle with BLOCK[7:0] bits, the write
permission to BLOCK[7:0] bits depends on the previous value of SES.
Up to eight blocks at once can be selected for program operation.
Array blocks that correspond to 1s in BLOCK[7:0] are selected for
program or erase operation. The BLOCK[7:0] default state is $00, not
selected for program or erase.
1 = Array block selected for program or erase
0 = Array block not selected for program or erase
RSVD6 Reserved
Rese rved for test purposes. Writing to this read /write bi t updates the
values and could affect functionality if set to 1.
ERASE Program or Erase Select Bit
The read-always ERASE bit selects program or erase operations.
ERASE is wri table when the SES bit is clea r. If S ES and ER ASE are
written in the same cycle, the write permission to ERASE bit depends
on the previous value of SES.
When ERASE = 0, the array is configured for programming, and if
SES = 1 the SIE bit is write locked. When ERASE = 1, the array is
configured for erasing, and SES does not write lock the SIE bit.
1 = Erase operation
0 = Program operation
SES Start/End Sequence Bit
The read-always SES bit signals the start and end of a program or
erase sequence. SES is writable when the HVS and EHV bits are
clear. If SES and EHV are written in the same cycle, the write
permission to SES depends on the previous value of EHV. At the start
of a program or erase sequence, SES is set, locking PROT ECT[7:0] ,
BLOCK[7:0], and ERASE.
1 = CMFR configured for program or erase operation
0 = CMFR not configured for program or erase operation
NOTE: SES does not lock the SCLKR[2:0], CLKPE[1:0], and CLKPM[6:0] bits.
Do not change these bits in software when SES = 1 unless
PAWS[2] = 1.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
202 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
At this point the CMFR is ready to receive the programming writes, the
erase interlock write, or a write to CMFRMCR for programming the
reset values of the DIS bit, or a write to CMF RRC.
NOTE: The erase interlock write is a write to any CMFR array location after SES
is set and ERASE = 1.
If the ERASE bit is a 0, the CMFR BIU accepts programming writes to
the CMFR array address for programming. The first programming
write selects the program page offset address to be programmed
along with the data for the programming buffers at the location written.
All programming writes after the first write update the program buffers
usin g the lower a ddre s s and the b lock addr ess to select th e pr ogra m
page buffers to receive the data. See 9.7.2 .2 Prog ram Pag e Buff ers
for fur ther i nformation. After th e data has be en writt en to the pr ogram
buffers the EHV bit is set (written to a 1) to start the programming
pulse and lock out further programming writes.
If the ERASE bit is a 1, the CMFR BIU accepts writes to the CMFR
array address for erase. An erase interlock write is required before the
EHV bit can be set.
At the end of the program or erase operation, the SES bit must be
cleared (written to a 0) to return to normal operation and release the
program buffers and the locked bits. The CMFR requires a recovery
time of 16 clocks after negating SES. This means that if a read access
to the CMFR array is done immediately after writing SES = 0, the
access is completed after 16 clocks. Also, the FSTOP bit should not
be asserted during this recovery time.
The d efaul t reset state of S ES is not confi gu red for pro gram or era se
operation (SES = 0).
EHV Enable High-Voltage Bit
The read-always EHV bit controls the application of the program or
erase voltage to the CMFR. High-voltage operations to the array,
spec ial shadow l ocations or NV M registers can occu r only if EHV = 1.
EHV can be assert ed only after the SES bit has been asser ted and a
valid programming write(s) or erase hardware interlock write has
occurred. Attempts to assert EHV when SES is negated (including the
cycle which writes 0 to SES), or when a valid programming write or
erase hardware interlock write has not occurred since SES was
asserted have no effect.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Registe rs and Memory Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 203
Once EHV is set, SES cannot be changed; attempts to read or write
the array or CMFRRC cause bus errors.
The default reset state of EHV disables program or erase pulses
(EHV = 0). A m aster rese t while EHV = 1 terminates the high-vol tage
operat ion an d the CMFR generates the requi red sequence to disa ble
the high voltage without damage to the high-voltage circuits.
1 = Program/erase pulse enabled
0 = Program/erase pulse disabled
9.7.2 Array Addressing
Information in the array is accessed in 32-byte pages. Two read page
buffers are aligned to the low order addresses. The first page buffer is
for the lower array blocks. The second page buffer is for the higher array
blocks. Access time of information in the read page buffers is one system
clock. Access time for an off-page read is two system clocks. To prevent
the B IU from accessing an unne cessary page from the arra y, the CMFR
monitors the address to determine if the required information is wi thin
one o f th e t wo r ead pag e b uffer s an d t he access is valid for the m odule.
This strategy allow s the CMFR to have a 2-clock read for an off-page
access and a 1-clock read for an on-page access.
Writing to the array while not in a program/erase sequence causes a bus
error.
9.7.2.1 Read Page Buffers
The two 32-byte read page buffers are fully independent and are locate d
in two separate read sections of the array. The BIU monitors the status
and address of e ach page b uffer. The status of the read page buffers are
usually valid, but are made invalid by these operations:
Reset
Programming write
Erase interlock write
Setting the EHV bit
Clearing the SE S bit
Setting or clearing the SIE bit
Exiting stop mode
Exiting disable mode
Exiting boot mode
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
204 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
Each access to the array determines if the requested location is within
the current pages. If the requested location is not within the read page
buffers, the appropriate read page buffer is made invalid and a new page
of information is fetched from the array. The page buffer address is
updated and status is made valid. If the req uested locat ion is within one
of the current page buffers or has been fetched from the array, the
selected bytes are transferred to the CPU, completing the access. Array
accesses that make the page buffer(s) invalid are off-page reads that
require two system clocks. Array accesses that do not make the page
buffer(s) invalid are on-page reads that require one system clock.
9. 7.2.2 Program Page Buffers
The CMFR can program up to eight 64-byte pages at one time. Each
program page buffer is associated with one array block. A ll program
page buffers share the same block offset address, stored in the BIU. The
block offset address is extracted from the address of the first
programming write. To select the array block to be programmed, the
program page buffers use BLOCK[7:0]. The data programmed in each
array block is determined by the programming writes to the program
buffer for each block. A ll program buffer data is unique whereas the
program page offset address is shared by all blocks.
An a rray block is selecte d for pr ogramm ing i f the c orrespond in g BLOCK
bit is a 1. If BLOCK[M] = 1, then array block[M] is programmed. If
BLOCK[M] = 0, then array block[M] is not programmed. The program
page buffers are written regardless of the state of the BLOCK bits, but
high-voltage is not applied to blocks for which BLOCK[M] = 0.
Bits in the program page buffers select the non-programmed state if
SES = 0. During a program margin read, the program buffers update bits
to the non-programmed state for bits that correspond to array bits that
the program margin read has determined are programmed.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 205
9.8 Functional D escription
The CMFR is an electrically erasable and programmable non-volatile
memor y. Thi s subse ction de scri bes the fu nctioning of the CMFR dur i ng
various operational modes.
9.8.1 Master Reset
The device signals a master reset to the CMFR when a full reset is
required. A master reset is the highest priority operation for the CMFR
and terminates all other operations. The CMFR uses master reset to
initialize all register bits to their default reset value. If the CMFR is in
progr am o r er ase o pera ti on ( EHV = 1) and a master reset i s gene rate d,
the module performs the needed interlocks to disable the high voltage
without damage to the high voltage circuits. Master reset terminates any
other mode of operation and forces the CMFR BIU to a state ready to
receive accesses.
9.8.2 Register Read and Write Operation
The CMFR control re gisters are accessib le for read or wri te opera tion at
all times while the device is powered up except during master reset.
The access time of a CMFR register is one system clock for both read
and write accesses. Accesses to unimplemented registers causes the
BIU to generate a data error exception.
9.8.3 Array Read Operation
The CMFR array is available for read operation under most conditions
while the device is powered up. Reads of the array are ignored (no
response) during master reset or while the CMFR is disabled or in stop
mode. During programming and erase operation while the high voltage
is applied to the array (EHV = 1 or HVS = 1) the BIU generates data
errors for all array accesses. At certain points, as defined in the program
or erase sequence, reading the array results in a margin read. These
margin reads return the status of the program or erase operation and not
the data in the array.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
206 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
The type of array read is determined by comparing the address of the
requested information with the address of the read page buffers. If the
requested address is not in one of the read page buffers or if the read
page buffer has been made invalid, an off-page read results. This read
updates the sele cted array b locks read pag e buffer a ddress, copi es the
information from the array into the read page buffer, and drives a
word/half-word onto the data bus. The off-page read requires a minimum
of two clocks; margin off-page reads require additional clocks (see
9.8.4.2 Program Margin Reads and 9.8.5.2 Erase Margin Reads). If
the add ress of the requ ested inform ation is withi n the addr ess ranges of
either of the read page buffers, the second type of read is performed.
This read is an on-page read and requires one clock to transfer
information from the read page buffer onto the data bus.
NOTE: After reset, programming writes, erase interlock w rite, setting EHV ,
clearing SES, setting/clearing SIE and exiting stop mode or disable
mode, the page buffers do not contain valid information and the CMFR
must do an off-page read before an on-page read can be done.
9.8.4 Programming
To modify the charge stored in the isolated element of the CMFR bit from
a l ogic 1 stat e to a l o gic 0 state, a p rogr amm ing oper ati on is req ui red. A
programmed bit reads as logic 0. This programming operation applies
the required voltages to change the charge state of the selected bits
without changing the logic state of any other bits in the array. The
program operation cannot chan ge the logic 0 state to a logic 1 state; this
transition must be done by the erase operation. An erased bit reads as
log ic 1. Programmi ng uses a set of e ight pr ogra m buffe rs of 64 bytes to
store the required data, an address offset buffer to store the starting
address of the block(s) to be programmed, and a block select buffer that
stores information on which block(s) are to be programmed. From one to
eight of the program page buffers may be programmed at one time.
CAUTION: Do not program any page more than once after a successful erase
operation. Whil e this doe s not physi cally d amag e the arr ay it causes a n
increased partial disturb time for the unselected bits on the row and
columns that are not programmed. A full er ase of all blocks being
programmed must be done before the CMFR can be used reliably.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 207
Blocks of the CMFR that are protected (PROTECT[block] = 1) are not
programmed.
The program sequence is outlined in 9.8.4.1 Program Sequence and
depicted in the flowchart form in Figure 9-7.
9.8.4.1 Program Sequence
Use this sequence to enable the high voltage to the array or shadow
information for program operation:
1. Make sure the CMFRMTR and CMFRCTL are in their reset states.
2. Set PAWS[2] = 1 and GDB = 1 in CMFRMTR.
3. In CMFRMCR, write PROTECT[7:0] to disable protection of
blocks to be programmed.
4. Use the procedure in Table 9-6 to write the pulse width timing
control fields for a prog ram pulse.
5. In CMFRCTL, clea r the ERASE bi t, and write BLOCK[7:0] to
select the array blocks to be programmed.
6. In CMFRCTL, set the SES bit.
7. P rog ram ming write A successful write to the array locations to
be programmed. This updates the programming page buffer(s)
with the information to be programmed. All accesses to the array
after the first write are to the same block offset address regardless
of the address provided. Thus the locations accessed after the first
programming write are limited to the page locations to be
programmed. Off-page read accesses of the array after the first
programming write are program margin reads.
NOTE: All program pa ge buff ers shar e the sam e block offset addre ss stored in
the BIU. The block offset address is extracted from the address of the
fir st pr ogra mming w rite . To select the array bl ock( s) to be pr ogra mme d,
the pro gram pag e buffers use BL OCK[7:0]. S ubse quen t writes fill in the
programming page buffers using the block address to select the program
page buffer and the page word address to select the word in the page
buffer.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
208 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
8. In CMFRCTL, set the EHV bit.
NOTE: If a program page buffer word has not received a programming write, no
programming voltages are applied to the drain of the corresponding
word in the array. At this point, writing to the program page buffers is
disabled and causes a bus error until SES has been cleared and set.
9. Read CMFRCTL until HVS = 0.
10. In CMFRCTL, clear the EHV bit.
11. Verify the program by reading the words of the pages that are
being programmed. These are program margin reads. A bit that
was successfully programme d retur ns a 0 durin g a ma rgin rea d. It
returns a 1 if it has been unsuccessfully programmed. If any bit
intended to be programmed does not return a 0 after reading all
the locations, the margin read has failed. If the margin read is
successful continue to step 12, otherwise do the following:
a. Write new pulse wi dth para meter s (if re quired, see Table 9- 9
for the required pro gram ming algorithm) C LKPE and CLKPM.
b. Write new values for P AWS and NVR (if required, see
Table 9-9)
c. Go back to step 8 to apply additional pulses.
To reduce the time for verification, read two locations in each array
block that is being programmed after reading a non-programmed
bit. After a locati on has bee n verified (all bits are prog ramm ed) , it
is not necessary to reverify the location, as no further
programming voltages are applied to the drain of the
corresponding bits.
CAUTION: After a program pulse, read at least one location with address bit 5 = 0
and one location with address bit 5 = 1 on each programmed page.
Failure to do so ma y result in the loss of information in the CMFR array,
and a full erase of all blocks being programmed must be done before the
CMFR can be used reliably.
12. In CMFRCTL, clear the SES bit.
13. If more information needs to be programmed, go to step 3.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 209
Fi gu re 9-7. FLAS H Progr am min g Flow c har t
DISABLE PROTEC TION OF THE BLOCKS
TO BE PROGRAMM ED
PROTECT[7:0] IN CMFRMCR
WRIT E THE PU LSE W IDT H TIMI NG CONT RO L FIELDS
FO R A PROGRAM PULSE (SEE TABLE 9 -8)
SCLKR[2:], CLKPE[1:], CLKPM[6:0] IN CMFRCTL
SELECT PROGRAM OPERATION AND SELECT
THE ARR AY BLOCK TO BE PROGR AM M ED
ERA SE = 0, BLOCK[ 7: 0] IN CMF R C TL
CONFIGURE C MFR FOR PR OGR AM OPERAT IO N
SES = 1 IN CMF RCTL
WRITE 64 BYTES OF DATA TO THE LOCATION
TO BE PROGRAMM ED
ENABLE HIGH-VOLTAGE PULSE FOR PROGRAMMING
EHV = 1 IN CMFRCTL
DISABLE HI GH -VOLTAGE PU LSE
EHV = 0 IN CMFRCTL
VERIFI CA TION PR OCE SS
END OF THE PR OGR AM M ING SEQUENCE
SES = 0 IN CMF RCTL
PULSE APP LIED TO THE
CMFR AR RA Y BLOCK ?
HVS = 0 IN CMFRCTL
YES
NO
FAILED
OK
YES PROGR AM NEX T PAGE? FINISH
NO
3.
4.
5.
6.
7.
8.
10.
11.
12.
13.
9.
Notes:
1. This page program algorithm assu mes the blocks to be programmed are in itially er ased.
2. Make sure that CMFRMT R is in its reset state at the beginning of the progr am ming process and afterwards.
SET PAWS [2] = 1 AND GDB = 1 IN THE CMFRM T R
2.
UPDATE CLKPE,
CLKPM, PAW S,
AND NVR IF NEEDE D
MAKE S URE CMFRM TR A ND CMFRCTL
AR E I N T H EI R R ESET STATES
1.
11a.
11b.
11c.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
210 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
Figu re 9-8. Pr ogra m Stat e Diagram
S2 S3
S1 S4
S5
T3
T7
T6T1 T2 T4
T5
RESET
T9
T8
Table 9-7. Program Interlock State Descriptions
State Mode Next
State Tr ansition Req uiremen t
S1
Normal operatio n: Normal array reads and
register accesses. Block protect information
and pulse width timing control can be
modified.
S2 T2 Write ERASE = 0 an d SES = 1
S2
First pro gram hardw a re int erlo ck wri te:
Normal read operation. Array accepts
programming writes. Normal register
accesses. CMFRCTL write cannot change
EHV. If write is to a register other than
CMFRMCR, no data is stored i n program
page buffers; CMFR remains in S2.
S1 T1 Write SES = 0 or master reset
S3 T3
Hardware interlock: Successful programming
write to any array location. Latches selected
data word into programming page buffer;
addres s latched to select location to
progra m. Bit that has been written remains
in program buffer until another write to i t, or
SES is cle a r e d , or a progr a m ma r g in r e a d
determines bit needs no modification by
progra m operation. If write is to a register
(except CMFRMCR), no data is stored in
program page buffe rs, and CMFR remains
in S2. Writing to CMFRMCR does not allow
array to be programmed.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 211
9. 8.4.2 Progra m Margin Re ads
The CMFR provides a program margin read with electrical margin for the
program state. Program margin reads provide sufficient margin to
assure specified data retention. The program margin read is enabled
when SE = 1 and a programming write has occurred. To increase the
access time of the program margin read the off-page access time is 17
clocks instead of the usual 2-clock off-page read access time. The
program margin read and subsequent on-page program verify reads
S3
Expanded program hardware interlock
operatio n: P rogram margin reads.
Programming writes accepted; all eight
program pages can be programmed. Writes
can be to any array location. Program page
buffers updated using only data, lower
address, and block address. Normal register
accesses. CMFRCTL write can change
EHV. If write is to a register, no data is
stored in program page buffer.
S1 T6 Write SES = 0 or master reset
S4 T4 Write EHV = 1
S4
Program operation: High voltage applied to
array or sh adow informa tion to program
CMFR bitcells. Pulse width timer active if
SCLKR[2:0] 0; HVS can be polled to time
program pulse. Programming writes not
accepted. During programming, array
cannot be accessed (bus error). Normal
re gister accesses. CMFRCT L write can
change only EHV.
S1 T7 Master reset
S5 T5 EHV = 0 and HV S = 0
S5
Program margin read operation: Reads
determine if bits on selected page need
modification by program operation. Once bit
is fully programmed, data stored in program
page is updated; no further programming
occurs for that bit and va lue read is 0.
While it is not necessary to read all words on a
page to determine if another program pulse
is needed, all pages being programmed
must be read once after each program
pulse.
S4 T8 Write EHV = 1
S1 T9 Write SES = 0 or a master reset
Table 9-7. Program Interlock State Descriptions (Continued)
State Mode Next
State Tr ansition Req uiremen t
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
212 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
return a 1 for any bit that has not completely programmed. Bits left in the
non-programmed state after the programming write read as a 0s. Bits
that have completed programming read as 0s and update the data in the
programming page buffer so that no further programming of those bits
occurs.
The program margin read occurs while doing the off-page read. A
program margin read must be done for all pages that are being
programmed after each program pulse.
CAUTION: Failure to read e ach page th at is bein g progra mmed afte r each pr ogram
pulse may result in the loss of informati on in the array. While this does
not physically damage the array a full erase of all blocks being
programmed must be done before the CMFR can be used reliably.
9.8.4.3 Programming Shadow Information
Programming the shadow information uses the same procedure as
programming the array except that only program page 0 is used to
program the shadow information. Before starting the program sequence
SIE must be a 1. BLOCK and PROTECT bits do not affect programming
of the shadow locations.
Table 9-8. Results of Programming Margin Read
Current Data
in Program
Page Buffer
Current
Bit State Read
Output
New Data
for the Prog ram
Page Buffer
0 Programmed 00 1
0 Erased 11 0
1 Programmed 00 1
1 Erased 10 1
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 213
9.8.4.4 Program Pulse-Width and Amplitude Modulation
To prevent bits from possibly becoming depleted (over programmed),
the first programming pulses should be of reduced duration and with
reduced dr ai n voltage . Refer to Tab le 9-9 for t he requ i red programming
steps to insure FLASH reliability.
NOTE: The values of PAWS[2:0] and NVR should be updated on the
appropriate pulse to change the programming voltage and CLKPM
should be updated to adjust the pulse width.
GDB = 1 for all programming operations.
Marg in reads are req u ired after ever y pulse.
9. 8.4.5 Overprogr ammi ng
Programming a bit without a program margin read after each program
pul se or exce eding the specified program tim es or volt ages resul ts in a n
overprogrammed state. Once a bit is overprogrammed, data in the array
blo ck that is locate d i n the sa me colum n is lost as th e overprogramm ed
bit causes the entire column to appear programmed. To restore an array
block with an overprogrammed bit, the block must be erased and
reprogrammed.
Table 9-9. Required Programming Algorithm
Voltage Step PA WS[2:0] N VR Pulse Widt h Nu mber of Pul ses
2 V 1 0 0 1 250 µs4
3 V 1 0 1 1 250 µs4
4 V 1 1 0 1 250 µs4
5 V 1 1 1 1 250 µs4
6 V 1 0 0 0 50 µs20
7 V 1 0 1 0 50 µs20
8 V 1 1 0 0 50 µs20
9 V 1 1 1 0 50 µs20
9 V 1 1 1 0 100 µs Any addition al
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
214 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
9.8.5 Erasing
To modify the charge stored in the isolated element of a bit from a logic 0
state to a logic 1 state, an erase operation is required. The erase
operation cannot change the logic 1 state to a logic 0 state; this transition
must be done by the program operation. Erase is a bulk operation that
affects the stored charge of all the isolated elements in an array block.
To make the block erasable, the array is divided into blocks that are
physically isolated from each other. Each of the array blocks may be
erased in isolation or in any combination. The array block size is fixed for
all blocks at 16 Kbytes and the module is com prised of eight blocks.
Array blocks that are protected (PROTECT[M] = 1) are not erased.
The array blocks selected for erase operation are determined by
BLOCK[7:0].
NOTE: Erasing BLOCK 0 also erases the shadow information.
The erase sequence is outlined in 9.8.5.1 Erase Sequence and
depicted in the flowchart form in Figure 9-9.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 215
9. 8.5.1 Erase Sequ ence
Use this sequence to enable the high voltage to the array or shadow
information for erase operation:
1. Make sure that CMFRMTR is in its reset state, and write
PAWS[2:0] = 111 to override firmware amplitude modulation.
2. In CMFRMCR, write PROTECT[7:0] to disable protection of the
blocks to be erased.
3. Use the procedure in Table 9-6 to write the pulse-width timing
control fields for an erase pulse with BLOCK[7:0] selecting the
blocks to be erased and ERASE = SES = 1 in CMFRCT L.
4. Execute an erase interlock write to any array location.
5. In CMFRCTL, write EHV = 1.
6. Read CMFRCTL until HVS = 0.
7. In CMFRCTL, write EHV = 0.
8. Verify the erase by reading all locations that are being erased,
including the shadow information if the bl ock that contains it is
erased. Off-page reads are erase margin reads that update the
read page buffer. If all the locations read as erased, continue to
the next step oth erw ise, up date P AWS and N VR (i f requir ed, see
Table 9-9). Then go back to step 5.
To redu ce the time for veri fication, upon the fir st read of a 0, go to
step 5. After a locatio n has been veri fied ( all bi ts are er ased), it is
not n ecessar y to r ever ify l oca tions after su bsequ ent era se p ulses.
9. In CMFRCTL, write SES = 0.
10. Make sure that CMFRMTR is in its reset state.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
216 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
Figure 9-9. FLASH Erasing Flowchar t
WRIT E THE PU LSE W IDT H TIMING CONT RO L
FIELDS FOR A ERASE PU LSE (SEE TABLE 9-8)
SC L K R[2 :0], CLK P E[1:0 ], CLK P M[6:0] IN C MFR CTL
EXECUTE AN ERASE INTER LOC K W R IT E TO ANY
ARRAY LOCATIO N TO BE ER ASED
DISABLE HIGH-VOLTAGE PULSE
EHV = 0 IN CMFRCTL
VERIFICATION PRO CE SS
END OF THE E RA S ING SE Q UE NCE
SES = 0 IN CMFRCTL
PULS E APPLIED TO THE
CMFR ARR AY BLOC K?
HV S = 0 IN C MFRCTL
YES
NO
FAILED
OK
1.
2.
3.1.
3.2.
4.
7.
8.
6.
OVERRIDE FIRMWARE AMPLITUDE MODULATION
PAWS [2: 0] = 111 IN CMFRM TR
DISABLE PROTECTI ON OF THE BL OCKS TO BE ERAS ED
PROTECT[7:0] IN CMFRMCR
SELECT ERASE OPERATION AND SELECT
THE ARRAY BLOCK TO BE ERASED
ERASE = 1, BLOCK[7:0] IN CMFRCTL
ENABL E HI GH -VOLTAGE PUL SE FO R ERASING
EHV = 1 IN CMFRCTL
5.
9.
CONFIGURE C MFR FOR PR OGR AM OPERAT IO N
SES = 1 IN CMFR CTL
3.3.
Note: Make sure that CMFRMTR is i its reset stat e at the beginning of the erasing
process and aft erwards.
UPDATE PAWS
A ND NVR,
IF REQUIRED
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 217
Figure 9-10. Erase State Diagram
S2 S3
S1 S4
S5
T3
T7
T6T1 T2 T4
T5
RESET
T9
T8
Table 9-10 Erase Interlock State Descriptions
State Mode Next
State Tr ansition Req uiremen t
S1
Normal operatio n : Normal array reads and
register accesses. Block protect information
and pulse-width timing control can be
modified.
S2 T2 Write ERAS E = 1 and SES = 1
S2
Erase hardware interlock write: Normal read
operation. CMFR accepts erase hardware
interlock write to any array location. Normal
r egister access (except CMFRMCR).
CMFRCTL write cannot set EHV. Register
writ e (except CMFRMCR) is not erase
hardware interlock write; CMFR remains in
S2. CMFRMCR write causes transition to
S3.
S1 T1 Write SES = 0 or a master reset
S3 T3
Har dware inte rloc k: Write to any array
location is erase interlock write. Register
write other than CMFRMCR is not erase
hardware interlock write; CM FR rem ains in
S2. CMFRMCR write causes transition to
S3; NVM fuses cleared during high-voltage
pulse
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
218 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
9. 8.5.2 Erase Margin R eads
The CMF R provides an e rase m arg in read with el ectr ical mar gin for the
erase state. Erase margin reads provide sufficient margin to assure
specified data retention. The erase margin read is enabled when
SES = 1 and the erase write has occurred. The erase margin read and
subsequent on-page erase verify reads return a 0 for any bit that has not
completely erased. Bits that have completed erasing read as a 1s. To
increase th e access time of t he er ase ma rgin r ead, t he off- page access
time is 17 clocks instead o f the usual 2 -clock off-pa ge read access tim e.
The erase margin read occurs while doing an off-page read. All locations
within the block(s) that are being erased must read as a 1 to determine
that no more erase pulses are required.
S3
High voltage write enable: Eras e margin
reads occur. CMFR accepts erase hardware
inte rl o ck wri te . Normal registe r ac cesse s
(except CMF RM CR). CMFRMCR write
causes NVM fuses to be cleared during the
high-voltage pulse. If CMFRMCR was
writ ten, a CMFRMCR read returns the NVM
fuses value. CMFRCTL write can change
EHV. When HVS goes high, NVR and
PAWS are locked.
S1 T6 Write SES = 0 or a master reset
S4 T4 Write EHV = 1
S4
Erase operation: High voltage appli ed to
array blocks to erase bitcells. Pulse-width
timer active if SCLKR[2: 0] 0; HVS can be
polled to time the erase pulse. Duri ng erase,
array cannot be accessed (bus error).
Normal reg ister accesse s. CMFRCTL write
can change only EHV.
S1 T7 Maste r reset
S5 T5 EHV = 0 and HV S = 0
S5
Erase margin read operatio n : Reads
determine if bits in selected blocks need
modification by the erase operati on. Erased
bit reads as 1. All words in erased blocks
must be read to determine if erase is
complete.
S4 T8 Write EHV = 1
S1 T9 Write SES = 0 or a master reset
Table 9-10 Erase Interlock State Descr iptions (Continued)
State Mode Next
State Tr ansition Req uiremen t
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Non -Vola t ile Memor y FLASH ( C MFR)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Non-Volatile Memory FLASH (CMF R) 219
9.8.5.3 Erasing Shadow Information Words
The shadow information words are erased with either array block 0
depending upon the array configuration. To verify that the shadow
information words are erased with block 0, erase margin reads should
be performed with the SIE bit set in CMFRMCR while the shadow
information is read. For the erase operation to be completed, block 0
must also be fully verified.
NOTE: Setting SIE = 1 disables normal array access and should be cleared
after verifying the shadow information.
9.8.6 Erase Pulse Amplitude and Width Modulation
Refer to Table 9-11 for the required erase algorithm to insure r eliability
of the FLASH.
NOTE: The values of PAWS[2:0] and NVR should be updated on the
appropriate pulse to change the erase voltage.
GDB = 0 for all erase operations.
Margin reads are required after the first 9-V pulse.
Table 9-11. Required Erase Algorithm
Voltage Step PA WS[2:0] N VR Pulse Widt h Nu mber of Pul ses
2 V 1 0 0 1 100 ms 1
3 V 1 0 1 1 100 ms 1
4 V 1 1 0 1 100 ms 1
5 V 1 1 1 1 100 ms 1
6 V 1 0 0 0 100 ms 1
7 V 1 0 1 0 100 ms 1
8 V 1 1 0 0 100 ms 1
9 V 1 1 1 0 100 ms 20
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
220 Non-Volatile Memory FLASH (CMF R) MOTOROLA
Non-Volatile Memory FLASH (CMFR)
9.8.7 Emulation Operation
In emul ation mode, to suppo rt emulat ion of the internal FLA SH me mory
with external memory devices, the CMFR responds to an array access
only by terminating the access. During emulation, the CMFR does not
drive any data and the data should be provided by an external device.
This synchronizes the timing of 1-clock on-page accesses and 2-clock
off-page accesses during emulation from external memory.
9.9 Master Reset
The device signals a master reset to the CMFR when a full reset is
required. A master reset is the highest priority operation for the CMFR
and terminates all other operations. The CMFR uses master reset to
initialize all register bits to their default reset value. If the CMFR is in
progr am o r er ase o pera ti on ( EHV = 1) and a master reset i s gene rate d,
the module performs the needed interlocks to disable the high voltage
without damage to the high voltage circuits. Master reset terminates any
other mode of operation and forces the CMFR BIU to a state ready to
receive accesses.
9.10 Interrupts
The CMFR does not generate interrupt requests.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Clock Module 221
Technical Data MMC2107
Section 10. Clock Module
10.1 Contents
10.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222
10.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222
10.4 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223
10.4.1 Normal PLL Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223
10.4.2 1:1 PLL Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223
10.4.3 External Clock Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223
10.4.4 Low-Power Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223
10.4.4.1 Wait and Doze Modes . . . . . . . . . . . . . . . . . . . . . . . . . .223
10.4.4.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224
10.5 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224
10.6 Signal Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
10.6.1 EXTAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
10.6.2 XTAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
10.6.3 CLKOUT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
10.6.4 VDDSYN and VSSSYN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
10.6.5 RSTOUT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226
10.7 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .226
10.7.1 Module Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226
10.7.2 Register Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . .227
10.7.2.1 Synthesizer Control Register. . . . . . . . . . . . . . . . . . . . .227
10.7.2.2 Synthesizer Status Register. . . . . . . . . . . . . . . . . . . . . .230
10.7.2.3 Synthesizer Test Register . . . . . . . . . . . . . . . . . . . . . . .233
10.7.2.4 Synthesizer Test Register 2. . . . . . . . . . . . . . . . . . . . . .234
10.8 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235
10.8.1 System Clock Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235
10.8.2 System Clocks Generation. . . . . . . . . . . . . . . . . . . . . . . . .236
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
222 Clock Module MOTOROLA
Clock M odule
10.8.3 PLL Lock Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236
10.8.3.1 PLL Loss of Lock Conditions . . . . . . . . . . . . . . . . . . . . .238
10.8.3.2 PLL Loss of Lock Reset. . . . . . . . . . . . . . . . . . . . . . . . .238
10.8.4 Loss of Clock Detection . . . . . . . . . . . . . . . . . . . . . . . . . . .238
10.8.4.1 Alternate Clock Selection. . . . . . . . . . . . . . . . . . . . . . . .239
10.8.4.2 Loss-of-Clock Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . .242
10.8.5 Clock Operation During Reset . . . . . . . . . . . . . . . . . . . . . .243
10.8.6 PLL Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243
10.8.6.1 Phase and Frequency Detector (PFD). . . . . . . . . . . . . .245
10.8.6.2 Charge Pump/Loop Filter. . . . . . . . . . . . . . . . . . . . . . . .245
10.8.6.3 Voltage Control Output (VCO) . . . . . . . . . . . . . . . . . . . .246
10.8.6.4 Multiplication Factor Divider (MFD) . . . . . . . . . . . . . . . .246
10.9 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246
10.10 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246
10.2 Introduction
The clock module contains:
Crystal oscillator (OSC)
Phase -locked loop (PLL )
Reduced frequency divider (RFD)
Status and control registers
Control logic
To improve noise immunity, the PLL and OSC have their own power
supply pins, VDDSYN and VSSSYN. All other circuits are powered by the
normal internal supply pins, VDD and VSS.
10.3 Features
Features of the clock module include:
2- to 10-MHz reference crystal
Support for low-power modes
Separate clock out signal
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Clock Module
Modes of Op eration
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Clock Module 223
10.4 Modes of Operation
The cl ock m odule can be op erat ed in norma l P LL mod e, 1:1 PL L m ode,
or external clock mode.
10.4.1 Normal PLL Mode
In normal PLL mode, the PLL is fully programmable. It can synthesize
frequencies ranging from 2x to 9x the reference frequency and has a
post divider capable of reducing this synthesized frequency without
disturbing the PLL. T he PLL reference can be either a crystal oscillator
or an external clock.
10.4.2 1:1 PLL Mode
In 1:1 PL L mode, the P LL synthesizes a freq uency equal to the exte rnal
clock input reference frequency. The post divider is not active.
10.4.3 Extern al Clock Mode
In external clock mode, the PLL is bypassed, and the external clock is
applied to EXTAL.
10.4.4 Low-Power Options
During wakeup from a low-power mode, the FLASH clock always clocks
through at least 16 cycles before the core clocks are enabled. This
allows the FLASH module time to recover from the low-power mode, and
software can immediately resume fetching instructions from the flash
memory.
10.4.4.1 Wait and Doze Modes
In wait and doze modes, the system clocks to the peripherals are
enabled, and the clocks to the CPU, FLASH, and random-access
memory (RAM) are stopped. Each module can disable the module
clocks locally at the module level.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
224 Clock Module MOTOROLA
Clock M odule
10.4.4.2 Stop Mode
In stop mo de, all syste m clocks ar e disab led. There are se veral options
for enabling/disabling the PLL a nd/or crystal oscillator in stop mode at
the price of increased wakeup recovery time. The PLL can be disabled
in stop mode, but then it requires a wakeup period before it can relock.
The OSC can also be disabled during stop mode, but then it requires a
wakeup period to restart.
When the PLL is enabled in stop mode (STPMD[1:0]), the external
CLKOUT signal can support systems using CLKOUT as the clock
source.
There is also a fast wakeup option for quickly enabling the system clocks
duri ng stop recovery. Th is elimina tes t he wakeup reco very time but at a
price of send ing a potentially unstable clock to the system . To prevent a
non-locked PLL frequency overshoot when using the fast wakeup
option, change the RFD divisor to the current RFD value plus one before
entering stop mode.
In external clock mode, there are no wakeup periods for oscillator startup
or PLL lock.
10.5 Blo ck Diag r am
Figure 10-1. Clock Modu le Block Diagram
VDDSYN VSSSYN RSTOUT
PLL
OSCILLATOR
EXTAL XTAL
RE FE RENCE CLO CK
CLKGEN
RFD
VC O C LKOU T
DISCLK
CLKOUT
INTE RNAL CLOC KS
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Clock Module
Sig nal Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Clock Module 225
10.6 Signal Descriptions
The clock module signals are summarized in Table 10-1 and a brief
description follows. For more detailed information, refer to Section 4.
Signal Description.
10.6.1 EXTAL
This input is driven by an external clock except when used as a
connection to the external crystal when using the internal oscillator.
10.6.2 XTAL
This output is an internal oscillator connection to the external crystal.
10.6.3 CLKOUT
This output reflects the internal system clock.
10.6.4 VDDSYN and VSSSYN
These are dedicated power and ground inputs for the frequency
synthesizer.
Table 10-1. Signal Properties
Name Function
EXTAL Os cillator or clock input
XTAL Oscillator outp ut
CLKOUT System clock ou tput
VDDSYN Clock module power supply inputs
VSSSYN
RSTOUT Re se t signal from reset controller
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
226 Clock Module MOTOROLA
Clock M odule
10.6.5 RSTOUT
The RSTOUT pin is asserted by:
Internal system reset signal, or
FRCRSTOUT bit in the reset cont rol status register (RCR); see
5.6.1 Reset Control Register
10.7 Memory Map and R egisters
The clock programming model consists of these registers:
Synthesizer control register (SYNCR) Defines clock operation
Synthesizer status register (SYNSR) Reflects clock status
Synthesizer test register (SYNTR) Used for factory test
Synthe si zer t est r egister 2 (S YNTR2) Used only fo r fa ctory test
10.7.1 Module Memory Map
Table 10-2. Clock Module Memory Map
Address Register Name Access(1)
1. S = CPU supervisor mode access only.
0x 00 c3_0000 Synthesizer control register (SYNCR) S
0x00 c3_0002 S ynthesizer status registe r (SYNSR) S
0x00 c3_0003 S ynthe sizer test register (SYNTR) S
0x00c3_0004 Synthesizer test register 2 (SYNTR2) S
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Clock Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Clock Module 227
10.7.2 Register Descriptions
This subsection provides a description of the clock module registers.
10.7.2.1 Synthesizer Control Register
The synthesizer control register (SYNCR) is read/write always.
LOLRE Loss of Lock Reset Enable Bit
The LOLRE bit determines how the system handles a loss of lock
indication. When operating in normal mode or 1:1 PLL mode, the PLL
must be locked before setting the LOLRE bit. Otherwise reset is
immedi ately asserte d. To preve nt an immediate reset, the LOL RE bit
must be cleared before writing the MFD[2:0] bits or entering stop
mode with the PLL disabled.
1 = Reset on loss of lock
0 = No r e set on loss of lock
NOTE: In external clock mode, the LOLRE bit has no effect.
Address: 0x00c3_0000 and 0x00c3_0001
Bit 15 14 13 12 11 10 9 Bit 8
Read: LOLRE MFD2 MFD1 MFD0 LOCRE RFD2 RFD1 RFD0
Write:
Reset:00100001
Bit 7654321Bit 0
Read: LOCEN DISCLK FWKUP RSVD4 STMPD1 STMPD0 RSVD1 RSVD0
Write:
Reset:00000000
Figure 10-2. Synthesizer Control Register (SYNCR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
228 Clock Module MOTOROLA
Clock M odule
MFD[2:0] Multiplication Factor Divider Field
MFD[2:0] contain the binary value of the divider in the PLL feedback
loo p. See Ta bl e 1 0-3. The MFD[2:0] val ue is t he multipl ication fact or
applied to the reference frequency. When MFD[2:0] are changed or
the PLL is disabled in stop mode, the PLL loses lock. In 1:1 PLL
mode, MFD[2:0] are ignored, and the multiplication factor is one.
NOTE: In external clock mode, the MFD[2:0] bits have no effect.
See Table 10-6.
LOCRE Loss of Clock Reset Enable Bit
The LOC RE bit determines how the system handles a loss of clock
condi tion. When the LOC EN bit is clear, LOCRE has no effect. If the
LOCS flag in SYNSR indicates a loss of clock condition, setting the
LOCRE bit causes an immediate reset. To prevent an immediate
reset, the LOCRE bit must be cleared befo re entering stop mode with
the PLL disabled.
1 = Reset on loss of clock
0 = No r e set on loss of clock
NOTE: In external clock mode, the LOCRE bit has no effect.
Table 10-3. System Frequency Multiplier of the Reference
Frequency(1) in Nor mal PLL Mode
1. fsys = fref x (MFD + 2)/2RFD
MFD[2:0]
000
(2x) 001
(3x) 010
(4x) 011
(5x) 100
(6x) 101
(7x) 110
(8x) 111
(9x)
RFD[2:0]
000 (÷ 1) 23456789
001 (÷ 2)(2)
2. Default value out of reset
1 3/2 2 5/2 3 7/2 4 9/2
010 (÷ 4) 1/2 3/4 1 5/4 3/2 7/4 2 9/4
011 (÷ 8) 1/4 3/8 1/2 5/8 3/4 7/8 1 9/8
100 (÷ 16) 1/8 3/16 1/4 5/16 3/8 7/16 1/2 9/16
101 (÷ 32) 1/16 3/32 1/8 5/32 3/16 7/32 1/4 9/32
110 (÷ 64) 1/32 3/64 1/16 5/64 3/32 7/64 1/8 9/64
111 (÷ 128) 1/64 3/128 1/32 5/128 3/64 7/128 1/16 9/128
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Clock Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Clock Module 229
RFD[2:0] Reduced Frequency Divider Field
The binary value written to RFD[2:0] is the PLL frequency divisor. See
Table 10-3. Changing RFD[2:0] does not affect the PLL or cause a
relock delay. Changes in clock frequency are synchronized to the
next falling edge of the current system clock. To avoid surpassing the
allowable system operating frequency, write to RFD[2:0] only when
the LOCK bit is set.
NOTE: In external clock mode, the RFD[2:0] bits have no effect.
See Table 10-6.
LOCEN Loss of Clock Enable Bit
The LOCEN bit enables the loss of clock function. LOCEN does not
affect the loss of lock function.
1 = Loss of clock function enabled
0 = Loss of clock function disabled
NOTE: In external clock mode, the LOCEN bit has no effect.
DISCLK Disable CLKOUT Bit
The DISCLK bit determines whether CLKOUT is driven. Setting the
DISCLK bit holds CLKOUT low.
1 = CLKOUT disabled
0 = CLKOUT enabled
FWKUP Fast Wakeup Bit
The FWKUP bit determines when the system clocks are enabled
during wakeup from stop mode.
1 = System clocks enabled on wakeup regardless of PLL lock
status
0 = System clocks enabled only when PLL is locked or operating
normally
NOTE: When FWKUP = 0, if the PLL or OSC is enabled and unintentionally lost
in stop mode, the PLL wakes up in self-clocked mode or reference clock
mode depending on the clock that was lost.
In external clock mode, the FWKUP bit has no effect on the wakeup
sequence.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
230 Clock Module MOTOROLA
Clock M odule
STPMD[1:0] Stop Mode Bits
STPMD[1:0] control PLL and CLKOUT operation in stop mode as
shown in Table 10-4.
RSVD4, RSVD1, and RSVD0 Reserved
Writin g to these re ad/w rite bits upda tes th ei r va lues b ut h as no effe ct
on functionality.
10.7.2.2 Synthesizer Status Register
The syn thesizer status re gister (S YNSR) is a read -only registe r that ca n
be read at any time. Wri ting to the SYN SR has no effect and ter minates
the cycle normally.
Table 10-4. STPMD[1:0] Operation in Stop Mode
STPMD[1:0] Operat io n Duri ng Stop Mode
System
Clocks PLL OSC CLKOUT
00 Disabled Enabled Enabled Enabled
01 Disabled Enabled Enabled Disabled
10 Disabled Disabled Enabled Disabled
11 Disabled Disabled Disabled Disabled
Address: 0x00c3_0002
Bit 7654321Bit 0
Read: PLLMODE PLLSEL PLLREF LOCKS LOCK LOCS 0 0
Write:
Reset: Note 1 Note 1 Note 1 Note 2 Note 2 0 0 0
= Writes have no effect and the access terminates without a transfe r error exception.
Notes:
1. Reset state determined during reset configuration.
2. See the LOCKS and LOCK bit descriptions.
Figure 10-3. Synthesizer Status Register (SYNSR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Clock Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Clock Module 231
PLLMODE Clock Mode Bit
The MODE bit is configured at reset and reflects the clock mode as
shown in Table 10-5.
1 = PLL clock mode
0 = External clock mode
PLLSEL PLL Select Bit
The PLLSEL bit is configured at reset and reflects the PLL mode as
shown in Table 10-5.
1 = No rma l PLL mode
0 = 1:1 PLL mode
PLLREF PLL Reference Bit
The PLL REF bi t is configured at rese t and re fl ects t he PLL referen ce
source in normal PLL mode as shown in Table 10-5.
1 = Crystal clock reference
0 = External clock reference
LOCKS Sticky PLL Lock Bit
The LOC KS flag is a sticky indication of PLL lock status.
1 = No unintentional PLL loss of lock since last system reset or
MFD change
0 = PLL loss of lock since last system reset or MFD change or
currently not locked due to exit from STOP with FWKUP set
The lock detect function sets the LOCKS bit when the PLL achieves
lock after:
A system re set, or
A write to SYNCR that changes the MFD[2:0] bits
When the PLL loses lock, LOCKS is cleared. When the PLL relocks,
LOCKS remains cleared until one of the two listed events occurs.
Table 10-5. System Clock Modes
MODE:PLLSEL:PLLREF Clock Mode
000 External clock mode
100 1:1 PLL mode
110 Norm al PLL mode with external clock reference
111 Normal PLL mode with crysta l oscillator
reference
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
232 Clock Module MOTOROLA
Clock M odule
In stop m ode, i f the PLL i s in tenti ona lly di sabled , then the LO CKS bit
refl ects the value pr ior to en teri ng stop mo de. However, if FWKUP is
set, then LOCKS is cleared until the PLL regains lock. Once lock is
regained, the LOCKS bit reflects the value prior to entering stop
mode. Fu rthermor e, readi ng the LOCKS bit at the same time that the
PLL loses lock does not return the current loss of lock condition.
In external clock mode, LOCKS remains cleared after reset. In normal
PLL mode and 1:1 PLL mode, LOCKS is set after reset.
LOCK PLL Lock Flag
1 = PLL locked
0 = PLL not locked
The LOCK flag is set when the PLL is locked. PLL lock occurs when
the synthesized frequency is within approximately 0.75 percent of the
programmed frequency. The PLL loses lock when a frequency
deviation of greater than approximately 1.5 percent occurs. Reading
the LOCK flag at the same time that the PLL loses lock or acquires
lock does not return the current condition of the PLL. The power-on
reset circuit uses the LOCK bit as a condition for releasing reset.
If operating in external clock mode, LOCK remains cleared after reset.
LOCS Sticky Loss Of Clock Flag
1 = Loss of clock detected since exiting reset or o scilla tor not yet
recovered from exit from stop mode with FWKUP = 1
0 = Loss of clock not detected since exiting reset
The LOC S flag is a sticky indication of whether a loss of clock
condition has occurred at any time since exiting reset in normal PLL
and 1:1 PLL modes. LOCS = 0 when the system clocks are operating
normally. LOCS = 1 when system clocks have failed due to a
reference failure or PLL failure.
After entering stop mode with FWKUP set a nd the PLL and oscillator
inte ntiona lly disabled (S TP MD[ 1:0] = 11), t he PLL exi ts st op m ode in
SCM while the oscillator starts up. During this time, LOCS is
tempor arily set regardless of LOCEN. It is cleared once the oscillator
comes up and the PLL is attempting to lock.
If a read of the LOCS flag and a loss of clock condition occur
simultaneously, the flag does not reflect the current loss of clock
condition.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Clock Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Clock Module 233
A loss of clock condition can be detected only if LOCEN = 1 or the
oscillator has not yet returned from exit from stop mode with
FWKUP = 1.
NOTE: The LOCS flag is always 0 in external clock mode.
10.7.2.3 Synthesizer Test Register
The synthesizer test register (SYNTR) is only for factory testing. When
not in test mode, SYNTR is read-only.
Address: 0x00c3_0003
Bit 7654321Bit 0
Read: 0 0 000000
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfe r error exception.
Figure 10-4. Synthesizer Test Register (SYNTR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
234 Clock Module MOTOROLA
Clock M odule
10.7.2.4 Synthesizer Test Register 2
The synthesizer test register 2 (SYNTR2) is only for factory testing.
Bits 3110
Bits 3110 are read-only. Writing to bits 3110 has no effect.
RSVD9RSVD0 Reserved
The RSVD bits can be read at any time. Writes to these bits update
the register values but have no effect on functionality.
Address: 0x00c3_0004 through 0x00c3_0007
Bit 31 30 29 28 27 26 25 Bit 24
Read: 0 0 000000
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: 0 0 000000
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0 0 0000
RSVD9 RSVD8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: RSVD7 RSVD6 RSVD5 RSVD4 RSVD3 RSVD2 RSVD1 RSVD0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfe r error exception.
Figure 10-5. Synthesizer Test Register 2 (SYNTR2)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Clock Module
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Clock Module 235
10 .8 Fun cti on al Descr ipti o n
This subsection provides a functional description of the clock module.
10.8.1 System Clo ck Modes
The system clock source is determined during reset. The value of
VDDSYN is latched during reset and is expected to remain at that state
after reset is negated. If VDDSYN is changed during a reset other than
power-on reset, the internal clocks may glitch as the clock source is
changed between extern al cl ock mo de a nd PLL cl ock mod e. Whe never
VDDSYN is changed in re set, an i m media te loss of lock co ndi tion occu rs.
Table 10-6 shows the clock-out frequency to clock-in frequency
relationships for the possible clock modes.
CAUTION: XTAL must be tied low in external clock mode when rese t is asserte d. If
it is not, clocks could be suspended indefinitely.
The external clock is divided by two internally to produce the system
clocks.
Table 10-6. Clock-Out and Clock-In Relationships
Clock Mode PLL Option s (1)
1. fref = input refer ence frequency
fsys = CLKOUT frequency
MFD ranges fr om 0 to 7.
RFD ranges from 0 to 7.
Normal PLL clock mode fsys = fref × (MFD + 2 ) /2RFD
1:1 PLL clock mo de fsys = fref
External clock mode fsys = fref/2
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
236 Clock Module MOTOROLA
Clock M odule
10.8.2 System Clocks Generation
In normal PLL clock mode, the default system frequency is two times the
reference frequency after reset. The RFD[2:0] and MFD[2:0] bits in
SYNCR select the frequency multiplier.
When prog ramming the PLL, do not exce ed the maximum system clock
frequency listed in the electrical specifications. Use this procedure to
accommodate the frequency overshoot that occurs when the MFD bits
are changed:
1. Determine the appropriate value for the MFD and RFD fields in
SYNCR. The am ount of jitter in the system clocks can be
minimized by selecting the maximum MFD factor that can be
paired with an RFD factor to provide the required frequency.
2. Writ e a value of RFD (fr om step 1) + 1 to the RFD field of SYNCR.
3. Write the MFD value from step 1 to SYNCR.
4. Monitor the LOCK flag in SYNSR. When the PLL achieves l ock,
write the RFD value from step 1 to the RFD field of SYNCR. This
changes the system clocks frequency to the required frequency.
NOTE: Keep the maximum system clock frequency below the limit given in
Section 22. Electrical Specifications.
10.8.3 PLL Lock Detection
The lock detect logic monitors the reference frequency and the PLL
feedback frequency to determine when frequency lock is achieved.
Phase lock is inferred by the frequency relationship, but is not
guaranteed. The LOCK flag in SYNSR reflects the PLL lock status. A
sticky lock flag, LOCKS, is also provided.
The lock detect function uses two counters. One is clocked by the
reference and the other is clocked by the PL L feedback. When the
refere nce counter has counte d N cycles, its coun t is compared to that of
the feedback counter. If the feedback counter has also counted N cycles,
the process is repeated for N + K counts. Then, if the two counters still
match, the lock criteria is relaxed by 1/2 and the system is notified that
the PLL has achieved frequency lock.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Clock Module
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Clock Module 237
After lock is detec ted, the lock circuit continues to m onitor the refer ence
and feedback frequencies using the alternate count and compare
process. If the counters do not match at any comparison time, then the
LOCK flag i s cleare d to indi ca te that the PLL ha s l ost lock. At thi s p oint,
the lock criteria is tightened and the lock detect process is repeated.
The alternate count sequences prevent false lock detects due to
frequency aliasing while the PLL tries to lock. Alternating between tight
and relaxed lock criteria prevents the lock detect function from randomly
toggling between locked and non-locked status due to phase
sensitivities. Figure 10-6 shows the sequence for detecting locked and
non-locked conditions.
In external clock mode, the PLL is disabled and cannot lock.
Figure 10-6. Lock Detect Sequence
COUNT N
REFERENCE CYCLES
AND COMP A RE
NUMBER O F FEE DB A CK
CYCLES ELAPSED
START
WITH TIGHT LO CK
CRITERIA REFE RENCE COUNT
FEEDBACK C OU NT
LOSS OF LOCK DETECTED
SET TIG HT L OC K CRI TE RIA
AND NOTIFY SYSTEM OF LOSS
OF LOCK CONDITION
COUNT N + K
RE FERENCE CYCLES
AND COMPARE NUMBER
OF FEEDBACK CYCLES
ELAPSED
LOCK DETECTED.
SET RELAXED LOCK
CONDITION AND NOTIFY
SYSTEM OF LOCK
CONDITION
REFERE NCE CO UNT
FEED BACK COUNT
REFERE NCE CO UNT =
FEEDBACK COU N T = N
IN SAME CO UNT /COM PARE SEQU ENCE
REFERE NCE COUNT =
FEEDBACK COU NT = N + K
IN SAME C OU NT/ CO M PAR E SEQU EN C E
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
238 Clock Module MOTOROLA
Clock M odule
10.8.3.1 PLL Loss of Lock Conditions
Once the P LL acquires lock after reset, the LOCK and LOCK S fla gs are
set. If the MFD is changed, or if an unexpected loss of lock condition
occurs, the LOCK and LOCKS flags are negated. While the PLL is in the
non-locked condition, the system clocks continue to be sourced from the
PLL as the PLL attempts to relock. Consequently, during the relocking
process, the system clocks frequency is not well defined and may
exceed the maximum system frequency, violating the system clock
timing specifications.
Howeve r, once the PLL has relo cked, the LOCK fl ag is set. The LOCKS
flag remains cleared if the loss of lock is unexpected. The LOCKS flag is
set when the loss of lock is caused by changing MFD. If the PLL is
inte ntiona lly disa bled dur ing stop m ode, th en afte r exi t fro m stop mode,
the LOC KS flag r eflects th e val ue prio r to enter ing stop mod e once l ock
is regained.
10.8.3.2 PLL Loss of Lock Reset
If the LOLRE bit in SYNCR is set, a loss of lock conditio n asserts reset.
Reset reinitializes the LOCK and LOCKS flags. Therefore, software
must read the LOL bit in reset status register (RSR) to determine if a loss
of lock caused the reset. See 5.6.2 Reset Status Register.
To exit reset in PLL mode, the reference must be present, and the PLL
must achieve lock.
In external clock mode, the PLL cannot lock. Therefore, a loss of lock
condition cannot occur, and the LOLRE bit has no effect.
10.8.4 Loss of Clock Detection
The LOCEN bit in SYNCR enable s the loss of clock detection circuit to
monitor the input clocks to the phase and frequency detector (PFD).
When either the reference or feedback clock frequency falls below the
minimum frequency, the lo ss of clock circuit se ts the sticky LOCS flag in
SYNSR.
NOTE: In external clock mode, the loss of clock circuit is disabled.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Clock Module
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Clock Module 239
10.8.4.1 Alternate Clock Selection
Dependi ng on which clock source fa ils, the loss-of-clo ck circuit swi tches
the system clocks source to the remaining operational clock. The
alternate clock source generates the system clocks until reset is
asserted. As Table 10-7 shows, if the reference fails, the PLL goes out
of lock and into self-clocked mode (SCM). The PLL remains in SCM until
the next reset. When the PLL is operating in SCM, the system frequency
depends on the value in the RFD field. The SCM system frequency
stated in electrical specifications assumes that the RFD has been
programmed to binary 000. If the loss-of-clock condition is due to PLL
failure, the PLL refer ence becomes the system clocks sour ce until the
next reset, even if the P L L regains and re locks.
A special loss-of-clock condition occurs when both the reference and the
PLL fail. The failures may be simultaneous, or the PLL may fail first. In
either case, the reference clock failure takes priority and the PLL
at tempts to ope rate in SCM . If successful, the P LL remain s in SCM until
the next reset. If the PLL cannot operate in SCM, the system remains
static until the next reset. Both the reference and the PLL must be
functioning properly to exit reset.
Table 10-7. Loss of Clock Summary
Clock
Mode
System Clock
Source
Before Failure
Reference Failure
Alternate Clock
Selected by LOC
Circuit(1) Until Reset
1. The LOC cir cuit moni tors t he reference and f eedbac k inputs to the PFD. Se e Figur e 10-8.
PLL Failure
Alternate Clock
Selected by
LOC Circuit
Until Rese t
PLL PLL PLL self-clock ed mode PLL reference
External External clock None NA
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
240 Clock Module MOTOROLA
Clock M odule
Table 10-8. Stop Mode Operation (Sheet 1 of 3)
MODE
In
LOCEN
LOCRE
LOLRE
PLL
OSC
FWKUP
Exp ec ted PL L
Acti on a t Stop PLL Acti on
During Stop MODE
Out
LOCKS
LOCK
LOCS
Comments
EXT XXX X X X EXT 000
Lose reference clock Stuck ———
NRM 0 0 0 Off Off 0 Lose lock,
f.b. clock,
reference clock
Regain NRM LK 1 LC
No regain S tuck ———
NRM X 0 0 Off Off 1 Lose lock,
f.b. clock,
reference clock
Regain clocks, but
dont regain lock SCM>
unstable NRM 0>LK 0>1 1>LC
Block LOCS and LOCKS until
clock and lock respectively
regain; enter SCM regardless
of LOCEN bit until reference
regained
No reference clock
regain SCM>0>0>1>
Block LOCS and LOCKS until
clock and lock respectively
regain; enter SCM regardless
of LOCEN bit
No f.b. clock regain Stuck ———
NRM 0 0 0 Off On 0 Lose lock
Regain NRM LK 1 LC Block LOCKS from being
cleared
Lose reference clock
or no loc k regain Stuck ———
Lose reference clock,
regain NRM LK 1 LC Block LOCKS from being
cleared
NRM 0 0 0 Off On 1 Lose lock
No lock regain Uns table NRM 0>LK 0>1 LC Block LOCKS until lock
regained
Lose reference clock
or no f .b. clock regain Stuck ———
Lose reference clock,
regain Unstable NRM 0>LK 0>1 LC LOCS not set because
LOCEN = 0
NRM 0 0 0 On On 0
NRM LK 1 LC
Lose lock or cloc k Stuck ———
Lose lock, regain NRM 0 1 LC
Lose clock and lock,
regain NRM 0 1 LC LOCS not set because
LOCEN = 0
NRM 0 0 0 On On 1
NRM LK 1 LC
Lose lock Unstable NRM 0 0>1 LC
Lose lock, regain NRM 0 1 LC
Lose clock Stuck ———
Lose clock, regain
wi th ou t loc k Uns table NRM 0 0>1 LC
Lose clock, regain
with lock NRM 0 1 LC
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Clock Module
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Clock Module 241
NRM X X 1 Off X X Lose lock,
f.b. clock,
reference clock RESET RESET ———Reset imm ediately
NRM 0 0 1 On On X NRM LK 1 LC
Lose lock or cloc k RESET ———Reset immediately
NRM 1 0 0 Off Off 0 Lose lock,
f.b. clock,
reference clock
Regain NRM LK 1 LC RE F not entered during stop;
SCM entered during stop only
during OSC startup
No regain S tuck ———
NRM 1 0 0 Off On 0 Lose lock,
f.b. clock
Regain NRM LK 1 LC RE F mode not entered during
stop
No f.b. clock or lock
regain Stuck ———
Lose reference clock SCM 0 0 1 Wakeup without lock
NRM 1 0 0 Off On 1 Lose lock,
f.b. clock
Regain f.b. clock Unstable NRM 0>LK 0>1 LC RE F mode not entered during
stop
No f.b. clock regain Stuck ———
Lose reference clock SCM 0 0 1 Wakeup without lock
NRM 1 0 0 On On 0
NRM LK 1 LC
Lose reference clock SCM 0 0 1 Wakeup without lock
Lose f.b. clock REF 0 X 1 Wakeup without lock
Lose lock Stuck ———
Lose lock, regain NRM 0 1 LC
NRM 1 0 0 On On 1
NRM LK 1 LC
Lose reference clock SCM 0 0 1 Wakeup without lock
Lose f.b. clock REF 0 X 1 Wakeup without lock
Lose lock Unstable NRM 0 0>1 LC
NRM 1 0 1 On On X NRM LK 1 LC
Lose lock or cloc k RESET ———Reset immediately
NRM 11XOffXXLose lock,
f.b. clock,
reference clock RESET RESET ———Reset imm ediately
NRM 1 1 0 On On 0
NRM LK 1 LC
Lose clock RESET ———Reset immediately
Lose lock Stuck ———
Lose lock, regain NRM 0 1 LC
Table 10-8. Stop Mode Operation (Sheet 2 of 3)
MODE
In
LOCEN
LOCRE
LOLRE
PLL
OSC
FWKUP
Exp ec ted PL L
Acti on a t Stop PLL Acti on
During Stop MODE
Out
LOCKS
LOCK
LOCS
Comments
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
242 Clock Module MOTOROLA
Clock M odule
10.8.4.2 Loss-of-Clock Reset
When a loss-of-clock condition is recognized, reset is asserted if the
LOCRE bit in SYNCR is set. The LOCS bit in SYNSR is cleared after
reset. Therefore, the LOC bit must be read in RSR to determine that a
loss of clock condition occu rred . LOC RE has no effect in external clo ck
mode.
To exit reset in PLL mode, the reference must be present, and the PLL
must acquire lock.
NRM 1 1 0 On On 1
NRM LK 1 LC
Lose clock RESET ———Reset immediately
Lose lock Unstable NRM 0 0>1 LC
Lose lock, regain NRM 0 1 LC
NRM 1 1 1 On On X NRM LK 1 LC
Lose clock or lock RESET ———Reset imm ediately
REF 1 0 0 X X X REF 0 X 1
Lose reference clock Stuck ———
SCM 1 0 0 Off X 0 PLL disabled Regain SCM SCM 0 0 1 Wakeu p without lock
SCM 1 0 0 Off X 1 PLL disabled Regain SCM SCM 0 0 1
SCM 1 0 0 On On 0 SCM 0 0 1 Wakeup without lock
Lose reference clock SCM
SCM 1 0 0 On On 1 SCM 001
Lose reference clock SCM
PLL = PLL enabled during STOP mode. PLL = On when STPMD[1:0] = 00 or 01
OSC = OSC enabled during STOP mode. OSC = On when STPMD[1:0] = 00, 01, or 10
MODES
NRM = norm al PLL cr ystal cloc k refer enc e or nor mal PLL ex ternal refe renc e or PLL 1 :1 mo de. During PLL 1: 1 or nor mal
external reference mode, t he oscillator is never enabled. Therefore, during the se m odes, refer to the OSC = On
case regardless of STPM D values.
EXT = external clock mode
REF = PLL referenc e mo de due to l osing PLL clock or lock fro m NRM mode
SCM = PLL self-clocked mode due to losi ng reference clock from NRM mode
RESET = immediate reset
LOCKS
LK = expecting previous val ue of LOCKS before entering stop
0–>LK = current val ue is 0 unti l lo ck is regai ned which then will be the pr evious value before e ntering stop
0–> = current val ue is 0 unti l l ock is regained but lock is never expected to regain
LOCS
LC = expecting previous value of LOCS before entering stop
1–>LC = current val ue is 1 unt il clock is regained which then wi ll be the previous value befor e entering stop
1–> = current value is 1 unti l cl ock is regained but CLK is never expect ed to regain
Table 10-8. Stop Mode Operation (Sheet 3 of 3)
MODE
In
LOCEN
LOCRE
LOLRE
PLL
OSC
FWKUP
Exp ec ted PL L
Acti on a t Stop PLL Acti on
During Stop MODE
Out
LOCKS
LOCK
LOCS
Comments
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Clock Module
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Clock Module 243
10.8.5 Clock Operation During Reset
In ext ernal clock mode, the system is static and does not recognize reset
until a clock is applied to EXTAL.
In PLL mode, the PLL operates in self-cloc ked mode (SCM) during reset
until the input reference clock to the PLL begins operating within the
limits given in the electrical specifications.
If a PLL failure causes a reset, the system enters reset using the
refere nce cl o ck. Th en th e clock s ource chang es to the PLL ope rating in
SCM. I f SCM is not functio nal, the system becomes stat ic . Alternat ely, if
the LOCEN bit in SYNCR is clear when the PLL fails, the system
becomes static. If external reset is asserted, the system cannot enter
reset unless the PLL is capable of operating in SCM.
10.8.6 PLL Operation
In PLL mode, the PLL synthesizes the system clocks. The PLL can
multiply the reference clock frequency by 2x to 9x, provided that the
system clock (CLKOUT) frequency remains within the range listed in
electrical specifications. For example, if the reference frequency is
2 MHz, the PLL can synthesize frequencies of 4 MHz to 18 MHz. In
addition, the RFD can reduce the system frequency by dividing the
output of the PLL. The RFD is not in the feedback loop of the PLL, so
changing the RFD divisor does not affect PLL operation.
Figure 10-8 shows the external support circuitry for the crystal oscillator
with example component values. Actual component values depend on
crystal specifications.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
244 Clock Module MOTOROLA
Clock M odule
Figure 10-7. PLL Block Diagram
Figure 10-8. Crystal Oscillator Example
MFD
2X TO 9X DIVIDE-BY-
LOSS OF
CLOCK
DETECT
LOCK
DETECT
CHARGE
PUMP
CHARGE
PUMP
PFD
UP
FILTER VCO
TWO
REFERENCE CLOCK
DOWN
1:1 PLL MODE
CLKOUT
LOCS
LOCK
VDDSYN VSSSYN RSTOUT
MFD[2:0]
FEEDBACK CLOC K
OE CLKOUT
VCO CLKOUT
VSSSYN VSSSYN
EXTAL XTAL
RS
RF
C1 C2
ON-CHIP
8-MHz CRY ST AL CO NFI GU RA TI ON
C1 = C2 = 16 pF
RF = 1 M
RS = 470
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Clock Module
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Clock Module 245
10.8.6.1 Phase and Frequency Detector (PFD)
The P FD is a dual-l atch phase-freq uency detect or. It compares bo th the
phase and frequency of the reference and feedback clocks. The
reference clock com es from either the crystal oscillator or an external
clock source. The feedback clock comes from:
CLKOUT in 1:1 PLL mode, or
VCO output divided by two if CLKOUT is disabled in 1:1 PLL
mode, or
VCO output divided by the MFD in normal PLL mode
When the frequency of the feedback clock equals the frequency of the
reference clock, the PLL is frequency-locked. If the falling edge of the
feedback clock lags the falling edge of the reference clock, the PFD
pulses the UP signal. If the falling edge of the feedback clock leads the
falling edge of the reference clock, the PFD pulses the DOWN signal.
The width of these pulses relative to the reference clock depends on how
much the two clocks lead or lag each other. Once phase lock is
achieved, the PFD continues to pulse the UP and DOWN signals for very
short durations during each reference clock cycle. These short pulses
continually update the PLL and prevent the frequency drift phenomenon
known as dead-banding.
10.8.6.2 Charge Pump/Loop Filter
In 1:1 PLL mode, th e charge pump u ses a fixed current . In nor mal mode
the current magnitude of the charge pump varies with the MFD as shown
in Table 10-9.
The UP and DOWN signals from the PFD control whether the charge
pump applies or removes charge, respectively, from the loop filter. The
filter is integrated on the chip.
Table 10-9. Charge Pump Current and MFD
in Normal Mode Operation
Charge Pump Curren t MFD
1X 0 MFD < 2
2X 2 MFD < 6
4X 6 MFD
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
246 Clock Module MOTOROLA
Clock M odule
10.8.6.3 Voltage Control Output (VCO)
The voltage across the loop filter controls the frequency of the VCO
output. The frequency-to-voltage relationship (VCO gain) is positive, and
the output frequency is four times the target system frequency.
10.8.6.4 Multiplication Factor Divider (MFD)
When the PLL is n ot in 1:1 PLL mode, the MFD di vides the ou tput of the
VCO and feeds it back to the PFD. The PFD controls the VCO frequency
via the charge pump and loop filter such that the reference and feedback
clocks have the sam e frequ ency and phase. T hus, the freque ncy of the
input to the MFD, which is also the output of the VCO, is the reference
frequency multipli ed by the same amount that the MFD divides by. For
example, if the MFD divides the VCO frequency by six, the PLL is
frequency locked when the VCO frequency is six ti mes the reference
frequency. The presence of the MFD in the loop allows the PLL to
perform frequency multiplication, or synthesis.
In 1:1 PLL mode, the MFD is bypassed, and the effective multiplication
factor is one.
10.9 Reset
The clock m odule can assert a rese t w hen a l oss of clo ck or loss of lock
occurs as described in 10.8 Functional Description.
Reset initializes the clock module registers to a known startup state as
described in 10.7 Memory Map and Register s.
10.10 Interrupts
The clock module does not generate interrupt requests.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Ports M odule 247
Technical Data MMC2107
Section 11. Ports Module
11.1 Contents
11.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248
11.3 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .249
11.4 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .249
11.4.1 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .250
11.4.2 Register Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . .251
11.4.2.1 Port Output Data Registers . . . . . . . . . . . . . . . . . . . . . .251
11.4.2.2 Port Data Direction Registers. . . . . . . . . . . . . . . . . . . . .252
11.4.2.3 Port Pin Data/Set Data Registers . . . . . . . . . . . . . . . . .253
11.4.2.4 Port Clear Output Data Registers . . . . . . . . . . . . . . . . .254
11.4.2.5 Port C/D Pin Assignment Register. . . . . . . . . . . . . . . . .255
11.4.2.6 Port E Pin Assignment Register. . . . . . . . . . . . . . . . . . .256
11.5 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257
11.5.1 Pin Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258
11.5.2 Port Digital I/O Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . .259
11.6 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .259
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
248 Ports M odule MOTOROLA
Ports Module
11.2 Introduction
Many of the pins associated wi th the ext erna l interf ace ma y be u sed fo r
several different functions. Their primary function is to provide an
ext ernal inter face to access off- chip reso urces. When not used for their
primary functions, many of the pins may be used as digital input/output
(I/O) pins. In som e cases, the pin fu nction is set b y the oper ating mod e,
and the alternate pin functions are not supported.
To facilitate the digital I/O function, these pins are grouped into 8-bit
ports. Each port has registers that configure the pins for the desired
function, monitor the pins, and control the pins within the ports.
Figure 11-1. Ports Module Block Diagram
CSE[1:0] / PE[4: 3] (1)
SHS / RCO N / PE7
TC[2:0] / PE[2:0](1)
TA / PE6
TEA / PE5
D[7 :0 ] / PD[7:0]
D[15:8] / PC[7:0]
D[23:16] / PB[7: 0]
D[31:24] / PA[7: 0]
EB[3:0] / PI[7:4 ](1)
A[7:0] / PH[7:0](1)
A[15:8] / PG[7:0](1)
R/W / PF7(1)
A[22:16] / PF[6:0](1)
CS[3:0]/ PI [3 :0 ](1)
PORT E
PORT D
PORT C
PORT B
PORT A
PORT I
PORT H
PORT G
PORT F
Note 1. These pins are found onl y on the 144-pin package.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ports Module
Signals
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Ports M odule 249
11.3 Signals
See Table 11- 3 in 11. 5 Fu nct ion al De scr ipt ion for signal location and
naming convention.
11.4 Memory Map and R egisters
The ports programming model consists of these registers:
The port output da ta registers (PORTx) store the data t o be driven
on the corresponding port pins when the pins are configured for
digital output.
The port data direction registers (DDRx) control the direction of
the port pin drivers when the pins are configured for digital I/O.
Port pin data/set data registers (PORTxP/SETx):
Reflect the current state of the port pins
Allow for setting individual bits in PORTx
The port clear output data registers (CLRx) allow for clearing
individual bits in PORTx.
The por t pin assignment re gisters ( PCDPAR an d PEPAR) control
the function of each pin of the C, D, E, I7, and I6 ports.
In emulation mode, accesses to the port registers are ignored and the
port access goes external so that emulation hardware can satisfy the
port access request. The cycle termination is always provided by the port
logic, even in emulation mode.
All port registers are word-, half-word, and byte-accessible and are
grouped to allow coherent access to port data register groups. Writing to
reserved bits in the port registers has no effect and reading returns 0s.
The I/O ports have a base address of 0x00c0_0000.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
250 Ports M odule MOTOROLA
Ports Module
11.4.1 Memory Map
Table 11-1. I/O Port Module Memory Map
Address Bits 3124 Bits 2316 Bi ts 158Bits 7–0 Access(1)
0x00c0_0000 PORTA PORTB PORTC PORTD S/U
0x00c0_0004 PORTE PORTF PORTG PORTH S/U
0x00c0_0008 PORTI Reserved(2) S/U
0x00c0_000c DDRA DDRB DDRC DDRD S/U
0x00c0_0010 DDRE DDRF DDRG DDRH S/U
0x00c0_0014 DDRI Reserved(2) S/U
0x00c0_0018 PORTAP/SETA PORTBP/SETB PORTCP/SETC PORTDP/SETD S/U
0x00c0_001c PORTEP/SETE PORTFP/SETF PORTGP/SETG PORTHP/SETH S/U
0x00c0_0020 PORTIP/SETI Reserved(2) S/U
0x00c0_0024 CLRA CLRB CLRC CLRD S/U
0x00c0_0028 CLRE CLRF CLRG CLRH S/U
0x00c0_002c CLRI Reserved(2) S/U
0x00c0_0030 PCDPAR PEPAR Reserved(2) S/U
0x00c0_0034
0x00c0_003c Reserved(2) S/U
1. S/U = CPU supervisor or user mode acc ess. User mode accesses to supervisor onl y addresses have no effe ct and result
in a cycl e termination transfer error.
2. Writes have no eff e ct, reads return 0s, and the access terminat es wit hout a transf er error exception.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ports Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Ports M odule 251
11.4.2 Register Descriptions
This subsection provides a description of the I/O port registers.
11.4.2.1 Port Output Data Registers
The port output data registers (PORTx) store the data to be driven on the
corresponding port x pins when the pins are configured for digital output.
Reading PORTx returns the current val ue in the register, not the port x
pin values.
The SETx and CLRx registers also affect the PORTx register bits. To set
bits in PORTx, write 1s to the corresponding bits in PORTxP/SETx. To
clear bits in PORTx, write 0s to the corresponding bits in CLRx.
PORTx are read/write registers when not in emulation mode. Reset sets
PORTx.
Address: 0x0 0c0_0000 PORTA
0x00 c0_0001 PORT B
0x00 c0_0002 PORT C
0x00 c0_0003 PORT D
0x00 c0_0004 PORT E
0x00 c0_0005 PORT F
0x00 c0_0006 PORT G
0x00 c0_0007 PORT H
0x00 c0_0008 PORT I
7654321Bit 0
Read: PORTx7 PORTx6 PORTx5 PORTx4 PORTx3 PORTx2 PORTx1 PORTx0
Write:
Reset:11111111
Figure 11-2. Port Output Data Registers (PORTx)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
252 Ports M odule MOTOROLA
Ports Module
11.4.2.2 Port Data Direction Registers
A port data direction register ( DDRx) controls the direction of the port x
pin drive rs when the pins are configured for digital I/O. Setting an y bit in
DDRx configures the corresponding port x pin as an output. Clearing any
bit in DDRx configu res the correspon ding pin as an input. When a pin is
not configured for digital I/O, its corresponding data direction bit has no
effect.
DDRx are read/write registers when not in emulation mode. Reset clears
DDRx.
DDRx[7:0] Port x Data Direction Bits
1 = Pin configured as output
0 = Pin configured as input
Address: 0x0 0c0_000c DDRA
0x00 c0_000d DDRB
0x00 c0_000e DDRC
0x00 c0_000f DDRD
0x00 c0_0010 DDRE
0x00 c0_0011 DDRF
0x00 c0_0012 DDRG
0x00 c0_0013 DDRH
0x00 c0_0014 DDRI
Bit 76 54321Bit 0
Read: DDRx7 DDRx6 DDRx5 DDRx4 DDRx3 DDRx2 DDRx1 DDRx0
Write:
Reset:00000000
Figure 11-3. Port Data Direction Registers (DDRx)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ports Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Ports M odule 253
11.4.2.3 Port Pin Data/Set Data Registers
Reading a port pin data/set data register (PORTxP/SETx) returns the
current state of the port x pins.
Writing 1s to PORTxP/SETx sets the corresponding bits in PORTx.
Writing 0s has no effect.
PORTxP/SETx are read/write registers when not in emulation mode.
Address: 0x0 0c0_0018 PORTAP/SETA
0x00 c0_0019 PORT BP/SETB
0x00 c0_001a PORT CP/SETC
0x00 c0_001b PORT DP/SETD
0x00 c0_001c PORTEP/SETE
0x00 c0_001d PORTFP/SETF
0x00 c0_001e PORTGP/SETG
0x00 c0_001f PORTHP/SETH
0x00 c0_0020 PORT IP/SETI
Bit 76 54321Bit 0
Read: PORTxP7 PORTxP6 PORTxP5 PORTxP4 PORTxP3 PORTxP2 PORTxP1 PORTxP0
Write: SETx7 SETx6 SETx5 SETx4 SETx3 SETx2 SETx1 SETx0
Reset:PPPPPPPP
P = Current pin state
Figure 11-4. Port Pin Data/Set Data Registers (PORTxP/SETx)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
254 Ports M odule MOTOROLA
Ports Module
11.4.2.4 Port Clear Output Data Registers
Writing 0s to a port clear output data register (CLRx) clears the
corresponding bits in PORTx. Writing 1s has no effect. Reading CLRx
returns 0s.
CLRx are read/write registers w hen not in emulation mode.
Address: 0x0 0c0_0024 CLRA
0x00 c0_0025 CLRB
0x00 c0_0026 CLRC
0x00 c0_0027 CLRD
0x00 c0_0028 CLRE
0x00 c0_0029 CLRF
0x00 c0_002a CLRG
0x00 c0_002b CLRH
0x00 c0_002c CL RI
Bit 76 54321Bit 0
Read: 0 0 000000
Write: CLRx7 CLRx6 CLRx5 CLRx4 CLRx3 CLRx2 CLRx1 CLRx0
Reset:00000000
Figure 11-5. Port Clear Output Data Registers (CLRx)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ports Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Ports M odule 255
11.4.2.5 Port C/D Pin Assignment Register
The port C/D pin assignment register (PCDPAR) controls the pin
function of ports C, D, I7, and I6.
PCDPAR is a read/write register when not in emulation mode.
PCDPA Port C, D, I7, and I6 Pin Assignment Bit
1 = Port C, D, I7, and I6 pins configured for primary function
0 = Port C, D, I7, and I6 pins configured for digital I/O
Address: 0x00c0_0030
Bit 7654321Bit 0
Read: PCDPA 0000000
Write:
Reset:See note0000000
= Writes have no effect and the access terminates without a tr ansfer er ror exception.
Note: Reset state determined during reset configuration. PCDPA = 1 except in single-chip
mode or when an external boot device is selected with a 16-bit port size in master mode.
Figure 11-6. Port C, D, I7, and I6 Pin Assignment
Register (PCDPAR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
256 Ports M odule MOTOROLA
Ports Module
11.4.2.6 Port E Pin Assignment Register
The port E pin assign ment register (P EPA R) controls the pin funct ion of
port E.
PEPAR is a read/write register when not in emulation mode.
PEPA[7:0] Port E Pin Assignment Bits
1 = Port E pins configured for primary function
0 = Port E pins configured for digital I/O
Address: 0x00c0_0031
Bit 76 54321Bit 0
Read: PEPA7 PEPA6 PEPA5 PEPA4 PEPA3 PEPA2 PEPA1 PEPA0
Write:
Reset: See note
Note: Reset state determined during reset configuration as shown in Table 11-2.
Figure 11-7. Port E Pin Assignment Register (PEPAR)
Table 11-2. PEPAR Reset Values
PEPAR Pin Master
Mode Single-Chip
Mode Emulation
Mode
PEPA7 SHS 10 1
PEPA6 TA 10 1
PEPA5 TEA 10 1
PEPA[4:3] CSE[1:0] 0 0 1
PEPA[2:0] TC[2:0] 0 0 1
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ports Module
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Ports M odule 257
11 .5 Fun cti on al Descr ipti o n
The ini tial pin fun ction i s dete rmined during reset configur ation. T he pi n
assignment registers (PCDPAR and PEPAR) allow the user to select
between digital I/O or another pin function after reset.
In single-chip mode, all pins are configured as digital I/O by default.
Every digita l I/O pin is individually configur able as an input or an outpu t
via a data direction register (DDRx).
Every port has an output data register (PORTx) and a pin data register
(PORT xP/SETx) to moni tor and control the state of its pin s. Data writte n
to PORTx is stored and then driven to the corresponding PORTx pins
configured as outputs.
Reading PORTx returns the current state of the register regardless of
the state of the corresponding pins.
Reading PORTxP returns the current state of the corresponding pins,
regardless of whether the pins are input or output.
Every port has a set register (PORTxP/S ETx) and a clear register
(CLRx) for setting or clearing individual bits in PORTx.
In master mode and emulation mode, ports A and B function as the
upper external data bus, D[31:16]. When the PCDPA bit is set, ports C
and D function as the lower external data bus, D[15:0]. Ports EI are
configured to support external memory and emulation functions.
In master mode, the function of EB[3:2] is determined by the PCDPA bit.
The function of CS[3:0] is determined by the individual chip select enable
(CSENx ) bits.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
258 Ports M odule MOTOROLA
Ports Module
11.5.1 Pin Functions
Table 11-3. Ports AI Supported Pin Functions
Pin
Port
Ma st er M ode Sing le-C hi p Mode Emul at i on Mod e (1)
D[31:24] A D[31:24] (I/O) PA[7:0] (I/O) D[31:2 4] (I/O)
D[23:16] B D[23:16] (I/O) P B[7:0](I/O) D[23:16](I/O)
D[15:8] C D[15:8] (I/O) (PCDPA = 1)
or
PC[7:0] (I/O) (PCDPA = 0) PC[7:0] (I/O) (PCDPA = 0)(2) D[15:8] (I/O) (P CDPA = 1)
D[7:0] D D[7:0] ( I/O ) (PCDPA = 1)
or
PD[7:0] (I/O) (PCDPA = 0) PD[7:0] (I/O) (PCDPA = 0)(2) D[7:0] (I/O) (PCDP A = 1)
SHS(3)
E
SHS (O ) (P EPAR 7 = 1)
or
PE7 (I/O) (PEP AR7 = 0) PE7 (I/O) (PEP AR7 = 0) (4) SHS (O) (PEPAR7 = 1 )
TA TA (I) (PEPAR6 = 1)
or
PE6 (I/O) (PEP AR6 = 0) PE6 (I/O) ( PEPAR6 = 0)(4) TA (I) (PEPAR6 = 1)
TEA TEA (I) (PEPAR5 = 1)
or
PE5 (I/O) (PEP AR5 = 0) PE5 (I/O) (PEP AR5 = 0) (4) TEA (I) (PEPAR5 = 1)
CSE[1:0] CSE[1:0] (O) (PEPAR[4:3] = 1)
or
PE[4 :3 ] ( I/O) (PEPAR[4 :3] = 0) PE[4 :3 ] (I /O) (PEPAR [4 :3 ] = 0)(4) CSE[1:0] (O) (PEPAR[4:3] = 1)
TC[2:0] TC[2:0] (O) (PEPAR[2:0] = 1 )
or
PE[2 :0 ] ( I/O) (PEPAR[2 :0] = 0) PE[ 2 :0 ] ( I/O) (PEPAR [2 :0 ] = 0)(4) TC[2:0] (O) (PEPAR[2:0] = 1)
R/W FR/W (O) PF7 (I/O) R/W (O)
A[22:16] A[22 :16] (O) PF[6:0] (I/O) A[22: 16] (O)
A[15:8] G A[15:8] (O) PG[7:0] (I/O) A[15:8] (O)
A[7 :0 ] H A[7 :0 ] ( O) PH[7:0] (I/O ) A[7 :0 ] ( O )
EB[3:2]
I
EB[3:2] (O) (PCDPA = 1)
or
PI[7:6] (I/O) (PCDPA = 0) PI[7:6 ] ( I/O) (PCDPA = 0)(2) EB[3:2] (O) (PCDPA = 1)
EB[1:0] EB[1:0] (O) PI[5:4] (I/O) EB[1:0] (O)
CS[3:0] CS[3:0] (O) (CSENx = 1)
or
PI[3:0] (I/O) (CSENx = 0) PI[3:0 ] (I/O)(5) CS[3:0] (O)(5)
1. Digital I/O pin function provided by port replacement unit.
2. Writing PCDPA = 1 has an undefined pi n operation for D[31:16] and EB[ 3:2] in single-chip mode.
3. This pin functions as the res et configuration overri de enable (RCON) during reset.
4. W ri ti ng PEPAx = 1 has an undefined pin operation for port E pins in si ngle-chip mod e.
5. CSENx has no effect on selecting CS[3: 0] pin funct ion in si ngle-chip or emulation modes.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ports Module
Interrupts
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Ports M odule 259
11.5.2 Port Digital I/O Timing
Input data on all pins configured as digital I/O is synchronized to the
rising edge of CLKOUT. See Figure 11-8.
Figure 11-8. Digital Input Timing
Data written to PORTx of any pin configured as a digital output is
immediately driven to its respective pin. See Figure 1 1-9 .
Figure 11-9. Digital Output Timing
11.6 Interrupts
The ports module does not generate interrupt requests.
CLKOUT
PIN DATA
INPUT
REGISTER
PIN
CLKOUT
OUTPUT DATA
OU T PUT PI N
REGISTER
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
260 Ports M odule MOTOROLA
Ports Module
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Edge Port Module (EPORT) 261
Technical Data MMC2107
Section 12. Edge Port Module (EPORT)
12.1 Contents
12.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .261
12.3 Low-Power Mode Operation. . . . . . . . . . . . . . . . . . . . . . . . . .262
12.3.1 Wait and Doze Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . .262
12.3.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263
12.4 Interrupt/General -Purpose I/O Pin Descriptions. . . . . . . . . . .263
12.5 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .263
12.5.1 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263
12.5.2 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .264
12.5.2.1 EPORT Pin Assignment Register . . . . . . . . . . . . . . . . .264
12.5.2.2 EPORT Data Direction Register. . . . . . . . . . . . . . . . . . .266
12.5.2.3 Edge Port Interrupt Enable Register . . . . . . . . . . . . . . .267
12.5.2.4 Edge Port Data Register . . . . . . . . . . . . . . . . . . . . . . . .268
12.5.2.5 Edge Port Pin Data Register . . . . . . . . . . . . . . . . . . . . .268
12.5.2.6 Edge Port Flag Register. . . . . . . . . . . . . . . . . . . . . . . . .269
12.2 Introduction
The edge port module (EPORT) has eight external interrupt pins. Each
pin can be configured individually as a low level-sensitive interrupt pin,
an edge-detecting interrupt pin (rising edge, falling edge, or both), or a
general-purpose input/output (I/O) pin. See Figure 12-1.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
262 Edge Port Module (EPOR T) MOTOR OLA
Edge Port Module (EPORT)
Figure 12-1. EPORT Block Diagram
12.3 Low-Power Mode Operation
This subsection describes the operation of the EPORT module in
low-power modes.
12.3.1 Wait and Doze Modes
In wait and doze modes, the EPORT module continues to operate
normally and may be configured to exit the low-pow er modes by
generating an interrupt request on either a selected edge or a low l evel
on an external pin.
IPBUS
SYNCHRONIZER
EPDR[n]
EPFR[n]
EPPAR [ 2n, 2n + 1]
EPIER[n]
EDGE DE TECT
D0
STOP
LOGIC
EPPDR[n]
D1 QD0
D1 Q
MODE
EPDDR[n]
TO INTERRUPT
CONTROLLER
INTx PIN
RISING EDGE
OF CLOCK
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Edge Port Module (EPORT)
Interrupt/General-Purpose I/O Pin Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Edge Port Module (EPORT) 263
12.3.2 Stop Mode
In stop mode, there are no clocks available to perform the edge-detect
functi on. Only the level -detect l ogic is active (if configured ) to allo w any
low level on the external interrupt pin to generate an interrupt (if enabled)
to exit stop mode.
NOTE: The input pin synchronizer is bypassed for the level-detect logic since no
clocks are available.
12.4 Inter rup t/ Gen er al -P u rpo se I/O Pi n Desc ri ptio ns
All pins default to general-purpose input pins at reset. The pin value is
synchronized to the rising edge of CLKOUT when read from the EPORT
pin data register (EPPDR). The values used in the edge/level detect
logic are also synchronized to the rising edge of CLKOUT. These pins
use Schmitt triggered input buffers which have built in hysteresis
designed to de crease the prob ability of gene rating false edge- triggered
interrupts for slow rising and falling input signals.
12.5 Memory Map and R egisters
This subsection describes the memory map and register structure.
12.5.1 Memory Map
Refer to Table 12-1 for a description of the EPORT memory map. The
EPORT has a base address of 0x00c6_0000.
Table 12-1. Edge Po rt Module Memory Map
Address Bits 1 5 8Bits 70Access(1)
0x00c6_0000 EPORT pin assignment register (EPPAR) S
0x00c6_0002 EPORT data direction register (EPDDR) EPORT interrupt enable register (EPIER ) S
0x00c6_0004 EPOR T data register (EPDR) EPO RT pin data register (EPPDR) S/U
0x00c6_0006 EPORT flag register (EPFR) Reserved(2) S/U
1. S = CPU supervisor mode access only. S/U = CPU supervisor or user mode access. User mode accesses to super visor
only addresses have no effect and result in a cycl e termination transfer error.
2. Writing to reserved addr ess locations has no effect, and reading returns 0s.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
264 Edge Port Module (EPOR T) MOTOR OLA
Edge Port Module (EPORT)
12.5.2 Registers
The EPORT programming model consists of these registers:
The EPORT pin assignment register (EPPAR) controls the
function of each pin individually.
The EPORT data direction register (EPDDR) controls the direction
of each one of the pins individually.
The EPORT interrupt enable register (EPIER) enables interrupt
requests for each pin individually.
The EPORT data register (EPDR) holds the data to be driven to
the pins.
The EPORT pin data register (EPPDR) reflects the current state
of the pins.
The EPORT flag register (EPFR) individually latches EPORT
edge events.
12.5.2.1 EPORT Pin Assignment Register
Address: 0x00 c6_0000 and 0x00c6_0001
Bit 15 14 13 12 11 10 9 Bit 8
Read: EPPA7 EPPA6 EPPA5 EPPA4
Write:
Reset:00000000
Bit 76 54321Bit 0
Read: EPPA3 EPPA2 EPPA1 EPPA0
Write:
Reset:00000000
Figure 12-2. EPORT Pin Assignment Register (EPPAR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Edge Port Module (EPORT)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Edge Port Module (EPORT) 265
EPPA[7:0] EPORT Pin Assign ment Sel ect Fields
The read/write EPPAx fields configure EPORT pins for level detection
and rising and/or falling edge detecti on as Table 12-2 shows.
Pins configured as level-sensitive are inverted so that a logic 0 on the
external pin represents a valid interrupt request. Level-sensitive
interrupt inputs are not latched. To guarantee that a level-sensitive
interrupt request is acknowledged , the interrupt source must keep the
signal asserted until acknowledged by software.
Pins configured as edge-triggered are latched and need not remain
asserted for i nter rupt generation. A p i n con figure d fo r e dge detecti o n
is monitored regardless of its configuration as input or output.
Interrupt requests generated in the EPORT module can be masked
by the interrupt controller module. EPPAR functionality is
independent of the selected pin direction.
Reset clears the EPPAx fields.
Table 12-2. EPPAx Field Settings
EPPAx Pin Con f ig ur a t ion
00 Pin INTx level-sensitive
01 Pin INTx rising edge triggered
10 Pin INTx falling edge triggered
11 Pin INTx both falling edge and rising edge triggered
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
266 Edge Port Module (EPOR T) MOTOR OLA
Edge Port Module (EPORT)
12.5.2.2 EPORT Data Direction Register
EPDD[7:0] Edge Port Data Direction Bits
Setting any bit in the E PDDR configur es th e cor responding pin as a n
output. Clearing any bit in EPDDR configures the corresponding p in
as an input. Pin direction is independent of the level/edge detection
configuration. Reset clears EPDD[7:0].
To use an EPORT pin as an external interrupt request source, its
corresponding bit in EPDDR must be clear. Software can generate
interrupt requests by programming the EPORT data register when the
EPDDR selects output.
1 = Corresponding EPORT pin configured as output
0 = Corresponding EPORT pin configured as input
Address: 0x00c6_0002
Bit 76 54321Bit 0
Read: EPDD7 EPDD6 EPDD5 EPDD4 EPDD3 EPDD2 EPDD1 EPDD0
Write:
Reset:00000000
Figure 12-3. EPORT Data Direction Register (EPDDR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Edge Port Module (EPORT)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Edge Port Module (EPORT) 267
12.5.2.3 Edge Port Interrupt Enable Register
EPIE[7:0] Edge Port Interrupt Enable Bits
The read/write EPIE[7:0] bits enable EPORT interrupt requests. If a
bit in EPIER is set, EPORT generates an interrupt request when:
The correspond ing bit in the E PORT flag register (EPFR) is set
or later becomes set, or
The corr espond i ng pin le vel is l ow an d th e p i n is configured for
leve l-sensitive oper ati on
Clearing a bit in EPIER negates any interrupt request from the
corresponding EPORT pin. Reset clears EPIE[7:0].
1 = Interrupt requests from corresponding EPORT pin enabled
0 = Interrupt requests from corresponding EPORT pin disabled
Address: 0x00c6_0003
Bit 76 54321Bit 0
Read: EPIE7 EPIE6 EPIE5 EPIE4 EPIE3 EPIE2 EPIE1 EPIE0
Write:
Reset:00000000
Figure 12-4. EPORT Port Interrupt Enable Register (EPIER)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
268 Edge Port Module (EPOR T) MOTOR OLA
Edge Port Module (EPORT)
12.5.2.4 Edge Port Data Register
EPD[7:0] Edge Port Data Bits
Data written to E PDR is sto red in an internal reg ister; if any pin of the
port is configured as an output, the bit stored for that pin is driven onto
the pi n. Reading E DPR re turn s the data stor ed in the reg is ter. Reset
sets E PD[7:0].
12.5.2.5 Edge Port Pin Data Register
EPPD[7:0] Edge Port Pin Data Bits
The read-only EPPDR reflects the current state of the EPORT pins.
Writing to EPPDR has no effect, and the write cycle terminates
normally. Reset does not affect EPPDR.
Address: 0x00c6_0004
Bit 76 54321Bit 0
Read: EPD7 EPD6 EPD5 EPD4 EPD3 EPD2 EPD1 EPD0
Write:
Reset:11111111
Figure 12-5. EPORT Port Data Register (EPDR)
Address: 0x00c6_0005
Bit 7654321Bit 0
Read: EPPD7 EPPD6 EPPD5 EPPD4 EPPD3 EPPD2 EPPD1 EPPD0
Write:
Reset: P PPPPPPP
= Writes have no effect and the access terminates without a transf er error exception.
P = Current pin state
Figure 12-6. EPORT Port Pin Data Register (EPPDR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Edge Port Module (EPORT)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Edge Port Module (EPORT) 269
12.5.2.6 Edge Port Flag Register
EPF[7:0] Edge Port Flag Bits
When an EPORT pin is configured for edge triggering, its
corresponding read/write bit in EPFR indicates that the selected edg e
has been detected. Reset clears EPF[7:0].
1 = Selected edge for INTx pin has been detected.
0 = Selected edge for INTx pin has not been detected.
Bits in thi s register are s et when the selected edg e is detecte d on the
corresponding pin. A bit remains set until cleared by writing a 1 to it.
Writing 0 has no effect. If a pin is configured as level- sensitive
(EPPARx = 00), pin transitions do not affect this register.
Address: 0x00c6_0006
Bit 76 54321Bit 0
Read: EPF7 EPF6 EPF5 EPF4 EPF3 EPF2 EPF1 EPF0
Write:
Reset:00000000
Figure 12-7. EPORT Port Flag Register (EPFR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
270 Edge Port Module (EPOR T) MOTOR OLA
Edge Port Module (EPORT)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Watchdog Timer Module 2 71
Technical Data MMC2107
Section 13. Watchdog Timer Module
13.1 Contents
13.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271
13.3 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272
13.3.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272
13.3.2 Doze Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272
13.3.3 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272
13.3.4 Debug Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272
13.4 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273
13.5 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273
13.6 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .274
13.6.1 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .274
13.6.2 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .274
13.6.2.1 Watchdog Control Register . . . . . . . . . . . . . . . . . . . . . .275
13.6.2.2 Watchdog Modulus Register . . . . . . . . . . . . . . . . . . . . .277
13.6.2.3 Watchdog Count Register . . . . . . . . . . . . . . . . . . . . . . .278
13.6.2.4 Watchdog Servi ce Register . . . . . . . . . . . . . . . . . . . . . .279
13.2 Introduction
The w a tchdog time r i s a 16 -bit timer used to help so ftw are re cover from
runaway code. The watchdog timer has a free-running down-counter
(watchdog counter) that generates a reset on underflow. To prevent a
reset, software must periodically restart the countdown.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
272 Watchdog T ime r Module MOTOR OLA
Wa tchdog Timer Module
13.3 Modes of Operation
This subsection describes the operation of the watchdog timer in
low-power modes and debug mode of operation.
13.3.1 Wait Mode
In wait mode with the WAIT bit set in the watchdog control register
(WCR) , watch dog ti mer op eratio n sto ps. I n w ait mod e wi th the WAI T b it
clear, the watchdog timer continues to operate normally.
13.3.2 Doze Mode
In doze mode with the DOZE bit set in WCR, watchdog timer module
operation stops. In doze mode with the DOZE bit cl ear, the watchdog
timer continues to operate normally.
13.3.3 Stop Mode
The wat chdog oper ation stops i n stop m ode. Wh en stop mod e is exited,
the watchdog operation continues operation from the state it was in prior
to entering stop mode.
13.3.4 D ebug Mode
In debug mode with the DBG bit set in WCR, watchdog timer module
operation stops. In debug mode with the DBG bit clear, the watchdog
timer continues to operate normally. When debug mode is exited,
watchdog timer operation continues from the state it was in before
entering debug mode, but any updates made in debug mode remain.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Watchdog Timer Module
Block Diagram
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Watchdog Timer Module 273
13.4 Blo ck Diag r am
Figure 13-1. Watchdog Timer Block Diagram
13.5 Signals
The watchdog timer module has no off-chip signals.
16-BIT WMR
16-BIT WATCHDOG COUNTER
COUNT = 0
SYSTEM DIVIDE BY RESET
CLOCK
IPBUS
4096
16-BIT WCN T R 16-BIT WS R
IPBUS
LOAD COUNTER
EN
WAIT
DOZE
DBG
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
274 Watchdog T ime r Module MOTOR OLA
Wa tchdog Timer Module
13.6 Memory Map and R egisters
This subsection describes the memory map and registers for the
watchdog timer. The watchdog timer has a base address of
0x00c7_0000.
13.6.1 Memory Map
Refer to Table 13-1 for an overview of the watchdog memory map.
13.6.2 Registers
The watchdog timer programming model consists of these registers:
The watchdog control register (WCR) configures watchdog timer
operation.
The watchdog modulus register (WMR) determines the timer
modulus reload value.
The watchdog count register (WCNTR) provides visibility to the
watchdog counter value.
The watchdog service register (WSR) requires a service
sequence to prevent reset.
Table 13-1. Watchdog Timer Module Memory Map
Address Bits 158Bits 70 Access(1)
1. S = CPU supe rviso r mode a ccess onl y. S/U = CPU sup ervis or or use r mode access . Us er
mode accesses to supervisor only addresses have no ef fect and resul t in a cycl e
termination transfer error.
0x00c7_0 000 Wat chdog control register (WCR) S
0x00c7_0 002 Watchdog modulus registe r (WM R) S
0x00c7_0 004 Watchdog count register (WCNTR) S/U
0x00c7_0 006 Watchdog s ervice register (WSR) S /U
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Watchdog Timer Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Watchdog Timer Module 275
13.6.2.1 Watchdog Control Register
The 16-bit read/write watchdog control register (WCR) configures
watchdog timer operation.
WAIT Wait Mode Bit
The read-always, write-once WA IT bit controls the function of the
watchdog timer in wait mode. Once written, the WAIT bit is not
affected by further writes except in debug mode. Reset sets WAIT.
1 = Watchdog timer stopped in wait mode
0 = Watchdog timer not affected in wait mode
DOZE — Doze Mode Bit
The read-always, write-once DOZE bit controls the function of the
watchdog timer in doze mode. Once written, the DOZE bit is not
affected by further writes except in debug mode. Reset sets DOZE.
1 = Watchdog timer stopped in doze mode
0 = Watchdog timer not affected in doze mode
Address: 0x00 c7_0000 and 0x00c7_0001
Bit 15 14 13 12 11 10 9 Bit 8
Read: 00000000
Write:
Reset:00000000
Bit 7654321Bit 0
Read: 0000
WAIT DOZE DBG EN
Write:
Reset:00001111
= Writes have no effect and the access terminates without a transf er error exception.
Figure 13-2. Watchdog Control Register (WCR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
276 Watchdog T ime r Module MOTOR OLA
Wa tchdog Timer Module
DBG Debug Mode Bit
The read-always, write-once DBG bit controls the function of the
watchdog timer in debug mode. Once written, the DBG bit is not
affected by further writes except in debug mode.
During debug mode, watchdog timer registers can be written and read
normally. When debug mode is exited, timer operation continues from
the state it was in before entering debug mode, but any updates made
in debug mode remain. If a write-once register is written for the first
tim e in de bug m ode, t he re gi ster is st i ll wr itable w he n deb ug mo de is
exited.
1 = Watchdog timer stopped in debug mode
0 = Watchdog timer not affected in debug mode
NOTE: Changing the DBG bit from 1 to 0 during debug mode starts the
watchdog timer. Changing the DBG bit from 0 to 1 during debug mode
stops the watchdog timer.
EN Watchdog Enable Bit
The read-always, wr ite-once EN bit enables the watchdog timer.
Once written, the EN bit i s not affected by further writes except in
debug mode. When the watchdog timer is disabled, the watchdog
counter and prescaler counter are held in a stopped state.
1 = Wat chdog timer enabled
0 = Wat chdog timer disabled
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Watchdog Timer Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Watchdog Timer Module 277
13.6.2.2 Watchdog Modulus Register
WM[15:0] Watchdog Modulus Field
The read-always, write-once WM[15:0] field contains the modulus
that is reloaded into the watchdog counter by a service sequence.
Once written, the WM[15:0] field is not affected by further writes
except in debug mode. Writing to WMR immediately loads the new
modulus value into the watchd og counter. Th e new value is also used
at the next and all subsequent reloads. Reading WMR returns the
value in the modulus register.
Reset initializes the WM[15:0] field to 0xFFFF.
NOTE: The prescaler counter is reset anytime a new value is loaded into the
watchdog counter and also during reset.
Address: 0x00 c7_0002 and 0x00c7_0003
Bit 15 14 13 12 11 10 9 Bit 8
Read: WM15 WM14 WM13 WM12 WM11 WM10 WM9 WM8
Write:
Reset:11111111
Bit 76 54321Bit 0
Read: WM7 WM6 WM5 WM4 WM3 WM2 WM1 WM0
Write:
Reset:11111111
Figure 13-3. Watchdog Modulus Register (WMR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
278 Watchdog T ime r Module MOTOR OLA
Wa tchdog Timer Module
13.6.2.3 Watchdog Count Register
WC[15:0] Watchdog Count Field
The read-only WC[15:0] field reflects the current value in the
watch dog counte r. Reading t he 16-bi t WCNTR with two 8-bit rea ds is
not guar anteed to retu rn a coheren t value. Writi ng to WCNTR has no
effect, and write cycles are terminated normally.
Address: 0x00 c7_0004 and 0x00c7_0005
Bit 15 14 13 12 11 10 9 Bit 8
Read: WC15 WC14 WC13 WC12 WC11 WC10 WC9 WC8
Write:
Reset:11111111
Bit 7654321Bit 0
Read: WC7 WC6 WC5 WC4 WC3 WC2 WC1 WC0
Write:
Reset:11111111
= Writes have no effect and the access terminates without a transf er error exception.
Figure 13-4. Watch dog Count Reg ister (WCNTR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Watchdog Timer Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Watchdog Timer Module 279
13.6.2.4 Watchdog Service Register
When the watchdog timer is enabled, writing 0x5555 and then 0xAAAA
to the watchdog service register (WSR) before the watchdog counter
times o ut prevents a rese t. If WSR is not serviced before the timeout, the
watch dog timer sends a signa l to the reset control ler module which sets
the WDR bit and asserts a system reset.
Both writes must occur in the order listed before the timeout, but any
number of instructions can be executed between the two writes.
However, writing any value other than 0x5555 or 0xAAAA to WSR resets
the servicing sequence, requiring both values to be written to keep the
watchdog timer from causing a reset.
Address: 0x00 c7_0006 and 0x00c7_0007
Bit 15 14 13 12 11 10 9 Bit 8
Read: WS15 WS14 WS13 WS12 WS11 WS10 WS9 WS8
Write:
Reset:00000000
Bit 76 54321Bit 0
Read: WS7 WS6 WS5 WS4 WS3 WS2 WS1 WS0
Write:
Reset:00000000
Figure 13-5. Watchdog Service Register (WSR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
280 Watchdog T ime r Module MOTOR OLA
Wa tchdog Timer Module
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Programmable Interrupt Timer Modules (PIT1 and PIT2) 281
Technical Data MMC2107
Section 14. Programmable Interrupt Timer Modules
(PIT1 and PIT2)
14.1 Contents
14.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282
14.3 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282
14.4 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
14.4.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
14.4.2 Doze Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
14.4.3 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
14.4.4 Debug Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
14.5 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
14.6 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .284
14.6.1 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284
14.6.2 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284
14.6.2.1 PIT Control and Status Register . . . . . . . . . . . . . . . . . .285
14.6.2.2 PIT Modulus Register . . . . . . . . . . . . . . . . . . . . . . . . . .288
14.6.2.3 PIT Count Register . . . . . . . . . . . . . . . . . . . . . . . . . . . .289
14.7 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .290
14.7.1 Set-and-Forget Timer Operation . . . . . . . . . . . . . . . . . . . .290
14.7.2 Free-Running Timer Operation . . . . . . . . . . . . . . . . . . . . .291
14.7.3 Timeout Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . .291
14.8 Interrupt Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .292
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
282 Programmable Interrupt Timer Modules (PIT1 and PIT2) MOTOROLA
Pr ogrammable Interrupt Timer Modules (PIT1 and PIT2)
14.2 Introduction
The programmable interrupt timer (PIT) is a 16-bit timer that provides
precise interrupts at regular intervals with minimal processor
intervention. The timer can either count down from the value written in
the modulus latch, or it can be a free-running down-counter.
This device has two programmable interrupt timers. PIT1 has a base
address located at 0x00c8_0000. PIT2 base address is 0x00c9_0000.
14.3 Blo ck Diag r am
Figure 14-1. PIT Block Diagram
16-BIT PMR
16-BIT PIT COUNTER
CO UNT = 0
SYSTEM
CLOCK
IPBUS
16-BIT PCNTR
IPBUS
EN OVW
PDOZE
PDBG
PRESCALER
PRE[3:0] RLD
PIF
PIE
LOAD
COUNTER
TO INTERRUPT
CONTROLLER
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Program m able Interrupt Timer Modules (PIT1 and PIT2)
Modes of Op eration
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Programmable Interrupt Timer Modules (PIT1 and PIT2) 283
14.4 Modes of Operation
This subsection describes the three low-power modes and the debug
mode.
14.4.1 Wait Mod e
In wait mod e, the PIT modu le conti nues to operate nor mally and can be
configured to exit the low-power mode by generating an interrupt
request.
14.4.2 Doze Mode
In doze mode with the PDOZE bit set in the PIT control and status
register (PCSR), PIT module operation stops. In doze mode with the
PDOZE bit clear, doze mode doe s not affect PIT operat io n. When d oze
mode is exited, PIT operation continues from the state it was in before
entering doze mode.
14.4.3 Stop Mode
In stop mode, the system clock is absent, and PIT module operation
stops.
14.4.4 D ebug Mode
In debug mode with the PDBG bit set in PCSR, PIT module operation
stops. In debug mode with the PDBG bit clear, debug mode does not
affect PIT operation. When debug mode is exited, PIT operation
continues from the state it was in before entering debug mode, but any
updates made in debug mode remain.
14.5 Signals
The PIT module has no off-chip signals.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
284 Programmable Interrupt Timer Modules (PIT1 and PIT2) MOTOROLA
Pr ogrammable Interrupt Timer Modules (PIT1 and PIT2)
14.6 Memory Map and R egisters
This subsection describes the memory map and register structure for
PIT1 and PIT2.
14.6.1 Memory Map
Refer to Table 14-1 for a description of the memory map.
This device has two programmable interrupt timers. PIT1 has a base
address located at 0x00c8_0000. PIT2 base address is 0x00c9_0000.
14.6.2 Registers
The PIT programming model consists of these registers:
The PI T control and status reg ister (PCSR) configur es t he timer’s
operation.
The PIT modul us register (PMR) determines the timer modulus
reload value.
The PIT count register (PCNTR) provides visibility to the counter
value.
Table 14-1. Programmable Interrupt Timer Modules Memory Map
PIT1
Address PIT2
Address Bits 158Bits 7–0 Access(1)
0x00c8_0000 0x00c9_0000 PIT control and status register (PCSR) S
0x00c8_0002 0x00c9_0002 PIT modulus register (PMR) S
0x00c8_0004 0x00c9_0004 PIT count register (PCNTR) S/U
0x00c8_0006 0x00c9_0006 Unimplemented(2)
1. S = CPU supervisor mode access only. S/U = CPU supervisor or user mode access. User mode accesses to superv isor
only addresses have no effect and result in a cycl e termination transfer error.
2. Accesses to unimpl em ented address locations have no effect and res ult in a cycle termination transfer error.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Program m able Interrupt Timer Modules (PIT1 and PIT2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Programmable Interrupt Timer Modules (PIT1 and PIT2) 285
14.6.2.1 PIT Control and Status Register
PRE[3:0] Prescaler Bits
The read/write PRE[3:0] bits select the system clock divisor to
generate the PIT clock as Table 14-2 shows.
To accurately predict the timing of the next count, change the
PRE[3:0] bits only when the enable bit (EN) is clear. Changing the
PRE[ 3:0] re sets the pr escaler counter . System reset and the loading
of a new value into the counter also reset the prescaler counter.
Setting the EN bit and writing to PRE[3:0] can be done in this same
write cycle. Clearing the EN bit stops the prescaler counter.
PDOZE Doze Mode Bit
The read/write PDOZE bit controls the function of the PIT in doze
mode. Reset clears PDOZE.
1 = PIT function stopped in doze mode
0 = PIT function not affected in doze mode
When doze mode is exited, timer operation continues from the state
it was in before entering doze mode.
Address: PIT1 0x00c8_0000 and 0x00c8_0001
PIT2 0x00c9_0000 and 0x00c9_0001
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0000
PRE3 PRE2 PRE1 PRE0
Write:
Reset:00000000
Bit 7654321Bit 0
Read: 0 PDOZE PDBG OVW PIE PIF RLD EN
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 14-2. PIT Control and Status Register (PCSR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
286 Programmable Interrupt Timer Modules (PIT1 and PIT2) MOTOROLA
Pr ogrammable Interrupt Timer Modules (PIT1 and PIT2)
PDBG Debug Mode Bit
The read/write PDBG bit controls the function of the PIT in debug
mode. Reset clears PDBG.
1 = PIT function stopped in debug mode
0 = PIT function not affected in debug mode
During debug mode, register read and write accesses function
normally. When debug mode is exited, timer operation continues from
the state it was in before entering debug mode, but any updates made
in debug mode remain.
NOTE: Changing the PDBG bit from 1 to 0 during debug mode starts the PIT
timer. Likewise, changing the PDBG bit from 0 to 1 during debug mode
stops the PIT timer.
Table 14-2. Prescaler Select Encoding
PRE[3:0] System Clock Divisor
0000 1
0001 2
0010 4
0011 8
0100 16
0101 32
0110 64
0111 128
1000 256
1001 512
1010 1,024
1011 2,048
1100 4,096
1101 8,192
1110 16,384
1111 32,768
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Program m able Interrupt Timer Modules (PIT1 and PIT2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Programmable Interrupt Timer Modules (PIT1 and PIT2) 287
OVW Overwrite Bit
The read/write OVW bit enables writing to PMR to immediately
overwrite the value in the PIT counter.
1 = Writing PMR immediately replaces value in PIT counter.
0 = Value in PMR replaces value in PIT counter when count
reaches 0x0000.
PIE PIT Interrupt Enable Bit
The read/write PIE bit enables the PIF flag to generate interrupt
requests.
1 = PIF interrupt requests enabled
0 = PIF interrupt requests disabled
PIF PIT Interrupt Flag
The rea d/wri te PIF fl ag is set when the PIT counter reache s 0x0000.
Clear PIF by writing a 1 to it or by writing to PMR. Writing 0 has no
effect. Reset clears PIF.
1 = PIT count has reached 0x0000.
0 = PIT count has not reached 0x0000.
RLD Rel oad Bit
The read/write RLD bit enables loading the value of PMR into the PIT
counter when the count reaches 0x0000.
1 = Counter reloaded from PMR on count of 0x0000
0 = Counter rolls over to 0xFFFF on count of 0x0000
EN PIT Enable Bi t
The read/write EN bit enables PIT operation. When the PIT is
disabled, the counter and prescaler are held in a stopped state.
1 = PIT enabled
0 = PIT disabled
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
288 Programmable Interrupt Timer Modules (PIT1 and PIT2) MOTOROLA
Pr ogrammable Interrupt Timer Modules (PIT1 and PIT2)
14.6.2.2 PIT Modulus Register
The 16-bit read/write PIT modulus register (PMR) contains the timer
modul us value for loading i nto the PIT counter when the count reach es
0x0000 and the RLD bit is set.
When the OVW bit is set, PMR is transparent, and the value written to
PMR is imme diatel y load ed into the PIT counte r. Th e presca ler counter
is reset anytime a new value is loaded into the PIT counter and also
duri ng r eset. Re ading th e P MR ret urns th e val ue wr itten i n t he mo dulus
latch. Reset initializes PMR to 0xFFFF.
Address: PIT1 0x00c8_0002 and 0x00c8_0003
PIT2 0x00c9_0002 and 0x00c9_0003
Bit 15 14 13 12 11 10 9 Bit 8
Read: PM15 PM14 PM13 PM12 PM11 PM10 PM9 PM8
Write:
Reset:11111111
Bit 76 54321Bit 0
Read: PM7PM6PM5PM4PM3PM2PM1PM0
Write:
Reset:11111111
Figure 14-3. PIT Modulus Register (PMR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Program m able Interrupt Timer Modules (PIT1 and PIT2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Programmable Interrupt Timer Modules (PIT1 and PIT2) 289
14.6.2.3 PIT Count Register
The 16 -bit, read- only PIT con trol regi ster (PCN TR) contains th e counter
valu e. Reading the 16-bi t counter with two 8- bit read s is not guaran teed
to be coherent. Writing to PCNTR has no effect, and write cycles are
terminated normally.
Address: PIT1 0x00c8_0004 and 0x00c8_0005
PIT2 0x00c9_0004 and 0x00c9_0005
Bit 15 14 13 12 11 10 9 Bit 8
Read: PC15 PC14 PC13 PC12 PC11 PC10 PC9 PC8
Write:
Reset:11111111
Bit 7654321Bit 0
Read: PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0
Write:
Reset:11111111
= Writes have no effect and the access terminates without a transf er error exception.
Figure 14-4. PIT Count Register (PCNTR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
290 Programmable Interrupt Timer Modules (PIT1 and PIT2) MOTOROLA
Pr ogrammable Interrupt Timer Modules (PIT1 and PIT2)
14 .7 Fun cti on al Descr ipti o n
This subsection describes the PIT functional operation.
14.7.1 Set-and-For get Timer Operation
This mode of operation is selected when the RLD bit in the PCSR
register is set.
When the PIT counter reaches a count of 0x0000, the PIF flag is set in
PCSR. The value in the modulus latch is loaded into the counter, and the
counter begins decrementing toward 0x0000. If the PIE bit is set in
PCSR, the PIF flag issues an interrupt request to the CPU.
When the OVW bit is set in PCSR, the counter can be directl y initialized
by writing to PMR without having to wait for the count to reach 0x0000.
Figure 14-5. Counter Reloading from the Modulus Latch
0x0002 0x0001 0x0000 0x0005
0x0005
PIT CLOC K
COUNTER
MODULUS
PIF
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Program m able Interrupt Timer Modules (PIT1 and PIT2)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Programmable Interrupt Timer Modules (PIT1 and PIT2) 291
14.7.2 Free-Run ning Timer Operation
This mode of operation is selected when the RLD bit in PCSR is clear.
In this mode, the counter rolls over from 0x0000 to 0xFFFF without
reloading from the modulus latch and continues to decrement.
When the counter reaches a count of 0x0000, the PIF flag is set in
PCSR. If the PIE bit is set in PCSR, the PIF flag issues an interrupt
request to the CPU.
When the OVW bit is set in PCSR, the counter can be directl y initialized
by writing to PMR without having to wait for the count to reach 0x0000.
Figure 14-6. Counter in Free-Running Mode
14.7.3 Timeout Specifications
The 1 6-bit PI T counter and pre scaler suppo rts differe nt timeout perio ds.
The pre scaler divide s the system clock as sel ected by the PRE[3:0] bits
in PCSR. The PM[15:0] bits in PMR select the timeout period.
timeout period = PRE[3:0] × (PM[15:0] + 1) clocks
0x0002 0x0001 0x0000 0xFFFF
0x0005
PIT CLOC K
COUNTER
MODULUS
PIF
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
292 Programmable Interrupt Timer Modules (PIT1 and PIT2) MOTOROLA
Pr ogrammable Interrupt Timer Modules (PIT1 and PIT2)
14.8 Inter rup t Op eration
Table 14-3 lists the interrupt requests generated by the PIT.
The PIF flag is set when the PIT counter reaches 0x0000. The PIE bit
enabl es the PIF flag to ge nera te i n terr upt requ ests. Cle ar PIF b y w riting
a 1 to it or by writing to the PMR.
Table 14-3. PIT Interrup t Requests
Interrupt Requ est Flag E na bl e Bit
Timeout PIF PIE
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Timer Modules (TIM1 and TIM2) 293
Technical Data MMC2107
Section 15. Timer Modules (TIM1 and TIM2)
15.1 Contents
15.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .295
15.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .295
15.4 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296
15.5 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297
15.5.1 Supervisor and User Modes. . . . . . . . . . . . . . . . . . . . . . . .297
15.5.2 Run Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297
15.5.3 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297
15.5.4 Wait, Doze, and Debug Modes . . . . . . . . . . . . . . . . . . . . .297
15.5.5 Test Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297
15.6 Signal Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298
15.6.1 ICOC[2:0] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298
15.6.2 ICOC3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298
15.7 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .298
15.7.1 Timer Input Capture/Output Compare
Select Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300
15.7.2 Timer Compare Force Register . . . . . . . . . . . . . . . . . . . . .301
15.7.3 Timer Output Compare 3 Mask Register . . . . . . . . . . . . . .302
15.7.4 Timer Output Compare 3 Data Register. . . . . . . . . . . . . . .303
15.7.5 Timer Counter Registers . . . . . . . . . . . . . . . . . . . . . . . . . .304
15.7.6 Timer System Control Register 1. . . . . . . . . . . . . . . . . . . .305
15.7.7 Timer Toggle-On-Overflow Register . . . . . . . . . . . . . . . . .306
15.7.8 Timer Control Register 1 . . . . . . . . . . . . . . . . . . . . . . . . . .307
15.7.9 Timer Control Register 2 . . . . . . . . . . . . . . . . . . . . . . . . . .308
15.7.10 Timer Interrupt Enable Register. . . . . . . . . . . . . . . . . . . . .309
15.7.11 Timer System Control Regi ster 2. . . . . . . . . . . . . . . . . . . .310
15.7.12 Timer Flag Register 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . .312
15.7.13 Timer Flag Register 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . .313
15.7.14 Timer Channel Registers . . . . . . . . . . . . . . . . . . . . . . . . . .314
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
294 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
15.7.15 Pulse Accumulator Control Register . . . . . . . . . . . . . . . . .315
15.7.16 Pulse Accumulator Flag Register. . . . . . . . . . . . . . . . . . . .317
15.7.17 Pulse Accumulator Counter Registers . . . . . . . . . . . . . . . .318
15.7.18 Timer Port Data Register . . . . . . . . . . . . . . . . . . . . . . . . . .319
15.7.19 Timer P ort Data Direction Register . . . . . . . . . . . . . . . . . .320
15.7.20 Timer Test Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321
15.8 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321
15.8.1 Prescaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321
15.8.2 Input Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321
15.8.3 Output Compare. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .322
15.8.4 Pulse Accumulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323
15.8.4.1 Event Counter Mode . . . . . . . . . . . . . . . . . . . . . . . . . . .323
15.8.4.2 Gated Time Accumulation Mode . . . . . . . . . . . . . . . . . .324
15.8.5 General-Purpose I/O Ports. . . . . . . . . . . . . . . . . . . . . . . . .325
15.9 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326
15.10 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326
15.10.1 Timer Channel Interrupts (CxF) . . . . . . . . . . . . . . . . . . . . .326
15.10.2 Pulse Accumulator Overfl ow (PAOVF). . . . . . . . . . . . . . . .327
15.10.3 Pulse Accumulator Input (PAIF). . . . . . . . . . . . . . . . . . . . .327
15.10.4 Timer Overflow (TOF) . . . . . . . . . . . . . . . . . . . . . . . . . . . .327
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Introduction
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 295
15.2 Introduction
The MMC2107 has two 4-channel timer modules (TIM1 and TIM2). Each
consists of a 16-bit programmable counter driven by a 7-stage
programmable prescaler. Each of the four timer channels can be
confi gured for inp ut capture or output. Addi tionally, one of the channels,
channel 3, can be configured as a pulse accumulator.
A timer overflow function allows softwar e to exten d the timin g capability
of the syst em b eyond the 1 6-bit rang e of t he cou nter. The input captur e
and output compare functions allow simultaneous input waveform
measurements and output waveform generation. The input capture
function can capture the time of a selected transition edge. The output
compare function can generate output waveforms and timer software
delays. The 16-bit pulse accumulator can operate as a simple event
counter or a gated time accumulator. The pulse accumulator shares
timer channel 3 when in event mode.
15.3 Features
Features of the timer include:
Four 16-bit input capture/output compare channels
16-bit architecture
Programmable prescaler
Pulse widths variable from microseconds to seconds
Single 16-bit pulse accumulator
Toggle-on-overflow feature for pulse-width modulator (PWM)
generation
Option for enabling timer port pullups on reset
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
296 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
15.4 Blo ck Diag r am
Figure 15-1. Timer Block Diagram
PRESCALER
CHANNEL 0
PT0
16- BIT COUNT E R
SYSTEM
LOGIC
PR[2:0]
DIVIDE-BY-64 MODULE CLOCK
TIMC0H:TIMC0L
EDGE
DETECT
TIMPACNTH:TIMPACNTL
PAOVF PEDGE
PAOVI
PAMOD
PAE
16-BIT COMPARATOR
TIMCNTH:TIMCNTL
16-BIT LATCH
CHANNEL 1
TIMC1H:TIMC1L
16-BIT COMPARATOR
16-BIT LATCH
16- BIT COUNT E R
INTERRUPT
LOGIC
TOF
TOI
C0F
C1F
EDGE
DETECT
PT1
LOGIC
EDGE
DETECT
CxF
CHANNEL 2
CHANNEL3
TIMC3H:TIMC3L
16-BIT COMPARATOR
16-BIT LATCH
C3F PT3
LOGIC
EDGE
DETECT
IOS0
IOS1
IOS3
OM:OL0
TOV0
OM:OL1
TOV1
OM:OL3
TOV3
EDG1A
EDG1B
EDG3A
EDG3B
EDG0A
EDG0B
TCRE
CHANNEL 3 OUTPUT COMPARE
PAIF
CLEA R CO UNTER
PAIF
PAI
INTERRUPT
LOGIC
CxI
INTERRUPT
REQUEST
INTERRUPT
REQUEST
PAOVF
CH. 3 COMPARE
CH.3 CAP TURE
CH. 1 CAPTURE
MUX
CLK[1:0]
PACLK
PACLK/256
PACLK/65536
PACLK
PACLK/256
PACLK/65536
TE
CLOCK
CH. 1 COMP A RE
CH. 0 COMPARE
CH. 0 CAPTURE
PA INPUT
MUX
ICOC0
PIN
ICOC1
PIN
ICOC3
PIN
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Modes of Op eration
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 297
15.5 Modes of Operation
This subsection describes the supervisor and user modes, the five
low-power options, and test mode.
15.5.1 Supervisor and User Modes
The SO bit in the chip-select control regi ster determines whether the
processor is operating in user mode or supervisor mode. Accessing
supervisor address locations while not in supervisor mode causes the
timer to assert a transfer error.
15.5.2 Run Mode
Clearing the TIMEN bit in the timer system control register 1 (TIMSCR1)
or the PAE bit in the pulse accumulator control register (TIMPACTL)
reduces power consumption in run mode. Timer registers are still
accessible, but all timer functions are disabled.
15.5.3 Stop Mode
If the central processor unit (CPU) enters stop mode, timer operation
stops. Upon exiting stop mode, the timer resumes operation unless stop
mode was exited by reset.
15.5.4 Wait, Doze, and Debug Modes
The timer is unaffected by these low-power modes.
15.5.5 Test Mode
A high signal on the TEST pin puts the processor in test mode or special
mode. The timer behaves as in user mode, except that timer test
registers are accessible.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
298 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
15.6 Signal Description
Table 15-1 provides an overview of the signal properties.
15.6.1 ICOC[2:0]
The ICOC[2:0] pins are for channel 20 input capture and output
compare functions. These pins are available for general-purpose
input/output (I/O) when not configured for timer functions.
15.6.2 ICOC3
The ICOC3 pin is for channel 3 input capture and output compare
functions or for the pulse accumulator input. This pin is available for
general-purpose I/O when not configured for timer functions.
15.7 Memory Map and R egisters
See Table 15-2 for a memory map of the two timer modules. Timer 1 has
a base address of 0x00ce_0000. Timer 2 has a base address of
0x00cf_0000.
NOTE: Reading reserved or unimplemented locations returns 0s. Writing to
reserved or unimplemented locations has no effect.
Table 15-1. Signal Properties
Name(1)
1. Pin signa l names may change according to user requiremen ts.
Port Function Reset State P ullup
ICOC0 TIMPORT0 Channel 0 IC/OC pin Pin state Active
ICOC1 TIMPORT1 Timer c hannel 1 IC/OC pin Pin state Active
ICOC2 TIMPORT2 Timer c hannel 2 IC/OC pin Pin state Active
ICOC3 TIMPORT3 Timer c hannel 3 IC/OC or PA pin P in state A ctive
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 299
Table 15-2. Timer Modules Memory Map
Address Bits 7–0 Access(1)
TIM1 TIM2
0x0 0 ce _0000 0 x00cf_0000 Timer IC/OC select register (TIMIOS) S
0x0 0 ce _0001 0x00cf_0001 Timer c ompare force register (TIM CFO RC) S
0x0 0 ce _0002 0 x00cf_0002 Timer output compa re 3 mask register (TIMOC3M) S
0x0 0 ce _0003 0 x00cf_0003 Ti m er out put compare 3 data register (T IMOC3D) S
0x0 0 ce _0004 0x00cf_0004 Tim er counte r register high (TIMCNTH) S
0x0 0 ce _0005 0 x00cf_0005 Timer counter register low (TIM CNTL) S
0x0 0 ce _0006 0 x00cf_0006 Ti mer system control register 1 (TIM SCR 1) S
0x00ce_0007 0x00cf_0007 Reserved(2)
0x0 0 ce _0008 0 x00cf_0008 Ti m er toggle-on-overf low register (T MT OV) S
0x00ce_0009 0x00cf_0009 Timer control register 1 (TIMCTL1) S
0x00ce_000a 0x00cf_000a Reserved(2)
0x00ce_000b 0x00cf_000b Timer control register 2 (TIMCTL2) S
0x00ce_000c 0x00cf_0 00c Tim er interrupt enable register (TIMIE) S
0x0 0 ce _000d 0 x00cf_000d Ti mer system control register 2 (TIM SCR 2) S
0x0 0 ce _000e 0 x00cf_000e Timer flag register 1 (TIMFLG1) S
0x00ce_0 00f 0x0 0cf_000 f T imer flag register 2 (TIMFLG2) S
0x0 0 ce _0010 0 x00cf_0010 T imer channel 0 register high (TIMC0H) S
0x0 0 ce _0011 0 x00cf_0011 Timer channel 0 register low (TIMC0L) S
0x0 0 ce _0012 0 x00cf_0012 T imer channel 1 register high (TIMC1H) S
0x0 0 ce _0013 0 x00cf_0013 Timer channel 1 register low (TIMC1L) S
0x0 0 ce _0014 0 x00cf_0014 T imer channel 2 register high (TIMC2H) S
0x0 0 ce _0015 0 x00cf_0015 Timer channel 2 register low (TIMC2L) S
0x0 0 ce _0016 0 x00cf_0016 T imer channel 3 register high (TIMC3H) S
0x0 0 ce _0017 0 x00cf_0017 Timer channel 3 register low (TIMC3L) S
0x0 0 ce _0018 0 x00cf_0018 Pulse accum ulator control register (TIMPACTL) S
0x0 0 ce _0019 0 x00cf_0019 Pulse accumu lator flag register (TIMPAFLG) S
0x0 0 ce _001a 0 x00cf_001a Pulse accumula tor counter register high (TIMPACNT H) S
0x00ce_001b 0x00cf_001b Pulse accumulator counter register low (TIMPACNTL) S
0x00ce_001c 0x00cf_001c Reserved(2)
0x0 0 ce _001d 0 x00cf_001d Timer port data register (T IMPORT ) S
0x00ce_001e 0x00cf _001e Timer port data direction register (TIMDDR) S
0x00ce_0 01f 0x0 0cf_001 f T ime r test register (TI M TST) S
1. S = CPU supervisor mode access only.
2. Writ es have n o effect, reads return 0s, and the access terminates withou t a tr ansfer error exception.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
300 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
15.7.1 Timer Input Capture/Output Compare Select Register
Read: Anytime; always read $00
Write: Anytime
IOS[3:0] I/O Select Bits
The IOS[3:0] bits enable input capture or output compare operation
for the corresponding timer channels.
1 = Output compa re enabled
0 = Input capture enabled
Address: TIM1 0x00ce_0000
TIM2 0x00cf_0000
Bit 7654321Bit 0
Read: 0000
IOS3 IOS2 IOS1 IOS0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15- 2. Timer Input Capture/Output Compare
Select Register (TIMIOS)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 301
15.7.2 Timer Compare Force Register
Read: Anytime
Write: Anytime
FOC[3:0] Force Output Compare Bits
Setting an FOC bit causes an immediate output compare on the
corresponding channel. Forcing an output compare does not set the
output compare flag.
1 = Force output compare
0 = No effect
NOTE: A successful channel 3 output compare overrides any channel 2:0
compares. For each OC3M bit that is set, the output compare action
reflects the corresponding OC3D bit.
Address: TIM1 0x00ce_0001
TIM2 0x00cf_0001
Bit 7654321Bit 0
Read: 00000000
Write: FOC3 FOC2 FOC1 FOC0
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-3. Timer Compare Force Register (TIMCFORC)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
302 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
15.7.3 Timer Output Compar e 3 Mask Register
Read: Anytime
Write: Anytime
OC3M[3:0] Output Compare 3 Mask Bits
Setting an OC3M bit configures the corresponding TIMPORT pin to
be an output. OC3Mx makes the timer port pin an output regardless
of the da ta directio n bit when th e pin i s configu red for output compare
(IOSx = 1). The OC3Mx bits do not change the state of the TIMDDR
bits.
1 = Corresponding TIMPORT pin configured as output
0 = No effect
Address: TIM1 0x00ce_0002
TIM2 0x00cf_0002
Bit 7654321Bit 0
Read: 0000
OC3M3OC3M2OC3M1OC3M0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-4. Timer Output Compare 3 Mask Register (TIMOC3M)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 303
15.7.4 Timer Ou tput Compar e 3 Data Register
Read: Anytime
Write: Anytime
OC3D[3:0] Output Compare 3 Data Bits
When a successful channel 3 output compare occurs, these bits
transfer to the timer port data register if the corresponding OC3Mx bits
are set.
NOTE: A successful channel 3 output compare overrides any channel 2:0
compares. For each OC3M bit that is set, the output compare action
reflects the corresponding OC3D bit.
Address: TIM1 0x00ce_0003
TIM2 0x00cf_0003
Bit 7654321Bit 0
Read: 0000
OC3D3 OC3D2 OC3D1 OC3D0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-5. Timer Output Compare 3 Data Register (TIMOC3D)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
304 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
15.7.5 Timer Coun ter Registe rs
Read: Anytime
Write: Only in test (special) mode; has no effect in normal modes
To ensure coherent reading of the timer counter, such that a timer
rollover does not occur between two back-to-back 8-bit reads, it is
recommended that only half-word (16-bit) accesses be used.
A write to T IMCNT may have an extra cycle on the first count because
the write is not synchronized with the prescaler clock. The write occurs
at least one cycle before the synchronization of the prescaler clock.
Address: TIM1 0x00ce_0004
TIM2 0x00cf_0004
Bit 7654321Bit 0
Read: Bit 15 14 13 12 11 10 9 Bit 8
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-6. Timer Counter Register High (TIMCNTH)
Address: TIM1 0x00ce_0005
TIM2 0x00cf_0005
Bit 7654321Bit 0
Read: Bit 7 654321Bit 0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-7. Timer Counter Register Low (TIMCNTL)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 305
15.7.6 Timer System Control Register 1
Read: Anytime
Write: Anytime
TIMEN T i mer Enable Bit
TIMEN enables the timer. When the timer is disabled, only the
registers are accessible. Clearing TIMEN reduces power
consumption.
1 = Timer enabled
0 = Timer and timer counter disabled
TFFCA Timer Fast Flag Clear All Bit
TFF CA enables fas t clear i ng of t he m ain timer i nte rru pt fla g r egister s
(TIMFLG1 and TIMFLG2) and the PA flag register (TIMPAFLG).
TFFCA eliminates the software overhead of a separate clear
sequence.
When TFFCA is set:
An input capture read or a write to an output compare channel
clears the corresponding channel flag, CxF.
Any access of the timer count registers (TIMCNTH/L) clears
the TOF flag.
Any access of the PA counter registers (TIMPACNT) clears
both the PAOVF and PAIF flags in TIMPAFLG.
Writing logic 1s to the flags clears them only when TFFCA is clear.
1 = Fast flag clearing
0 = Normal flag clearing
Address: TIM1 0x00ce_0006
TIM2 0x00cf_0006
Bit 7654321Bit 0
Read: TIMEN 00
TFFCA 0000
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-8. Timer System Control Register (TIMSCR1)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
306 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
Figure 15-9. Fast Clear Flag Logic
15.7.7 Timer Toggle-On -Ove rf low Regist er
Read: Anytime
Write: Anytime
TOV[3:0] Toggle-On-Overflow Bits
TOV[3:0] toggles the output compare pin on overflow. This feature
only takes effect when in output compare mode. When set, it takes
precedence over forced output compare but not channel 3 override
events.
1 = Toggle output compare pin on overflow feature enabled
0 = Toggle output compare pin on overflow feature disabled
CLEAR
WRIT E TIM Cx RE GI STE RS
READ TI M Cx RE GI STE RS
TFFCA
DATA BIT x
WRITE TIMFLG1 R EGI ST ER
CxF
CxF FLAG
Address: TIM1 0x00ce_0008
TIM2 0x00cf_0008
Bit 7654321Bit 0
Read: 0000
TOV3 TOV2 TOV1 TOV0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-10. Timer Toggle-On-Overflow Registe r (TIMTOV)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 307
15.7.8 Timer Control Register 1
Read: Anytime
Write: Anytime
OMx/OLx Output Mode/Output Level Bits
These bit pairs select the output action to be taken as a result of a
successful output compare. When either OMx or OLx is set and the
IOSx bit is set, the pin is an output regardless of the state of the
corresponding DDR bit.
Channel 3 shares a pin with the pulse accumulator input pin. To use
the PAI i nput, clear both the OM3 and OL3 bits an d clear the OC3M3
bit in the output compare 3 mask register.
Address: TIM1 0x00ce_0009
TIM2 0x00cf_0009
Bit 7654321Bit 0
Read: OM3 OL3 OM2 OL2 OM1 OL1 OM0 OL0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-11. Timer Control Register 1 (TIMCTL1)
Table 15-3. Output Compare Action Selection
OMx:OLx Action on Output Compare
00 Timer disconnected from output pin logic
01 Toggle OCx output line
10 Clear OCx output line
11 Set OCx line
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
308 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
15.7.9 Timer Control Register 2
Read: Anytime
Write: Anytime
EDGx[B:A] Input Capture Edge Control Bits
These eight bit pairs configure the input capture edge detector
circuits.
Address: TIM1 0x00ce_000b
TIM2 0x00cf_000b
Bit 7654321Bit 0
Read: EDG3B EDG3A EDG2B EDG2A EDG1B EDG1A EDG0B EDG10
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-12. Timer Control Register 2 (TIMCTL2)
Table 15-4. Input Capture Edge Selection
EDGx[B:A] Edge Selection
00 Inpu t capture disabled
01 Input capture on rising edges only
10 Input capture on falling edges only
11 Inpu t capture on any edge (rising or falling)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 309
15.7.10 Timer In terrupt Enable Register
Read: Anytime
Write: Anytime
C[3:0]I Channel Interrupt Enable Bits
C[3:0]I enable the C[3:0]F flags in timer flag register 1 to generate
interrupt requests.
1 = Corresponding channel interrupt requests enabled
0 = Corresponding channel interrupt requests disabled
Address: TIM1 0x00ce_000c
TIM2 0x00cf_000c
Bit 7654321Bit 0
Read: 0000
C3I C2I C1I C0I
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-13. Timer Interrupt Enable Register (TIMIE)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
310 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
15.7.11 Timer System Control R egister 2
Read: Anytime
Write: Anytime
TOI Timer Overflo w Interrupt Enable Bit
TOI enables timer overflow interrupt requests.
1 = Overflow interrupt requests enabled
0 = Overflow interrupt requests disabled
PUPT Timer P ullup Enable Bit
PUPT enables pullup resistors on the timer ports when the ports are
configured as inputs.
1 = Pullup resistors enabled
0 = Pullup resistors disabled
RDPT Time r Drive Reduction Bit
RDPT reduces the output driver size.
1 = Output drive reduction enabled
0 = Output drive reduction disabled
TCRE Timer Counter Reset Enable Bit
TCRE enables a counter reset after a channel 3 compare.
1 = Counter reset enabled
0 = Counter reset disabled
NOTE: When the time r ch annel 3 r egister s cont ain $0000 and TCRE is se t, th e
timer counter registers remain at $0000 all the time.
Address: TIM1 0x00ce_000d
TIM2 0x00cf_000d
Bit 7654321Bit 0
Read: TOI 0PUPT RDPT TCRE PR2 PR1 PR0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-14. Timer System Control Register 2 (TIMSCR2)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 311
When the timer channel 3 registers contain $FFFF and TCRE is set,
TOF never gets set even though the timer counter registers go from
$FFFF to $0000.
PR[2:0] Prescaler Bits
These bits select the prescaler divisor for the timer counter.
NOTE: The newly selected prescaled clock does not take effect until the next
synchronized edge of the prescaled clock when the clock count
transit ions to $0000.)
Table 15-5. Prescaler Selection
PR[2:0] Prescaler Divisor
000 1
001 2
010 4
011 8
100 16
101 32
110 64
111 128
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
312 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
15.7.12 Timer Flag Register 1
Read: Anytime
Write: Anytime; writing 1 clears flag; writing 0 has no effect
C[3:0]F Channe l Flags
A channe l flag is set when an input captur e or outpu t compar e event
occurs. Clear a channel flag by writing a 1 to it.
NOTE: When the fast flag clear all bit, TFFCA, is set, an inpu t capture read or
an outpu t compare write clears the corr espond i ng chan nel flag. T FFC A
is in timer system control register 1 (TIMSCR1).
When a channel flag is set, it does not inhibit subsequent output
compares or input captures.
Address: TIM1 0x00ce_000e
TIM2 0x00cf_000e
Bit 7654321Bit 0
Read: 0000
C3F C2F C1F C0F
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-15. Timer Flag Register 1 (TIMFLG1)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 313
15.7.13 Timer Flag Register 2
Read: Anytime
Write: Anytime; writing 1 clears flag; writing 0 has no effect
TOF Timer Overflow Flag
TOF i s set when th e ti mer counter rol ls over from $F FF F to $0 000. If
the TOI bit in TIMSCR2 is also set, TOF generates an interrupt
request. Clear TOF by writing a 1 to it.
1 = Timer overflow
0 = No timer overflow
NOTE: When the timer channel 3 registers contain $FFFF and TCRE is set,
TOF never gets set even though the timer counter registers go from
$FFFF to $0000.
When the fast flag clear all bit, TFFCA, is set, any access to the timer
counter registers clears timer flag register 2. The TFFCA bit is in timer
system control register 1 (TIM SCR1).
When TOF is set, it does not inhibi t subsequent overflow events.
Address: TIM1 0x00ce_000f
TIM2 0x00cf_000f
Bit 7654321Bit 0
Read: TOF 0000000
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-16. Timer Flag Register 2 (TIMFLG2)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
314 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
15.7.14 Timer Channel Registers
Read: Anytime
Write: Output compare channel, anytime; input capture channel, no
effect
When a channel is configured for input capture (IOSx = 0), the timer
channel registers latch the value of the free-running counter when a
defined transition occurs on the corresponding input capture pin.
When a channel is configured for output compare (IOSx = 1), the timer
channel registers contain the output compare value.
To ensure coherent reading of the timer counter, such that a timer
rollover does not occur between back-to-back 8-bit reads, it is
recommended that only half-word (16-bit) accesses be used.
Address: TIMC0H 0x00ce_0010/0x00cf_0010
TIMC1H 0x00ce_0012/0x00cf _0012
TIMC2H 0x00ce_0014/0x00cf _0014
TIMC3H 0x00ce_0016/0x00cf _0016
Bit 7654321Bit 0
Read: Bit 15 14 13 12 11 10 9 Bit 8
Write:
Reset:00000000
Figure 15-17. Timer Channel [0:3] Register High (TIMCxH)
Address: TIMC0L 0x00ce_0011/0x00cf_0011
TIMC1L 0x00ce_0013/0x00c f_0013
TIMC2L 0x00ce_0015/0x00c f_0015
TIMC3L 0x00ce_0017/0x00c f_0017
Bit 7654321Bit 0
Read: Bit 7654321Bit 0
Write:
Reset:00000000
Figure 15-18. Timer Channel [0:3] Register Low (TIMCxL)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 315
15.7.15 Pulse Accumulator Control Register
Read: Anytime
Write: Anytime
PAE Pulse Accumulator Enable B it
PAE enables the pulse accumulator.
1 = Pulse accumu l ator enable d
0 = Pulse accumu lator di sabled
NOTE: The p ul se accu mulato r ca n ope rate in event m ode e ven whe n the ti me r
enable bit, TIMEN, is clear.
PAMOD Pu lse Accumulator Mode Bit
PAMOD selects event counter mode or gated time accumulation
mode.
1 = Gated time accumulation mode
0 = Event counter mode
PEDGE Pulse Accumulator Edge Bit
PEDG E sel ects falling or rising ed ges on th e PAI pin to increme nt the
counter.
In event counter mode (PAMOD = 0):
1 = Rising PAI edge increments counter
0 = Falling PAI edge increments counter
Address: TIM1 0x00ce_0018
TIM2 0x00cf_0018
Bit 7654321Bit 0
Read: 0 PAE PAMOD PEDGE CLK1 CLK0 PAOVI PAI
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-19 . Pulse Accumulator Control Register (TIMPACTL)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
316 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
In gated time accumulation mode (PAMOD = 1):
1 = Low PAI input enables divided-by-64 clock to pulse
accumulator and trailing rising edge on PAI sets PA IF flag.
0 = High PAI input enables divided-by-64 clock to pulse
accumulator and trailing falling edge on PAI sets PAIF flag.
NOTE: The timer prescaler generates the divided-by-64 clock. If the timer is not
active, there is no divided-by-64 clock.
To operate in gated time accumulation mode:
1. Apply logic 0 to RESET pin.
2. Initialize registers for pulse accumulator mode test.
3. Apply appropriate level to PAI pin.
4. Enable timer.
CLK[1:0] Clock Se lect Bits
CLK[1:0 ] select the timer count er inp ut clock as sho wn in T abl e 15- 6.
PAOVI Pulse Accumulator Overflow Interrupt Enable Bit
PAOVI enables the PAOVF flag to generate interrupt requests.
1 = PAOVF interrupt requests enabled
0 = PAOVF interrupt requests disabled
PAI Pulse Accumulator Input Interrupt Enable Bit
PAI enables the PAIF flag to generate interrupt requests.
1 = PAIF interrupt requests enabled
0 = PAIF interrupt requests disabled
Table 15-6. Clock Selection
CLK[1:0] Timer Counter Clock(1)
1. Changi ng the CLKx bi ts caus es an immediat e ch ange in t he ti mer co unter c lock i nput.
00 Timer prescal er clock(2)
2. When PAE = 0 , the ti me r prescaler clock is always the time r counter clock.
01 PACLK
10 PACLK/256
11 PACLK/65536
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 317
15.7.16 Pulse Accumulator Flag Register
Read: Anytime
Write: Anytime; writing 1 clears the flag; writing 0 has no effect
PAOVF Pulse Accumulator Overflow Flag
PAOVF is set when the 16-bit pulse accumulator rolls over from
$FFFF to $0000. If the PAOVI bit in TIMPACTL is also set, PAOVF
generates an interrupt request. Clear PAOVF by writing a 1 to it.
1 = Pulse accumu lator overfl o w
0 = No pulse accumulator overflow
PAIF Pulse Accumulator Input Flag
PAIF is set when the selected edge is detected at the PAI pin. In event
counter mode, th e event edge sets PAIF . In gated time accum ulation
mode, the trailing edge of the gate signal at the PAI pi n sets PAIF. If
the PAI bit in TIMPA CTL is also set, PAIF generates an interrupt
request. Clear PAIF by writing a 1 to it.
1 = Active PAI input
0 = No active PAI input
NOTE: When the fast flag clear al l enab le bit, TFFC A, is set, any access to the
pulse accumulator counter registers clears all the flags in TIMPAFLG.
Address: TIM1 0x00ce_0019
TIM2 0x00cf_0019
Bit 7654321Bit 0
Read: 000000
PAOVF PAIF
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-20. Pulse Accumulator Flag Register (TIMPAFLG)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
318 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
15.7.17 Pulse Accumulator Counter Registers
Read: Anytime
Write: Anytime
These r egisters conta in the number of active input edges o n the PAI pin
since the last reset.
NOTE: Reading the pulse accumulator counter registers immediately after an
active edge on the PAI pin may miss the last count since the input first
has to be synchronized with the bus clock.
To ensure coherent reading of the PA counter, such that the counter
does not increment between back-to-back 8-bit reads, it is
recommended that only half-word (16-bit) accesses be used.
Address: TIM1 0x00ce_001a
TIM2 0x00cf_001a
Bit 7654321Bit 0
Read: Bit 15 14 13 12 11 10 9 Bit 8
Write:
Reset: 00000000
Figure 15-21. Pulse Accumulator Co unter Register High
(TIMPACNTH)
Address: TIM1 0x00ce_001b
TIM2 0x00cf_001b
Bit 7654321Bit 0
Read: Bit 7654321Bit 0
Write:
Reset: 00000000
Figure 15-22. Pulse Accumulator Counter Register Low
(TIMPACNTL)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 319
15.7.18 Timer Port Data Register
Read: Anytim e; read pin state when corresponding TIMDDR bit is 0;
read pi n driver state when corresponding TIMDDR bit is 1
Write: Anytime
PORTT[3:0] Timer Port Input Capture/Output Compare Data Bits
Data written to TIMPORT is buffered and drives the pins only when
they are configured as general-purpose outputs.
Reading an inp ut (DDR bit = 0) reads the pin state ; reading an ou tput
(DDR bit = 1) reads the latch.
Writin g to a p in configu red a s a timer outp ut doe s not cha nge th e pi n
state.
Address: TIM1 0x00ce_001d
TIM2 0x00cf_001d
Bit 7654321Bit 0
Read: 0000
PORTT3 PORTT2 PORTT1 PORTT0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-23. Timer Port Data Register (TIMPORT)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
320 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
15.7.19 Timer Port Data Direction Register
Read: Anytime
Write: Anytime
DDRT[3:0] — TIMPORT Data Direction Bits
These bits control the port logic of TIMPORT. Reset clears the timer
port data direction register, configuring all timer port pins as i nputs.
1 = Corresponding pin configured as output
0 = Corresponding pin configured as input
Address: TIM1 0x00ce_001e
TIM2 0x00cf_001e
Bit 7654321Bit 0
Read: 0000
DDRT3 DDRT2 DDRT1 DDRT0
Write:
Reset:00000000
Timer function: IC/OC3 IC/OC2 IC/OC1 IC/OC0
Pulse accumulator function: PAI
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-24. Timer Port Data Direction Register (TIMDDR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Fun ction al Description
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 321
15.7.20 Timer Test Register
The timer test register (TIMTST) is only for factory testing. When not in
test mode, TIMTST is read-only.
15 .8 Fun cti on al Descr ipti o n
The timer module is a 16-bit, 4-channel timer with input capture and
output compare functions and a pulse accumulator.
15.8.1 Prescaler
The pre scaler di vide s the mod ule cl ock by 1, 2, 4, 8, 16 , 32, 64, or 128.
The PR[2:0] bits in TIMSCR2 select the prescaler divisor.
15.8.2 Input Capture
Clearing an I/O select bit, IOSx, configures channel x as an input capture
channel. The input capture function captures the time at which an
external event occurs. When an active edge occurs on the pin of an input
capture channel, the timer transfers the value in the timer counter into
the timer channel registers, TIMCxH and TIMCxL.
The minimum p ulse w idth for the inp ut captu re i np ut is grea ter th an tw o
module clocks.
The input capture function does not force data direction. The timer port
data d irection register controls the da ta direction of an in put capture pin .
Address: TIM1 0x00ce_001f
TIM2 0x00cf_001f
Bit 7654321Bit 0
Read: 00000000
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 15-25. Timer Test Register (TIMTST)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
322 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
Pin conditions such as rising or falling edges can trigger an input capture
only on a pin configured as an input.
An inp ut capture on channel x sets the CxF flag . The C xI bit enables t he
CxF flag to generate interrupt requests.
15.8.3 Output Compar e
Setting an I/O select bit, IOSx, configures channel x as an output
compar e channel. The output compar e functi on can ge nerate a periodic
pul se wi th a pro gram mab le polar i ty, dura tion, an d freq uency. W he n the
timer counter reaches the value in the channel registers of an output
compar e channel , the timer can set, clear , or toggle the chan nel pin. An
output co mpar e on channel x sets the CxF flag. The CxI bit e nables the
CxF flag to generate interrupt requests.
The output mode and level bits, OMx and OLx, select, set, clear, or
toggl e o n ou tput compa re. Cleari ng bot h OM x and OLx disconn ects th e
pin from the output logic.
Setting a force output compare bit, FOCx, causes an output compare on
channel x. A forced output compare does not set the channel flag.
A successful output compare on channel 3 overrides output compares
on al l other ou tput com pare channe ls. A channel 3 outpu t compa re can
cause bits in the output compare 3 data register to transfer to the timer
port data register, depending on the output compare 3 mask register.
The output compare 3 mask register masks the bits in the output
compare 3 data register. The timer counter reset enable bit, TCRE,
enables channel 3 output compares to reset the timer counter. A channel
3 output comp are can reset the time r counter even if the OC 3/PAI pin is
being used as the pulse accumul ator input.
An output compare overrides the data direction bit of the output compare
pin but does not change the state of the data direction bit.
Writin g to the ti m er p ort bit of an ou tput co mpar e pi n does not a ffect t he
pin state. The value written is stored in an internal latch. When the pin
becomes available for general-purpose output, the last value written to
the bit appears at the pin.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Fun ction al Description
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 323
15.8.4 Pulse Accumulator
The pulse accumulator (PA) is a 16-bit counter that can operate in two
modes:
1. E vent counte r mode Counts edges of selected polarity on the
pulse accumulator input pin, PAI
2. Gated time accumulation mode Counts pulses from a
divide-by-64 clock
The PA mode bit, PAMOD, selects the mode of operation.
The minimum pulse width for the PAI input i s greater than two module
clocks.
15.8.4.1 Event Counter Mode
Clearing the PAMOD bit configures the PA for event counter operation.
An acti ve edge on the PAI pin increments the PA. The PA edge bit,
PEDGE, selects falling edges or rising edges to increment the PA.
An active edge on the PAI pin sets the PA input flag, PAIF. The PA input
interrupt enable bit, PAI, enables the PAIF flag to generate interrupt
requests.
NOTE: The PAI input and timer channel 3 use the same pin. To use the PAI
input, disconnect it from the output logic by clearing the channel 3 output
mode and output level bits, OM3 and OL3. Also clear the channel 3
output compare 3 mask bit, OC3M3.
The PA counter registers, TIMPACNTH/L, reflect the number of active
input edges on the PAI pin since the last reset.
The PA overfl ow flag, PAOVF, is se t when the PA ro lls over fr om $FFFF
to $0000. The PA overflow interrupt enable bit, PAOVI, enables the
PAOVF flag to generate interrupt requests.
NOTE: The PA can oper ate in event coun ter mode even when the time r enable
bit, TIMEN, is clear.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
324 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
15.8.4.2 Gated Time Accumulation Mode
Setting the PAMOD bit configures the PA for gated time accumulation
operat ion. An active l evel on the PAI pin enabl es a divide- by-64 cl ock to
dri ve the PA. Th e PA edge bit, PEDGE, sel ects low levels or high leve ls
to enable the divided-by-64 clock.
The trailing edge of the active level at the PAI pin sets the PA input flag,
PAIF. The PA input interrupt enable bit, PAI, enables the PAIF flag to
generate interrupt requests.
NOTE: The PAI input and timer channel 3 use the same pin. To use the PAI
input, disconnect it from the output logic by clearing the channel 3 output
mode and output level bits, OM3 and OL3. Also clear the channel 3
output compare mask bit, OC3M3.
The PA counter registers, TIMPACNTH/L reflect the number of pulses
from the divide-by-64 clock since the last reset.
NOTE: The timer prescaler generates the divide-by-64 clock. If the timer is not
active, there is no divide-by-64 clock.
Figu re 15- 26. Ch ann el 3 Out pu t Co mp are/ Pulse Accum u lato r Log ic
PAD
OM3
OL3
CHANNEL 3 OUTPUT COMPARE
PULSE
ACCUMULATOR
OC3M3
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Fun ction al Description
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 325
15.8.5 General-Purpose I/O Ports
An I/O pin used by the timer defaults to general-purpose I/O unless an
internal function which uses that pin is enabled.
The timer pins can be configured for either an input capture function or
an output compare function. The IOSx bits in the timer IC/OC select
register configure the timer port pins as either input capture or output
compare pins.
The timer port data direction register controls the data direction of an
inp ut cap ture pin. Ext erna l pin c onditi on s trigg er i nput captur es o n inpu t
capture pins configured as inputs.
To configure a pin for input capture:
1. Clear the pins IOS bit in TIMIOS.
2. Clear the pins DDR bit in TIMDDR.
3. Write to TIMCTL2 to select the input edge to detect.
TIMDDR does not affect the data direction of an output compare pin. The
output compare function overrides the data direction register but does
not affect the state of the data direction register.
To configure a pin for output compare:
1. Set the pins IOS bit in TIMIOS.
2. Write the output compare value to TIMCxH/L.
3. Clear the pins DDR bit in TIMDDR.
4. Write to the OMx/OLx bits in TIMCTL1 to select the output action.
Table 15-7. TIMPORT I/O Function
In Out
Data Direction
Register Output Com pare
Action Reading
at Data Bus Reading at Pin
00Pin Pin
0 1 Pin Outp ut compare ac tion
1 1 Port data register O utp ut compare ac tion
1 0 Port data register Port data register
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
326 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
15.9 Reset
Reset initializes the timer registers to a known startup state as described
in the 15.7 Memory Map and Registers.
15.10 Interrupts
Table 15-8 lists the interrupt requests generated by the timer.
15.10.1 Timer Channel Interrupts (CxF)
A channel flag is set when an input capture or output compare event
occurs. Clear a channel flag by writing a 1 to it.
NOTE: When the fast flag clear all bit, TFFCA, is set, an inpu t capture read or
an outpu t compare write clears the corr espond i ng chan nel flag. T FFC A
is in timer system control register 1 (TIMSCR1).
When a channel flag is set, it does not inhibit subsequent output
compares or input captures
Table 15-8. Timer Interrupt Requests
Interrupt Requ est Flag Enable Bit
Channel 3 IC/OC C3F C3I
Channel 2 IC/OC C2F C2I
Channel 1 IC/OC C1F C1I
Channel 0 IC/OC C0F C0I
PA overflow PAO VF PAOVI
PA input PAIF PAI
Timer overflow TO F TOI
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Timer Modules (TIM1 and TIM2)
Interrupts
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA T imer Modul es (TIM1 and TIM2) 327
15.10.2 Pulse A ccumulator Overflow (PAOV F)
PA OVF is set when the 16- bit pul se accu mulato r rol ls over from $FFF F
to $0000. If the PAOVI bit in TIMPACTL is also set, PAOVF generates
an interrupt request. Clear PAOVF by writing a 1 to it.
NOTE: When the fast flag clear al l enab le bit, TFFC A, is set, any access to the
pulse accumulator counter registers clears all the flags in TIMPAFLG.
15.10.3 Pulse Accumulator Input (PAIF)
PAIF is set when the selected edge is detected at the PAI pin. In event
counter mode, the event edge sets PAIF. In gated time accumulation
mode, the tr ailing edge of the gate signal at the PAI pin se ts PA IF. If the
PAI bit in TIMPACTL is also set, PAIF generates an interrupt request.
Clear PAIF by writing a 1 to it.
NOTE: When the fast flag clear al l enab le bit, TFFC A, is set, any access to the
pulse accumulator counter registers clears all the flags in TIMPAFLG.
15.10.4 Timer Overflow (TOF)
TOF is set wh en the ti mer counter rol ls over from $F FFF to $0000. If the
TOI bit in TIMSCR2 is also set, TOF generates an interrupt request.
Clear TOF by writing a 1 to it.
NOTE: When the timer channel 3 registers contain $FFFF and TCRE is set,
TOF never gets set even though the timer counter registers go from
$FFFF to $0000.
When the fast flag clear all bit, TFFCA, is set, any access to the timer
counter registers clears timer flag register 2. The TFFCA bit is in timer
system control register 1 (TIM SCR1).
When TOF is set, it does not inhibit future overflow events.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
328 Timer Modules (TIM1 and TIM2) MOTOROLA
Timer Modules (TIM1 a nd TIM2)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 329
Technical Data MMC2107
Section 16. Serial Communications Interface Modules
(SCI1 and SCI2)
16.1 Contents
16.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .330
16.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .331
16.4 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .332
16.5 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .333
16.5.1 Doze Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .333
16.5.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .333
16.6 Signal Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334
16.6.1 RXD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334
16.6.2 TXD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334
16.7 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .334
16.7.1 SCI Baud Rate Registers. . . . . . . . . . . . . . . . . . . . . . . . . .336
16.7.2 SCI Control Register 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . .337
16.7.3 SCI Control Register 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . .340
16.7.4 SCI Status Register 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . .342
16.7.5 SCI Status Register 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . .344
16.7.6 SCI Data R egisters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .345
16.7.7 SCI Pullup and Reduced Drive Register . . . . . . . . . . . . . .346
16.7.8 SCI Port Data Register. . . . . . . . . . . . . . . . . . . . . . . . . . . .347
16.7.9 SCI Data D irection Register. . . . . . . . . . . . . . . . . . . . . . . .348
16.8 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349
16.9 Data Form at . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349
16.10 Baud Rate Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .350
16.11 Transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351
16.11.1 Frame Length. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352
16.11.2 Transmitting a Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353
16.11.3 Break Frames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355
16.11.4 Idle Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
330 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
16.12 Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356
16.12.1 Frame Length. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356
16.12.2 Receiving a Frame. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356
16.12.3 Data Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .357
16.12.4 Framing Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .362
16.12.5 Baud Rate Tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . . . .362
16.12.5.1 Slow Data Tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . .363
16.12.5.2 Fast Data Tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . .364
16.12.6 Receiver Wakeup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .365
16.12.6.1 Idle Input Line Wakeup (WAKE = 0) . . . . . . . . . . . . . . .365
16.12.6.2 Address Mark Wakeup (WAKE = 1). . . . . . . . . . . . . . . .365
16.13 Single-Wire Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .366
16.14 Loop Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .367
16.15 I/O Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .368
16.16 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369
16.17 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369
16.17.1 Transmit Data Register Empty. . . . . . . . . . . . . . . . . . . . . .369
16.17.2 Transmission Complete . . . . . . . . . . . . . . . . . . . . . . . . . . .369
16.17.3 Receive Data Register Full. . . . . . . . . . . . . . . . . . . . . . . . .370
16.17.4 Idle Receiver Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370
16.17.5 Overrun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370
16.2 Introduction
The serial communications interface (SCI) allows asynchronous serial
commun ic ations wi th periph eral d evi ces an d othe r micr ocont rol ler units
(MCU).
The M MC2107 has two iden tical SCI mod ules, each w ith its ow n control
registers and input/output (I/O) pins.
In the text that follows, SCI register names are denoted generically.
Thus, SCIPORT refers interchangeably to SCI1PORT and SCI2PORT,
the port data registers for SCI1 and SCI2, respectively.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Features
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 331
16.3 Features
Features of each SCI module include:
Full-duplex operation
Standard mark/space non-return-to- zero (NRZ) format
13-bit baud rate selection
Programmable 8-bit or 9-bit data format
Separately enabled transmitter and receiver
Separate receiver and transmitter central processor unit (CPU)
interrupt requests
Programmable transmitter output polarity
Two receiver wakeup methods:
Idle line wakeup
Address mark wakeup
Interrupt-driven operation with eight flags:
Transmitter empty
Transmission complete
Receiver full
Idle receiver input
Receiver overrun
Noise error
Framing error
Parity error
Receiver framing error detection
Hardware parity checking
1/16 bit-time noise detection
General-purpose, I/O capability
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
332 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
16.4 Blo ck Diag r am
Figure 16-1. SCI Block Diagram
SCI DAT A
RECEIVE
SHIFT REGIST ER
SCI DAT A
REGISTER
TRANSMIT
SHIFT REGIST ER
REGISTER
BAUD RATE
GENERATOR
SCBR[12:0]
RXD
TXD
RECEIVE
AND WAKEUP
DATA FORMAT
CONTROL
CONTROL
PF
FE
NF
RDRF
IDLE
TIE
OR
TCIE
RAF
CLOCK
IDLE
ILIE
RIE
RDRF/OR
TDRE
TC
INTERRUPT
INTERRUPT
INTERRUPT
INTERRUPT
PIN
REQUEST
REQUEST
REQUEST
REQUEST
SBK
LOOPS
TE
RSRC
TRANSMIT
CONTROL
LOOPS
RWU
RE
RSRC
PE
ILT
PT
WAKE
M
PIN
÷16
TC
TDRE
IPBUS
IPBUS
T8
R8
SYSTEM
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Modes of Op eration
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 333
16.5 Modes of Operation
SCI operation is identical in run, special, and emulat ion modes. The SCI
has two low-power modes, doze and stop.
NOTE: Run mode is the normal mode of operation and the WAIT instruction
does not affect SCI operation.
16.5.1 Doze Mode
When the SCIDOZ bit in the SCI pullup and reduced drive (SCIPURD)
register is set, the DOZE instruction stops the SCI clock and puts the SCI
in a low-powe r state . The DOZE instru ction doe s not af fect S CI reg ist er
states. Any transmission or reception in progress stops at doze mode
entry and resumes wh en an intern al or extern al inter rupt request brings
the CPU out of doze mode. Exiting doze mode by reset aborts any
transmission or reception in progress and resets the SCI.
When the SCIDOZ bit is clear, execution of the DOZE instruction has no
effect on the SCI. Normal module operation continues, allowing any SCI
interrupt to bring the CPU out of doze mode.
16.5.2 Stop Mode
The ST OP instruction stops the SCI clock and puts the SCI in a
low-power state. The STOP instruction does not affect SCI register
states. Any transmission or recepti on in progress halts at stop mode
entry and resumes when an external interrupt request brings the CPU
out of stop mode. Exiting stop mod e by reset abor ts any transm ission o r
reception in progress and resets the SCI.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
334 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
16.6 Signal Description
Table 16-1 gives an overview of the signals which are described here.
16.6.1 RXD
RXD is the SCI receiver pin. RXD is available for general-purpose I/O
when it is not configured for receiver operation.
16.6.2 TXD
TXD is the SCI transmit ter pin. TXD is av ailable for ge neral-purpose I/O
when it is not configured for transmitter operation.
16.7 Memory Map and R egisters
Table 16-1 shows the SCI memory map.
NOTE: Reading unimplemented addresses (0x00cc_000b through
0x00cc_000f) returns 0s. Writing to unimplemented addresses has no
effect. Accessing u nimplemente d addre sses does not gene rate an error
response.
Table 16-1. Signal Properties
Name Function Port Reset
State Pullup
RXD Receive data pin SCIPORT0 0 Disabled
TXD Transmit data pin SCIPORT1 0 Di sabled
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 335
Table 16-2. Serial Communications Interface Module Memory Map(1)
Address Bits 70 Access(2)
SCI1 SCI2
0x00cc_0000 0x00cd_0000 SCI baud register high (SCIBDH) S/U
0x00cc_0001 0x00cd_0001 S CI bau d register low (SCI BDL) S/U
0x00cc_0002 0x00cd_0002 SCI control register1 (SCICR1) S/U
0x00cc_0003 0x00cd_0003 SCI control register 2 (SCICR2) S/U
0x00cc_0004 0x00cd_0004 SCI status register 1 (SCISR1) S/U
0x00cc_0005 0x00cd_0005 SCI status register 2 (SCISR2) S/U
0x00cc_0006 0x00cd_0006 SCI data register high (SCIDRH) S/U
0x00cc_0007 0x00cd_0007 SCI data register low (SCIDRL) S /U
0x00cc_0008 0x00cd_0008 SCI pull up and reduced drive register (SCIPURD) S/U
0x00cc_0009 0x00cd_0009 S CI port data register (SCIPORT) S/U
0x00cc_000a 0x00cd_000a SCI data direction register (SCIDDR) S/U
0x00cc_000b
to
0x00cc_000f
0x00cd_000b
to
0x00cd_000f Reserved(3) S/U
1. Each module is as signed 64 Kbyt es of addres s space , all of which may not b e decode d. Acce sses ou tside of the spe cifi ed
modu le mem ory map generate a bus error exception.
2. S/U = CPU supervisor or user mode acc ess. User mode accesses to supervisor onl y addresses have no effe ct and result
in a cycl e termination transfer error.
3. Within the spe ci fied modul e memory map, acces si ng reserv ed address es does no t generat e a bus error excepti on. Reads
of reserved addresses return 0s and writes have no effect.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
336 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
16.7.1 SCI Baud Rate Registers
Read: Anytime
Write: Anytime
SBR[12:8], SBR[7:0] SCI Baud Rate Bits
These read/write bits control the SCI baud rate:
where:
1 SBR[12:0] 8191
NOTE: The baud rate generator is disabled until the TE bit or the RE bit in
SCICR2 is set for the first time after reset. The baud rate generator is
disabled when SB R[12:0] = 0.
Writing to SCIBDH has no effect without also writing to SCIBDL. Writing
to SCIBDH puts the data in a temporary location until data is written to
SCIBDL.
Address: SCI1 0x00cc _0000
SCI2 0x00cd_0000
Bit 7654321Bit 0
Read: 0 0 0 SBR12 SBR11 SBR10 SBR9 SBR8
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 16-2. SCI Baud Rate Register High (SCIBDH)
Address: SCI1 0x00cc _0001
SCI2 0x00cd_0001
Bit 7654321Bit 0
Read: SBR7 SBR6 SBR5 SBR4 SBR3 SBR2 SBR1 SBR0
Write:
Reset:00000100
Figure 16-3. SCI Baud Rate Register Low (SCIBDL)
SCI baud rate = fsys
16 x SBR[12:0]
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 337
16.7.2 SCI Control Register 1
Read: Anytime
Write: Anytime
LOOPS Loop Select Bit
This read/write control bit switches the SCI between normal mode
and loop mode. Reset clears LOOPS.
1 = Loop mode SCI operation
0 = Normal mode SCI operation
The S CI operate s normall y (LOOP S = 0 , RSRC = X) when the outp ut
of its transmitter is connected to the TXD pin, and the input of its
receiver is connected to the RXD pin.
In l oop mode (LOOP S =1, RSRC = 0) , the in put to the SC I receiver is
internally disconnected from the RXD pin logic and instead connected
to the outp ut of th e SCI transm itter. The be havior of TXD is gover ned
by the DDRSC1 bit in SCIDDR. If DDRSC1 = 1, the TX D pin is driven
with the output of the SCI transmitter. If DDRSC1 = 0, the TXD pin
idles high. See 16.14 Loop Operation for additional information.
For either loop mode or single-wire mode to function, both the SCI
receiver and transmitter must be enabled by setting the RE and TE
bits in SCIxCR2.
NOTE: The RXD pin becomes general-purpose I/O when LOOPS = 1,
regar dless of the state of the RSRC bit. DDRSC0 in SCIDDR is th e data
direction bit for the RXD pin.
Table 16-3 shows how the LOOPS, RSRC, and DDRSC0 bits affect
SCI operation and the configuration of the RXD and TXD pins.
Address: SCI1 0x00cc _0002
SCI2 0x00cd_0002
Bit 76 54321Bit 0
Read: LOOPS WOMS RSRC M WAKE ILT PE PT
Write:
Reset:00000000
Figure 16-4. SCI Control Register 1 (SCICR1)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
338 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
WOMS Wired-OR Mode Select Bit
This read/write bit configures the TXD and RXD pins for open-drain
operation. This allows all of the TXD pins to be tied together in a
multiple-transmitter system. WOMS also affects the TXD and RXD
pins when they are general-purpose outputs. External pullup resistors
are necessary on open-drain outputs. Reset clears WOMS.
1 = TXD and RXD pins open-drain when outputs
0 = TXD and RXD pins CMOS drive when outputs
RSRC Receiver Source Bit
This read/write bit selects the internal feedback path to the receiver
input when LOOPS = 1. Reset clears RSRC.
1 = Receiver input tied to TX D pin when LOOPS = 1
0 = Receiver input tied to transmitter output when LOOPS = 1
M Data Format Mode Bit
This read/write bit selects 11-bit or 10-bit frames. Reset clears M.
1 = Frames have 1 start bit, 9 data bits, and 1 stop bit.
0 = Frames have 1 start bit, 8 data bits, and 1 stop bit.
Table 16-3. SCI Normal, Loop, and Single-Wire Mode Pin Configuratio ns
LOOPS
RSRC
SCI
Mode Receiver
Input
RXD
Pin
Function
DDRSC0
Transmitter
Output
TXD
Pin
Function
0 X Normal Tied to RXD input buffer Receive pin X Tied to TXD output driver Transmit pin
1
0 Loop Tied to transmitter output General-
purpose I/O
0 Tied to receiver input only None (idles high)
1Tied to receiver input
and TXD output driver Tr ansmi t pin
1 Single-wire Tied to TXD 0 No connecti on Receive pin
1 Tied to TXD output driver Transmit pin
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 339
WAKE Wakeup Bit
This read/write bit selects the condition that wakes up the SCI
receiver when it has been placed in a standby state by setting the
RWU bit in SCICR2. When WAKE is set, a logic 1 (address mark) in
the most significant bit position of a received data character wakes the
receiv er . An id le condition on the R XD pin does so when WAKE = 0.
Reset clears WAKE.
1 = Address mark receiver wakeup
0 = Idle line receiver wakeup
ILT Idl e Line Type Bit
This read/write bit d etermines w hen the re ceiver starts coun ting logic
1s as i dle char acter bits. T he countin g beg i ns eith er a fter the start bi t
or after the stop bit. If the count begi ns after the start bit, then a st ring
of logic 1s preceding the stop bit may cause false recognition of an
idle ch aract er. B eginn ing the co unt afte r the stop bit avoids false i dle
character recognition, but requires properly synchronized
transmissions. Reset clears ILT.
1 = Idle frame bi t count begins after stop bit.
0 = Idle frame bit count begins after start bit.
PE Parity Enable Bit
This read/write bit enables the parity function. When enabled, the
pari ty function inser ts a pa ri ty b it in the most si gnifican t b it positio n o f
an SCI data word. Reset clears PE.
1 = Parity function enabled
0 = Parity function disabled
PT Parity T ype Bit
This re ad/write bit sel ect s even parity o r od d par ity. W ith ev en parity,
an even number of 1s clears the parity bit and an odd number of 1s
sets the parity bit. With odd parity, an odd number of 1s clears the
parity bit and an even number of 1s sets the parity bit. Reset clears
PT.
1 = Odd parity when PE = 1
0 = Even parity when PE = 1
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
340 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
16.7.3 SCI Control Register 2
Read: Anytime
Write: Anytime
TIE Transmitter Interrupt Enable Bit
This read/write bit allows the TDRE flag to generate interr upt
requests. Reset clears TIE.
1 = TDRE interrupt requests enabled
0 = TDRE interrupt requests disabled
TCIE Transmission Complete Interrupt Enable Bit
This read/write bit allows the TC flag to generate interrupt requests.
Reset clears TCIE.
1 = TC interrupt requests enabled
0 = TC interrupt requests disabled
RIE Receiver Interrupt Enable Bit
This read/write bit allows the RDRF and OR flags to generate interrupt
requests. Reset clears RIE.
1 = RDRF and OR interrupt requests enabled
0 = RDRF and OR interrupt requests disabled
ILIE Idle Line Interrupt Enable Bit
This read/write bit allows the IDLE flag to generate interrupt requests.
Reset clears ILIE.
1 = IDLE interrupt requests enabled
0 = IDLE interrupt requests disabled
Address: SCI1 0x00cc _0003
SCI2 0x00cd_0003
Bit 76 54321Bit 0
Read: TIE TCIE RIE ILIE TE RE RWU SBK
Write:
Reset:00000000
Figure 16-5. SCI Control Register 2 (SCICR2)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 341
TE Transmitte r Enable Bit
This read/write bit enables the transmitter and configures the TXD pin
as the transmitter output. Toggling TE queues an idle frame. Reset
clears TE.
1 = Transmitter enabled
0 = Transmitter disabled
RE Receiver Enable Bit
This read/write bit enables the receiver. Reset clears RE.
1 = Receiver enabled
0 = Receiver disabled
NOTE: When LOOPS = 0 and TE = RE = 1, the RXD pin is an input and the
TXD pin is an output regardless of the state of the DDRSC1 (TXD) and
DDRSC0 (RXD) bits.
RWU Receiver Wakeup Bit
This read/write bit puts the receiver in a standby state that inhibits
receiver interrupt requests. The WAKE bit determines whether a n idle
input or an address mark wakes up the receiver and clears RWU.
Reset clears RWU.
1 = Receiver asleep when RE = 1
0 = Receiver awake when RE = 1
SBK Send Break Bit
Setting this read/write bit causes the SCI to send break frames of 10
(M = 0) o r 11 (M = 1) logic 0s. To send on e br eak f ram e, set S BK an d
then clear it before the break frame is finished transmitting. As long as
SBK is set, the transmitter continues to send break frames.
1 = Transmitter sends break frames.
0 = Tr ansmitter does not send break frames.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
342 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
16.7.4 SCI Status Register 1
Read: Anytime
Write: Has no meaning or effect
TDRE Transmit Data Register Empty Flag
The TD RE fl ag is se t w he n th e tr ansmit shift re gi ster rece ives a w ord
from the SCI data register. It signals that the SCIDRH and SCIDRL
are empty and can receive new data to transmit. If the TIE bit in the
SCICR2 is also set, TDRE generates an interrupt request. Clear
TDRE by reading SCISR1 and then writing to SCIDRL. Reset sets
TDRE.
1 = Transmit data register empty
0 = Transmit data register not empty
TC Transmit Complete Flag
The TC flag is set when TDRE = 1 and no data, preamble, or break
frame is being transmitted. It signals that no transmission is in
progress. If the TCIE bit is set in SCICR2, TC generates an interrupt
request. When TC is set, the TXD pin is idle (logic 1). TC is cleared
automatically when a data, preamble, or break frame is queued. Clear
TC by reading SCISR1 with TC set and then writing to SCIDRL. TC
cannot be cl eared while a trans mission is in progress. Reset sets TC.
1 = No transmission in progress
0 = Transmission in progress
Address: SCI1 0x00cc _0004
SCI2 0x00cd_0004
Bit 7654321Bit 0
Read: TDRE TC RDRF IDLE OR NF FE PF
Write:
Reset:11000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 16-6. SCI Status Register 1 (SCISR1)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 343
RDRF Receive Data Register Full Flag
The RDRF flag is set when the data in the re ceive shift registe r is
transfer red to S CIDRH and SC IDRL. It signals that th e r eceived data
is available to the MCU. If the RIE bit is set in SCICR2, RDRF
generates an interrupt request. Clear RDRF by reading the SCISR1
and then reading SCIDRL. Reset clears RDRF.
1 = Received data available in SCIDRH and SCIDRL
0 = Received data not available in SCIDRH and SCIDRL
IDLE Idle Line Flag
The IDLE flag is set when 10 (if M = 0) or 11 (if M = 1) consecutive
log ic 1s appear on the re ceiver i nput . If the ILIE bit in SCICR2 is set,
IDLE generates an interrupt request. Once IDLE is cleared, a valid
frame must again set the RDRF flag before an idle condition can set
the IDLE flag. Clear IDLE by reading SCISR1 and then reading
SCIDRL. Reset clears IDLE.
1 = Receiver idle
0 = Receiver active or idle since reset or idle since IDLE flag last
cleared
NOTE: When RWU =1, an idle line condition does not set the IDLE flag.
OR — Overrun Flag
The OR flag is set if data is not read from SCIDRL befo re the receive
shift register receives th e stop bit of the next fram e. This is a re ceiver
overrun condition. If the RIE bit in SCICR2 is set, OR generates an
interrupt request. The data in the shift register is lost, but the data
already in the SCIDRH and SCIDRL is not affected. Clear OR by
reading SCISR1 and then reading SCIDRL. Reset clears OR.
1 = Ov erru n
0 = No overrun
NF Noise Flag
The NF flag is set when the SCI detects noise on the receiver input.
NF is set during the sa me cycle as the RDRF flag but does not get set
in the case of an overrun. Clear NF by reading SCISR1 and then
reading SCIDRL. Reset clears NF .
1 = Nois e
0 = No noise
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
344 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
FE Framing Err or Fl ag
The F E flag is set whe n a logic 0 is accepte d as the stop bit. FE is set
during the same cycle as the RDRF flag but does not get set in the
case of an overrun. FE inhibits further data reception until it is cleared.
Clear FE by reading SCISR1 and then reading SCIDRL. Reset clears
FE.
1 = Framing error
0 = No framing error
PF Parity Error Flag
The PF flag is set when PE = 1 and the parity of the received data
does not match its parity bit. Clear PF by reading SCIS R1 and then
reading SCIDRL. Reset clears PF.
1 = Parity error
0 = No parity error
16.7.5 SCI Status Register 2
Read: Anytime
Write: Has no meaning or effect
RAF Receiver Active Flag
The RAF flag is set when the receiver detects a logic 0 during the RT1
time period of the start bit search. When the receiver detects an idle
character, it clears RAF. Reset clears RAF.
1 = Recepti on in progress
0 = No reception in progress
Address: SCI1 0x00cc _0005
SCI2 0x00cd_0005
Bit 7654321Bit 0
Read: 0000000RAF
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 16-7. SCI Status Register 2 (SCISR2)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 345
16.7.6 SCI Data Registers
Read: Anytime
Write: Anytime; writing to R8 has no effect
R8 Receive Bit 8
The R8 bit is the ninth received data bit when using the 9-bit data
format (M = 1). Reset clears R8.
T8 Transmit Bit 8
The T8 bit is the ninth transmitted data bit when using the 9-bit data
format (M = 1). Reset clears T8.
R[7:0] Receive Bits [7:0]
The R[7 :0] bits are receive bits [7 :0] when using the 9-bit o r 8-bit da ta
format. Reset clears R[7:0].
T[7:0] Transmit Bits [7:0]
The T[7:0] bits are transmit bits [7:0] when usin g the 9-bit or 8-bit data
format. Reset clears T[7:0].
Address: SCI1 0x00cc _0006
SCI2 0x00cd_0006
Bit 7654321Bit 0
Read: R8 T8 000000
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 16-8. SCI Data Register High (SCIDRH)
Address: SCI1 0x00cc _0007
SCI2 0x00cd_0007
Bit 7654321Bit 0
Read: R7 R6 R5 R4 R3 R2 R1 R0
Write: T7 T6 T5 T4 T3 T2 T1 T0
Reset:00000000
Figure 16-9. SCI Dat a Register Low (SCIDRL)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
346 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
NOTE: If the value of T8 is the same as in the previous transmission, T8 does
not have to be rewritten. The same value is transmitted until T8 is
rewritten.
When using the 8-bit data format, only SCIDRL needs to be accessed.
When using 8-bit write instructions to transmit 9-bit data, write first to
SCIDRH, then to SCIDRL.
16.7.7 SCI Pullup and Reduced Drive Register
Write: Anytim e
SCISDOZ SCI Stop in Doze Mode Bit
The SCISDOZ bit disables the SCI in doze mode.
1 = SCI disabled in doze mode
0 = SCI enabled i n doze mode
RSVD[5:1] Reser ved
Writin g to these re ad/w rite bits upda tes th ei r va lues b ut h as no effe ct
on functionality.
RDPSCI Reduced Drive Bit
This read/write bit controls the drive capability of TXD and RXD.
1 = Reduced TXD and RXD pin drive
0 = Full TXD and RXD pin drive
Address: SCI1 0x00cc _0008
SCI2 0x00cd_0008
Bit 7654321Bit 0
Read: SCISDOZ 0RSVD5 RDPSCI 00
RSVD1 PUPSCI
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 16-10. SCI Pullup and Reduced Drive Register (SCIPURD)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 347
PUPSCI Pullup Enable Bit
This read/write bi t e nables the pu llu ps o n pins T XD an d RX D. If a pin
is programmed as an output, the pullup is disabled.
1 = TXD and RXD pullups enabled
0 = TXD and RXD pullups disabled
16.7.8 SCI Port Data Register
Read: Anytime; when DDRSCx = 0, its pin is configured as an input , and
reading PORTSCx returns the pin level; when DDRSCx = 1, its pin is
configured as an output, and reading PORTSCx returns the pin driver
input level.
Write: Anytime; data stored in internal latch drives pin only if DDRSC
bit = 1
RSVD[7:2] Reser ved
Writin g to these re ad/w rite bits upda tes th ei r va lues b ut h as no effe ct
on functionality.
PORTSC[1:0] SCIPORT Data Bits
These are the read/write data bits of the SCI port.
NOTE: Writes to SCIPORT do not change the pin state when the pin is
configured for SCI input.
To e nsure cor rect rea ding of t he S CI pi n va lues f rom S CIPORT, always
wait at least one cycle after writing to SCIDDR before reading SCIPORT.
Address: SCI1 0x00cc _0009
SCI2 0x00cd_0009
Bit 7654321Bit 0
Read: RSVD7 RSVD6 RSVD5 RSVD4 RSVD3 RSVD2 PORTSC1 PORTSC0
Write:
Reset:00000000
Pin function: TXD RXD
Figure 16-11. SC I Port Data Register (SCIPORT)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
348 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
16.7.9 SCI Data Direction Register
Read: Anytime
Write: Anytime
RSVD[7:2] Reser ved
Writin g to these re ad/w rite bits upda tes th ei r va lues b ut h as no effe ct
on functionality.
DDRSC[1:0] SCIPORT Data Direction Bits
These bits control the data direction of the S CIPORT pins. Reset
clears DDRSC[1:0].
1 = Corresponding pin configured as output
0 = Corresponding pin configured as input
NOTE: When LOOPS = 0 and TE = RE = 1, the RXD pin is an input and the
TXD pin is an output regardless of the state of the DDRSC1 (TXD) and
DDRSC0 (RXD) bits.
Address: SCI1 0x00cc _000a
SCI2 0x00cd_000a
Bit 76 54321Bit 0
Read: RSVD7 RSVD6 RSVD5 RSVD4 RSVD3 RSVD2 DDRSC1 DDRSC0
Write:
Reset:00000000
Figure 16-12. SC I Data Dire ction Register (SCIDDR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 349
16 .8 Fun cti on al Descr ipti o n
The SCI allows full-duplex, asynchronous, non-return-to-zero (NRZ)
serial communication between the MCU and remote devices, including
other MCUs. The SCI transmitter and receiver operate independently,
alth ough they use the same bau d rate generator . The CPU m onitor s the
status of the SCI, writes the data to be transmitted, and processes
received data.
16.9 Data Format
The SCI uses the standard NRZ mark/space data format shown in
Fi gu re 16-1 3.
Each frame has a start bit, eight or nine data bits, and one or two stop
bits. Clearing the M bit in SCCR1 configures the SCI for 10-bit frames.
Setting the M bit configures the SCI for 11-bit frames.
When the SCI is conf igured for 9- bit data, th e ni nth dat a bit is the T8 bit
in SCI data register high (SCIDRH). It remains unchanged after
transmission and can be used repeatedly without rewriting it. A frame
with nine data bits has a total of 11 bits.
Figure 16-13. SCI Data Formats
10-BIT FRAME
START B IT 0 BIT 1 BIT 2 BIT 3 BIT 4 BIT 5 BIT 6 BIT 7
BIT STOP
BIT
NEXT
START
BIT
M = 1 in S CICR1
START B IT 0 BIT 1 BIT 2 BIT 3 BIT 4 BIT 5 BIT 6 BIT 7
BIT STOP
BIT
NEXT
START
BIT
11-BIT FRAME
M = 1 IN SCICR1
BIT 8
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
350 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
16.10 Baud Rate Generation
A 13-bit modulus counter in the baud rate generator derives the baud
rate for both the receiver and the transmitter. The value from 0 to 8191
written to SCIBDH and SCIBDL determines the system clock divisor.
The baud rate clock is synchronized with the bus clock and drives the
receiver. The baud rate clock divided by 16 drives the transmitter. The
receiver acquisition rate is 16 samples per bit time.
Baud rate generation is subject to two sources of error:
1. In teger divisi on of the modu le clock may n ot give the exact tar get
frequency.
2. Synchronization with the bus clock can cause phase shift.
Table 16-4. Example Baud Rates
(System Clock = 33 MHz)
SBR[12:0] Receiver Clock
(Hz) Transmitter Clock
(Hz) Target
Baud Rate Percent
Error
0x0012 1,833,333.3 114,583.3 115,200 0.54
0x0024 916,666.7 57,291.7 57,600 0.54
0x0036 611,111.1 38,194.4 38,400 0.54
0x003d 540,983.6 33,811.4 33,600 0.63
0x0048 458,333.3 28,645.8 28,800 0.54
0x006b 308,411.2 19,275.7 19,200 0.39
0x0008f 230,769.2 14,423.1 14,400 0.16
0x00d7 153,488.4 95,93.0 9,600 0.07
0x01ae 76,744.2 4,796.5 4,800 0.07
0x035b 38,416.8 2,401.0 2,400 0.04
0x06b7 19,197.2 1,199.8 1,200 0.01
0x0d6d 9,601.4 600.1 600 0.01
0x1adb 4,800.0 300.0 300 0
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Transmitter
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 351
16.11 Transmitter
Figure 16-14. Transmitter Block Diagram
PE
PT
H876543210L
11-BIT TRAN SM I T SHIFT REG ISTER
STOP
START
TDRE
TIE
TCIE
SBK
TC
MSB
SCI DATA REGISTER
LOAD FROM SCIDR
SH IFT ENABLE
PREAMBLE (ALL 1s)
BREA K (ALL 0s)
TRANSM I TTER CO NTR OL
M
IPBUS
SBR[12:0]
÷ 16
TXD
TDRE
TC
SYSTEM
LOOP
LOOPS
CLOCK
TE
TO
CONTROL RECEIVER
WOMS
PIN
FORC E P IN DIR EC TIO N
PIN BUF FE R
AND CONTROL
BAUD
DIVIDER
PARITY
GENERATION
INTERRUPT
REQUEST
INTERRUPT
REQUEST
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
352 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
16.11.1 Frame Length
The transmitter can generate either 10-bit or 11-bit frames. In SCICR1,
the M bit selects frame length, and the PE bit enables the parity function.
One data bit may be an address mark or an extra stop bit. All frames
begin with a start bit and end with one or two stop bits. When transmitting
9-bit data, b it T8 in SCI data register high (SCIDRH) is the ninth bit
(bit 8).
Table 16-5. Example 10-Bit and 11-Bit Frames
M Bit Frame
Length Start
Bit Data
Bits Parity
Bit Address
Mark(1)
1. When implementing a multidrop network using the SCI, the address mark bit is used to
designate subsequent data frames as a network address and not device data.
Stop
Bit(s)
0 10 bit s
1 8 No No 1
1 7 No No 2
17No Yes 1
17Yes No 1
1 11 bit s
1 9 No No 1
1 8 No No 2
18No Yes 1
18Yes No 1
17No Yes 2
17Yes No 2
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Transmitter
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 353
16.11.2 Transmitting a Frame
To begin an SCI transmission:
1. Configure the SCI:
a. Write a baud rate value to SCIBDH and SCIBDL.
b. Write to SCICR1 to:
i. Enable or disable loop mode and select the receiver
feedback path
ii. Select open-drain or wired-OR SCI outputs
iii. Select 10-bit or 11-bit frames
iv. Select the receiver wakeup condition: address mark or
idle line
v. Select idle line type
vi. Enable or disable the parity function and select odd or
even parity
c. Write to SCICR2 to:
i. Enable or disable TDRE, TC, RDRF, and IDLE interrupt
requests
ii. Enable the transmitter and queue a break frame
iii. Enable or disable the receiver
iv. Put the receiver in standby if required
2. Transmit a byte:
a. Clear the TDRE flag by reading SCISR1 and, if sending 9-bit
data, write the ninth data bit to SCDRH.
b. Write the byte to be transmitted ( or low-or der 8 b i ts if sending
9-bit data) to SCIDRL.
3. Repeat step 2 for each subsequent transmission.
Writing the TE bit from 0 to 1 loads the transmit shift register with a
preamble of 10 (if M = 0) or 11 (if M = 1) logic 1s. When the preamble
shifts out, the SCI transfers the data from SCIDRH and SCIDRL to the
transmit shift register. The transmit shift register prefaces the data with
a 0 start bit and appends the data with a 1 stop bit and begins shifting
out the frame.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
354 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
The SCI sets the TDRE flag every time it transfers data from SCIDRH
and SCIDRL to the transmit sh ift register. TDRE indicates t hat SCIDRH
and SCIDR L can accept new data. If the TIE bit is set, TDR E generate s
an interrupt request.
NOTE: SCIDRH and SCIDRL transfer data to the transmit shift register and sets
TDRE 9/16ths of a bit time after the previous frames stop bit starts to
shift out.
Hardware supports odd or even parity. When parity is enabled, the most
significant data bit is the parity bit.
When the tr ansmit sh if t registe r is not tr ansm itt ing a fr ame, t he TX D pin
goes to the idle condition, logic 1. Clearing the TE bit while the
transmitter is idle will return control of the TX D pin to the SCI data
direction (SCIDDR) and SCI port (SCIPORT) registers.
If the TE bit is cleared while a transmission is in progress (while TC = 0),
the frame in the transmit shift register continues to shift out. Then the
TXD pin re verts to bei n g a gener al-pur pose I/O pin even if there is data
pending in the SCI data register. To avoid accidentally cutting off a
message, always wait until TDRE is set after the last frame before
clearing TE.
To se para te messag es w ith pr eam bles with m inimum i dle li ne time, use
this sequence between messages:
1. Write the last byte of the first message to SCIDRH and SCIDRL.
2. Wait until the TDRE flag is set, indicating the transfer of the last
frame to the transmit shift register.
3. Queue a preamble by clearing and then setting the TE bit.
4. Write the first byte of the second message to SCIDRH and
SCIDRL.
When the SCI relinquishes the TXD pin, the SCIPORT and SCIDDR
registers control the TXD pin.
To force TXD high when turning off the transmitter, set bit 1 of the SCI
port register (SCIPORT) and bit 1 of the SC I data direction register
(SCIDDR). The TXD pin goes h igh as soon as the SCI relinquishes
control of it.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Transmitter
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 355
16.11.3 Break Frames
Setting the SBK bit in SCICR2 loads the transmit shift register with a
break frame. A break frame contains all logic 0s and has no start, stop,
or parity bit. Break frame length depends on the M bit in the SCICR1
register. As long as SBK is set, the SCI continuously loads break frames
into the transmit shift register. After SBK is clear, the transmit shift
register finishes transmitting the last break frame and then transmits at
least one logic 1. The automatic logic 1 at the end of a break frame
guarantees the recognition of the next start bit.
The SCI recognizes a break frame when a start bit is followed by eight
or nine 0 data bits and a 0 where the stop bit should be. Receiving a
break frame has these effects on SCI registers:
Sets the FE flag
Sets the RDRF flag
Clears the SCIDRH and SCIDRL
May set the OR flag, NF flag, PE flag, or the RAF flag
16.11.4 Idle Frames
An idle frame contains all logic 1s and has no start, stop, or parity bit. Idle
frame length depends on the M bit in the SCICR1 register. The preamble
is a synchronizing idle frame that begins the first transmission after
writi ng the TE bit from 0 to 1.
If the TE bit i s cleare d duri n g a tran smission, th e TX D pi n beco mes idle
after completion of the transmission in progress. Clearing and then
set ting th e T E bi t duri ng a tra nsmission queues an i dle f rame to be se nt
after the frame currently being transmitted.
NOTE: When queueing an idle frame, return the TE bit to logic 1 before the stop
bit of the current frame shifts out to the TXD pin. Setting TE after the stop
bit appears on TXD causes data previously written to SCIDRH and
SCIDRL to be lost toggle TE for a queued idle frame while the TDRE flag
is set and imme diately before writing new data to SCIDRH and SCIDRL.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
356 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
16.12 Receiver
Figure 16-15. SCI Receiver Block Diagram
16.12.1 Frame Length
The receiver can handle either 8-bit or 9-bit data. The state of the M bit
in SCICR1 selects frame length. When receiving 9-bit data, bit R8 in
SCIDRH is the ninth bit (bit 8).
16.12.2 Receiving a Frame
When the SCI receives a frame, the receive shift register shifts the frame
in from the RXD pin.
ALL 1S
M
WAKE
ILT
PE
PT
RE
H876543210L
11-BIT RECEIV E SHIFT REGISTER
STOP
START
DATA
WAKEUP
PARITY
CHECKING
MSB
SCI DA TA REG IS T ER
R8
RIE
ILIE
RDRF
OR
NF
FE
PE
IPBUS
RXD
SYSTEM
IDLE
RDRF/OR
SBR[12:0]
BAUD DIVIDER
LOOP
LOOPS
RSRC
FROM TXD O R
TRANSMITTER
CLOCK
IDLE
RAF
RECOVERY
CONTROL
LOGIC
RWU
INTERRUPT
REQUEST
INTERRUPT
REQUEST
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Receiver
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 357
After an entire frame shifts into the receive shift register, the data portion
of the frame transfers to SCIDRH and SCIDRL. The RDRF flag is set,
indicating that the received data can be read. If the RIE bit is also set,
RDRF generates an interr upt request.
16.12.3 Data Sampling
The r eceiver sam ples t he RX D pin at the R T clo ck rat e. The RT clock is
an in tern al signal with a fr equen cy 16 ti mes th e baud rate. To adju st for
baud rate mismatch, the RT clock resynchronizes:
After every start bit
After the r eceiver detects a data b it chang e from l ogic 1 to logic 0
(after the majority of data bit samples at RT8, RT9, and RT10
returns a valid logic 1 and the majority of the next RT8, RT9, and
RT10 samples returns a valid logic 0)
To locate the start bit, data recovery logic does an asynchronous search
for a 0 preceded by three 1s. When the falling edge of a po ssible start bit
occurs, the RT clock begins to count to 16.
Figure 16-16. Receiver Data Sampling
RESET RT CLOCK
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT2
RT3
RT4
RT5
RT8
RT7
RT6
RT11
RT10
RT9
RT15
RT14
RT13
RT12
RT16
RT1
RT2
RT3
RT4
SAMPLES
RT CLOCK
RT CL OCK COUNT
START BI T
RXD
START BI T
QUALIFICATION STAR T BIT DATA
SAMPLING
111111110000000
LSB
VERIFICATION
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
358 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
To verify the start bit and to detect noise, data recovery logic takes
samples at RT 3, RT5, and RT 7.
If start bit verification is not successful, the RT clock is reset and a new
search for a start bit begins.
To determine the value of a data bit and to detect noise, recovery logic
takes samples at RT8, RT9, and RT10.
NOTE: The RT8, RT9, and RT10 data samples do not affect start bit verification.
If any or all of th e RT 8, RT 9, an d R T10 sa mpl es are logic 1s following a
successful start bit verification, the NF flag is set and the receiver
interprets the bit as a start bit (logic 0).
Table 16-6. Start Bit Verification
R T3, RT5, and RT7 Samples Start Bit Verification No i se Flag
000 Yes 0
001 Yes 1
010 Yes 1
011 No 0
100 Yes 1
101 No 0
110 No 0
111 No 0
Table 16-7. Data Bit Recovery
RT8, RT9, and RT10 Samples Data Bit Determination No ise Flag
000 0 0
001 0 1
010 0 1
011 1 1
100 0 1
101 1 1
110 1 1
111 1 0
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Receiver
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 359
The RT8, RT9, and RT10 samples also verify stop bits.
In Figure 16-17, the verification samples RT3 and RT5 determine that
the fi rst low dete c ted wa s noise and n ot th e beg i nning of a st art b i t. The
RT clock is reset and the start bit search begins again. The NF flag is n ot
set because the noise occurred before the start bit was verified.
Figure 16-17. Start Bit Search Example 1
Table 16-8. Stop Bit Recovery
RT8, RT9, and RT10 Sampl es Fra ming Error F lag Noise Flag
000 1 0
001 1 1
010 1 1
011 0 1
100 1 1
101 0 1
110 0 1
111 0 0
RESET RT CLOCK
RT1
RT1
RT1
RT1
RT2
RT3
RT4
RT5
RT1
RT1
RT2
RT3
RT4
RT7
RT6
RT5
RT10
RT9
RT8
RT14
RT13
RT12
RT11
RT15
RT16
RT1
RT2
RT3
SAMPLES
RT CLOCK
RT CL OCK COUNT
START BIT
RXD
110111100000
LSB
0 0
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
360 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
In Figure 16-18, noise is perceived as the beginning of a start bit
although the RT3 sample is high. The RT3 sample sets the noise flag.
Although the perceived bit time is misaligned, the RT8, RT 9, and RT10
data samples are within the bit time, and data recovery is successful.
Figure 16-18. Start Bit Search Example 2
In Fig ure 16-19 a l arge burst of noi se is perceive d as the begi nning of a
start bit, although the RT5 sample is high. The RT5 sample sets the
noise flag. Although this is a worst-case misalignment of perceived bit
time, the data samples RT8, RT9, and RT10 are within the bit time and
data recovery is successful.
Figure 16-19. Start Bit Search Example 3
RESET RT CLOCK
RT1
RT1
RT1
RT1
RT1
RT1
RT2
RT3
RT4
RT5
RT6
RT7
RT8
RT11
RT10
RT9
RT14
RT13
RT12
RT2
RT1
RT16
RT15
RT3
RT4
RT5
RT6
RT7
SAMPLES
RT CLOCK
RT CL OCK COUNT
AC T UAL START BIT
RXD
1111110000
LSB
00
PER CEIVED STAR T BIT
RESET RT CLOCK
RT1
RT1
RT1
RT1
RT2
RT3
RT4
RT5
RT6
RT7
RT8
RT9
RT10
RT13
RT12
RT11
RT16
RT15
RT14
RT4
RT3
RT2
RT1
RT5
RT6
RT7
RT8
RT9
SAMPLES
RT CLOCK
RT CL OCK COUNT
ACTUAL START BIT
RXD
101110000
LSB
0
PERCEIVED ST ART BI T
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Receiver
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 361
Fi gu re 16-2 0 shows the effect of noise early in the start bit time.
Althou gh this noise does not a ffect proper synchron ization with the s tart
bit time, it does set the noise flag.
Figure 16-20. Start Bit Search Example 4
Fi gu re 16-2 1 shows a burst of noise near the beginning of the start bit
that resets the RT clock. The sample after the reset is low but is not
preceded by three high samples that would qualify as a falling edge.
Depending on the timing of the start bit search and on the data, the frame
may be missed entirely or it may set the framing error flag.
Figure 16-21. Start Bit Search Example 5
RESET RT CL OC K
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT2
RT3
RT4
RT7
RT6
RT5
RT10
RT9
RT8
RT14
RT13
RT12
RT11
RT15
RT16
RT1
RT2
RT3
SAMPLES
RT CLOCK
RT CLOCK COUNT
PER CEIVED AND ACTU AL STA RT BIT
RXD
11111001
LSB
11 1 1
RESET RT CL OC K
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT2
RT3
RT4
RT7
RT6
RT5
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
SAMPLES
RT CLOCK
RT CLOCK COUNT
START BIT
RXD
11111010
LSB
11 1 1 1 0000000 0
NO START BIT FOUND
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
362 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
In Figure 16-22 a noise burst makes the maj or ity of data sample s RT8,
RT9, and RT10 hi gh. Th is sets the noise flag but does not rese t the RT
clock. In start bits only, the RT8, RT9, and RT10 data samples are
ignored.
Figure 16-22. Start Bit Search Example 6
16.12.4 Framing E rrors
If the data recovery logic does not detect a 1 where the stop bit should
be in an incoming frame, it sets the FE flag in SCISR1. A break frame
also sets the FE flag because a break frame has no stop bit. The FE flag
is set at the same time that th e RDRF flag is set.
16.12.5 Baud Rate Tolerance
A transmitting device may be operating at a baud rate below or above
the receiver baud rate. Accumulated bit time misalignment can cause
one of the RT8, RT9, an d R T10 stop bi t d ata sam ples t o fall o utsi de t he
stop bit. A noise error occurs if the samples are not all the same value.
If more than one of the samples is outside the stop bit, a framing error
occurs. In m ost applica tions, the baud rate to lerance i s much more than
the degree of misalignment that is likely to occur.
As the receiver samples an incoming frame, it resynchronizes the RT
clock on any valid falling edge within the frame. Resynchronization
within f ram es corr ects misa lig nmen ts betwee n tran smi tter bit time s and
receiver bit times.
RESET RT CL OC K
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT1
RT2
RT3
RT4
RT7
RT6
RT5
RT10
RT9
RT8
RT14
RT13
RT12
RT11
RT15
RT16
RT1
RT2
RT3
SAMPLES
RT CLOCK
RT CLOCK COUNT
START BIT
RXD
11111000
LSB
11 1 1 0 110
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Receiver
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 363
16.12.5.1 Slow Data Tolerance
Figure 16-23 shows how much a slow received frame can be misaligned
without causing a no ise error or a framing error. The slow st op bit begins
at RT8 instead of RT1 but arrives in ti me for the stop bit data samples at
RT8, RT9, and RT10.
Figure 16-23. Slow Data
For 8-bit data, sampling of the stop bit takes the receiver:
9bittimes×16 RT cycles + 10 RT cycles = 154 RT cycles.
With the misaligned data shown in Figure 16-23, the receiver counts
154 RT cycles at the point when the count of the transmitting device is:
9bittimes×16 RT cycles + 3 RT cycles = 147 RT cycles.
The maximum percent difference between the receiver count and the
transmitter count for slow 8-bit data with no errors is:
For 9-bit data, sampling of the stop bit takes the receiver:
10 bit times ×16 RT cycles + 10 RT cycles = 170 RT cycles.
With the misaligned data shown in Figure 16-23, the receiver counts
170 RT cycles at the point when the count of the transmitting device is:
10 bit times ×16 RT cycles + 3 RT cycles = 163 RT cycles.
The maximum percent difference between the receiver count and the
transmitter count for slow 9-bit data with no errors is:
MSB STOP
RT1
RT2
RT3
RT4
RT5
RT6
RT7
RT8
RT9
RT10
RT11
RT12
RT13
RT14
RT15
RT16
DATA
SAMPLES
RECEIVER
RT CLOCK
154 147
154
--------------------------100×4.54%=
170 163
170
--------------------------100×4.12%=
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
364 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
16.12.5.2 Fast Data Tolerance
Figure 16-24 shows h ow much a fast rece ive d frame can be misaligned
without causing a noise error or a framing error. The fast stop bit ends at
RT10 instead of RT16 but is still sampled at RT8, RT9, and RT10.
Figure 16-24. Fast Data
For 8-bit data, sampling of the stop bit takes the receiver:
9bittimes×16 RT cycles + 10 RT cycles = 154 RT cycles.
With the misaligned data shown in Figure 16-24, the receiver counts
154 RT cycles at the point when the count of the transmitting device is:
10 bit times ×16 RT cycles = 160 RT cycles.
The maximum percent difference between the receiver count and the
transmitter count for fast 8-bit data with no errors is:
For 9-bit data, sampling of the stop bit takes the receiver:
10 bit times ×16 RT cycles + 10 RT cycles = 170 RT cycles.
With the misaligned data shown in Figure 16-24, the receiver counts
170 RT cycles at the point when the count of the transmitting device is:
11 bit times ×16 RT cycles = 176 RT cycles.
The maximum percent difference between the receiver count and the
transmitter count for fast 9-bit data with no errors is:
IDLE OR NEXT FRAMESTOP
RT1
RT2
RT3
RT4
RT5
RT6
RT7
RT8
RT9
RT10
RT11
RT12
RT13
RT14
RT15
RT16
DATA
SAMPLES
RECEIVER
RT CLOCK
154 160
154
--------------------------100×3.90%=
170 176
170
--------------------------100×3.53%=
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Receiver
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 365
16.12.6 Receiver Wakeup
So that the SCI can ignore transmissions intended only for other devices
in multiple-receiver systems, the receiver can be put into a standby
state. Setting the RWU bit in SCICR2 puts the receiver into a standby
state during which receiver interrupts are disabled.
The t ransmitting d evice can ad dress messages to selected re ceivers by
including addressing information in the initial frame or frames of each
message.
The WAK E bit in SCICR1 deter mines how the SCI is brough t out of the
standby sta t e to proce ss an inco ming m essage . The W AKE bit ena bl es
either idle line wakeup or address mark wakeup.
16.12.6.1 Idle Input Line Wakeup (WAKE = 0)
When WAKE = 0, an idle condition on the RXD pin clears the RWU bit
and wakes up the receiver. The initial frame or frames of every message
contain addressing information. All receivers evaluate the addressing
info rmation, and rece ive rs for which the message is addr essed process
the frames that follow. Any receiver for which a message is not
addressed can set its RWU bit and return to the standby state. The RWU
bit remains set and the recei ver remains on standby until another idle
frame appears on the RXD pin.
Idle line wakeup requires that messages be separated by at least one
idle frame and that no message contains idle frames.
The idle frame that wakes up the receiver does not set the IDLE flag or
the RDRF flag.
The ILT bit in SCICR1 de termines wheth er the receiv er begins cou nting
logic 1s as idle frame bits after the start bit or after the stop bit.
16.12.6.2 Address Mark Wakeup (WAKE = 1)
When WAKE = 1, an address mark clears the RWU bit and wakes up the
receiv er. An addr ess mark is a 1 in the most sign ificant dat a bit posi tion.
The receiver interprets the data as address data. W hen using address
mark wakeup, the MSB of all non-address data must be 0. User code
must compare the address data to the receivers address and, if the
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
366 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
addresses match, the receiver processes the frames that follow. If the
addresse s do not mat c h, user cod e must put the receive r back to sleep
by setting the RWU bit. The RWU bit remains set and the receiver
remains on standby until another address frame appears on the RXD
pin.
The address mark clears the RWU bit before the stop bit is received and
sets the RDRF flag.
Address mark wakeup allows messages to contain idle frames but
requires that the most significant byte (MSB) be reserved for address
data.
NOTE: With the WAKE bit clear, setting the RWU bit after the RXD pin has been
idle can cause the receiver to wake up immediately.
16.13 Single-Wire Operation
Nor mally, the SCI use s t he TXD pin for transm itting and the R XD pin for
receiv ing ( LOOPS = 0, RS RC = X). In single-wire mode, th e RXD pin is
disconnected from the SCI and is available as a general-purpose I/O pin.
The SCI uses the TX D pin for both receiving and transmitting.
In single-wire mode (LOOPS = 1, RXRC = 1), setting the data directi on
bit for the TXD pin configures TXD as the output for transmitted data.
Clearing the data direction bit configures TXD as the input for received
data.
Figure 16-25. Single-Wire Operation (LOOPS = 1, RSRC = 1)
TXD SC ID DR
TXD SC ID DR
GENERAL-PURPOSE I/O
GENERAL-PURPOSE I/O
NC
TRANSMITTER
WOMS
TXD
RECEIVER
TRANSMITTER
RECEIVER
RXD
TXD
RXD
BIT = 1
BIT = 0
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Loop Operati on
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 367
Enable single-wire operation by setting the LOOPS bit and the RSRC bit
in SCICR1. Setting the LOOPS bit disables the path from the RXD pin to
the receiver. Setting the RSRC bit connects the receiver input to the
output of the TXD pin driver. Both the transmitter and receiver must be
enabled (TE = 1 and RE = 1).
The WOMS bit in the SCICR1 register configures the TXD pin for full
CMOS drive or for open-drain drive. WOMS controls the TXD pin in both
normal operation and in single-wire operation. When WOMS is set, the
DDR bit for the T XD pin does not have to b e cleared for transmitter to
receive data.
16.14 Loop Operation
In loop mode (LOOPS = 1 , RSRC = 0), the transmitter output goes to the
receiver input. The RXD pin is disconnected from the SCI and is
available as a general-purpose I/O pin.
Setting the DDR bit for the TXD pin connects the transmitter output to the
TXD pin. Clearing the data direction bit disconnects the transmitter
output fr om the TXD pi n.
Figure 16-26. Loop Operation (LOOPS = 1, RSRC = 0)
TXD
WOMS
TXD SCIDDR
TXD SCIDDR
GENE RA L - P URP O SE I/O
GENE RA L - P URP O SE I/O
H
TRANSMITTER
RECEIVER
TRANSMITTER
RECEIVER
WOMS
RXD
RXD
TXD
BIT = 1
BIT = 0
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
368 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
Enab le l oop oper ation by sett ing the LOOPS bit a nd cle aring the RSRC
bit in SCICR1. Setting the LOOPS bit disables the path from the RXD pin
to the receiver . Clearing the RSRC bit connects the tra nsmitter o utput to
the receiver input. Both the transmitter and receiver must be enabled
(TE = 1 and RE = 1).
The WOMS bi t in SC ICR1 confi gures t he TXD pi n for full CMOS drive or
for open-drain drive. WOMS controls the TXD pin during both normal
operation and loop operation.
16.15 I/O Ports
The SCIPORT register is associated with two pins:
The TXD pin is connected to SCIPORT1.
The RXD pin is connected to SCIPORT0.
The SCI data direction register (SCIDDR) configures the p in s as inputs
or outputs. The SCI pullup and reduced drive register (SCIPURD)
controls pin drive capability and enables or disables pullups. The WOMS
bit in SCICR1 configur es output ports as full CMOS drive outputs or as
open-drain outputs.
Table 16-9. SCI Port Control Sum mary
Pullup Enable Control Reduced Drive Control Wired- OR Mode Control
Register Bit Reset
State Register Bit Reset
State Register Bit Reset
State
SCIPURD PUPSCI 0 SCIPURD RDPSCI 0 SCICR1 WOMS CMOS
drive
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Communications Interface Modules (SCI1 and SCI2)
Reset
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Communications Interface Modules (SCI1 and SCI2) 369
16.16 Reset
Rese t initial izes t he S CI r egister s to a known startu p sta te as described
in 16.7 Memory Map and Registers.
16.17 Interrupts
Table 16-10 lists the five interrupt requests associated with each S CI
module.
16.17.1 Transmit Data Register Empty
The TDRE flag is set when the transmit shift register receives a byte from
the SCI data register. It signals that SCIDRH and SCIDRL are empty and
can receive new data to transmit. If the TIE bit in SCICR2 is also set,
TDRE generates an interrupt request. Clear TDRE by reading SCISR1
and then writing to SCIDRL. Reset sets TDRE.
16.17.2 Transmission Complete
The TC flag is set when TDRE = 1 and no data, preamble, or break
frame is being transmitted. It signa ls that no tr ansmissio n is in progr ess.
If the TCIE bit is set in SCICR2, TC generates an interrupt request.
When TC is set, the TX D pin is idle (lo gic 1). T C is cleared a utomatically
whe n a data, pream ble, or bre ak frame is queue d. Clear TC by readi ng
SCIS R1 w ith TC set and th en writing to the SCIDR L register . TC cannot
be cleared while a transmission is in progress.
Table 16-10. SCI Interrupt Request Sources
Source Flag Enable Bit
Transmitter TDRE TIE
TC TCIE
Receiver
RDRF RIE
OR RIE
IDLE ILIE
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
370 Serial Communications Interface Modules (SCI1 and SCI2) MOTOROLA
Serial Communications Interface Modules (SCI1 and SCI2)
16.17.3 Receive Data Register Full
The RDRF flag is set when the data in the receive shift register transfers
to S CID RH and SCIDRL. It signals t hat t he r eceived data is a vail able t o
be read . If the RIE bit is set in SCICR2, RDRF generates an interrupt
request. Clear RDRF by reading SCISR1 and then reading SCIDRL.
16.17.4 Idle Receiver Input
The IDLE flag is set when 10 (if M = 0) or 11 (if M = 1) consecutive
logic 1s appear on the receiver input. This signals an idle condition on
the receiver input. If the ILIE bit in SCICR2 is set, IDLE generates an
interrupt request. Once IDLE is cleared, a valid frame must again set the
RDRF flag before an idle condition can set the IDLE flag. Clear IDLE by
reading SCISR1 with IDLE set and then reading SCIDRL.
16.17.5 Overrun
The OR flag is set if data is not read from SCIDRL before the receive
shift register receives the stop bit of the next frame. This signals a
receiver overrun condition. If the RIE bit in SCICR2 is set, OR generates
an interrupt request. The data in the shift register is lost, but the data
already in SCIDRH and SCIDRL is not affected. Clear OR by reading
SCISR1 and then reading SCIDRL.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Peripheral Interface Module (SPI) 371
Technical Data MMC2107
Section 17. Serial Peripheral Interface Module (SPI)
17.1 Contents
17.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .372
17.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .372
17.4 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373
17.5 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373
17.6 Signal Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374
17.6.1 MISO (Master In/Slave Out). . . . . . . . . . . . . . . . . . . . . . . .374
17.6.2 MOSI (Master Out/Slave In). . . . . . . . . . . . . . . . . . . . . . . .374
17.6.3 SCK (Serial Clock) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
17.6.4 SS (Slave Select). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
17.7 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .375
17.7.1 SPI Control Register 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . .376
17.7.2 SPI Control Register 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . .378
17.7.3 SPI Baud Rate Register. . . . . . . . . . . . . . . . . . . . . . . . . . .379
17.7.4 SPI Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .381
17.7.5 SPI Data Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .382
17.7.6 SPI Pull up and Reduced Drive Register . . . . . . . . . . . . . .383
17.7.7 SPI Port Data Register. . . . . . . . . . . . . . . . . . . . . . . . . . . .384
17.7.8 SPI Port Data Direction Register . . . . . . . . . . . . . . . . . . . .385
17.8 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .386
17.8.1 Master Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .387
17.8.2 Slave Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .387
17.8.3 Transmission Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . .388
17.8.3.1 Transfer Format When CPHA = 1 . . . . . . . . . . . . . . . . .388
17.8.3.2 Transfer Format When CPHA = 0 . . . . . . . . . . . . . . . . .390
17.8.4 SPI Baud Rate Generation. . . . . . . . . . . . . . . . . . . . . . . . .393
17.8.5 Slave-Select Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .393
17.8.6 Bidirectional Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .394
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
372 Serial Peripheral Interface Module (SPI) MOTOR OLA
Serial Peripheral Interface Module (SPI)
17.8.7 Error Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .395
17.8.7.1 Write Collision Error. . . . . . . . . . . . . . . . . . . . . . . . . . . .395
17.8.7.2 Mode Fault Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .395
17.8.8 Low-Power Mode Options . . . . . . . . . . . . . . . . . . . . . . . . .396
17.8.8.1 Run Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .396
17.8.8.2 Doze Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .396
17.8.8.3 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .396
17.9 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .397
17.10 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .397
17.10.1 SPI Interrupt Flag (SPIF) . . . . . . . . . . . . . . . . . . . . . . . . . .397
17.10.2 Mode Fault (MODF) Fl ag . . . . . . . . . . . . . . . . . . . . . . . . . .397
17.2 Introduction
The serial peripheral interface (SPI) module allows full-duplex,
synchronous, serial communication between the microcontroller unit
(MCU ) and peripheral device s. S oftwar e ca n p oll the SPI statu s flag s or
SPI operation can be interrupt driven.
17.3 Features
Features include:
Master mode and slave mode
Wired-OR mode
Slave-select output
Mode fault error flag with central processor unit (CPU) interrupt
capability
Double-buffered operation
Serial clock with programmable polarity and phase
Control of SPI operation during doze mode
Reduced drive control for lower power consumption
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Peripheral Interface Module (SPI)
Modes of Op eration
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Peripheral Interface Module (SPI) 373
17.4 Modes of Operation
The SPI functions in these three modes:
1. Run mode Run mode is the normal mode of operation.
2. Doze mode Doze mode is a configurable low-power mode.
3. S top mode The SPI is inactive in stop mode.
17.5 Blo ck Diag r am
Figure 17-1. SPI Block Diagram
MSTR
SWOM
SSOE
LSBFE
SPISDOZ SPC0
SPIF
WCOL
MODF
256128643216842 DIVIDER
BAUD RATE SELECT
BAUD RATE GENERATOR
SHIFT REGISTER
SHIFT
SPIPORT
MISO
MOSI
SCK
SS
CONTROL
CLOCK
CONTROL
PIN
CONTROL
SPI
CONTROL
SPR[2:0]SPPR[6:4] MSTR
CPOL
CPHA
MSTR
SPI DATA R EGI ST ER
SPIE
SPE
RDPSP
PUPSP
DDRSP[7:0]
IP INTERFACE
SPI
INTERRUPT
REQUEST
SPI CLOCK
MSB LSB
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
374 Serial Peripheral Interface Module (SPI) MOTOR OLA
Serial Peripheral Interface Module (SPI)
17.6 Signal Description
An overview of the signals is provided in Table 17-1.
17.6.1 MISO (Master In/Slave Out)
MISO is one of the two SPI data pins.
In maste r mode, MISO is th e data input. In slave mode, MISO is the data
output and is three-stated until a master drives the SS input pin low.
In bidirectional mode, a slave MISO pin is the SISO pin (slave in/slave
out).
In a multiple-master system, all MISO pins are tied together.
17.6.2 MOSI (Master Out/Slave In)
MOSI is one of the two SPI data pins.
In master mode, MOSI is the data output. In slave mode, MOSI is the
data input.
In bidirectional mode, a master MOSI pin is the MOMI pin (master
out/master in).
In a multiple-master system, all MOSI pins are tied together.
Table 17-1. Signal Properties
Name Port Function(1)
1. The SPI por ts (MI SO, MOSI, SCK, and SS) are gener al-pu rpose I /O p orts whe n the SPI is
disabled (SPE = 0).
Reset State
MISO SPIPORT0 Master data in/slave data out 0
MOSI SPIP ORT 1 M as ter data out/slave data in 0
SCK SPIPORT2 Serial clock 0
SS SPIPORT 3 S lave select 0
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Peripheral Interface Module (SPI)
Memory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Peripheral Interface Module (SPI) 375
17.6.3 SCK (Serial Clock)
The SCK pin is the serial clock pin for synchronizing transmissions
between master and slave devices. In master mode, SCK is an output.
In slave mode, SCK is an input.
In a multiple-master system, all SCK pins are tied together.
17.6.4 SS (Slave Select)
In master mode, the SS pin can be:
A mode-fault input
A general-purpose input
A general-purpose output
A slave-select output
In slave mode, the SS pin is always a slave-select input.
17.7 Memory Map and R egisters
Table 17-2 shows the SPI memory map.
NOTE: Reading reserved addresses (0x00cb_004 and 0x00cb_0009 through
0x00cb_000b) and unimplemented addresses (0x00cb_000c through
0x00cb_000f) returns 0s. Writing to unimplemented addresses has no
effect. Accessing u nimplemente d addre sses does not gene rate an error
response. Table 17-2. SPI Memory Map
Address Bits 7–0 Access(1)
1. S/U = CPU superv isor or us er mode access. User mode acc esses to supervi sor only
addresses have no effect and result in a cycle termination transfer error.
0x00cb_0000 SPI control register 1 (SPICR1) S/U
0x00cb_0001 SPI control register 2 (SPICR2) S/U
0x00cb_0002 S P I baud rate register (SPIBR) S /U
0x00cb_0003 SPI status register (SPISR) S/U
0x00cb_0005 SPI data register (SPIDR) S/U
0x00cb_0006 SP I pullup and reduced drive register (SPIP URD) S /U
0x00cb_0007 SPI port data register (S PIPORT) S/U
0x00cb_0008 SPI port data dir ection register (SPIDDR) S/U
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
376 Serial Peripheral Interface Module (SPI) MOTOR OLA
Serial Peripheral Interface Module (SPI)
17.7.1 SPI Control Register 1
Read: Anytime
Write: Anytime
SPIE SPI Interrupt Enable Bit
The SPIE bit enabl es the SPIF and MODF fla gs to gener ate interrupt
requests. Reset clears SPIE.
1 = SPIF and MODF interrupt requests enabled
0 = SPIF and MODF interrupt requests disabled
SPE SPI System Enable Bit
The SPE bit enabl e s the SPI and ded ica tes SP I p ort pins [3 :0] to SPI
functions. When SPE is clear, the SPI system is initialized but in a
low-power disabled state. Reset clears SPE.
1 = SPI enabled
0 = SPI disabled
SWOM SPI Wired-OR Mode Bit
The SWOM bit configures the output buffers of SPI port pins [3:0] as
open-d rai n outp uts. SWOM control s SPI port pins [3:0] whet her they
are SP I outputs or general-purpose outputs. Reset clears SWOM.
1 = Output buffers of SPI port pins [3:0] open-drain
0 = Output buffers of SPI port pins [3:0] CMOS drive
Address: 0x00cb_0000
Bit 7654321Bit 0
Read: SPIE SPE SWOM MSTR CPOL CPHA SSOE LSBFE
Write:
Reset:00000100
Figure 17-2. SPI Control Regi ster 1 (SPICR1)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Peripheral Interface Module (SPI)
Memory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Peripheral Interface Module (SPI) 377
MSTR Master Bit
The MSTR bit selects SPI master mode or SPI slave mode opera tion.
Reset clears MSTR.
1 = Master mode
0 = Slave mode
CPOL Clock Polarity Bit
The CPOL bit selects an inverted or non-inverted SPI clock. To
transmit data between SPI modules, the SPI modules must have
identical CPOL values. Reset clears CPOL.
1 = Active-low clock; SCK idles high
0 = Active-high clock; SCK idles low
CPHA Clock Phase Bit
The CPHA bit delays the first edge of the SCK clock. Reset sets
CPHA.
1 = First SCK edge at start of transmission
0 = First SCK edge 1/2 cycle after start of transmission
SSOE Slave Select Output Enable Bit
The SSOE bit and the DDRSP3 bit configure the SS pin as a
general-purpose input or a slave-select output. Reset clears SSOE.
NOTE: Setting the SSOE bit disables the mode fault detect function.
LSBFE LSB-First Enable Bit
The LSBFE enables data to be transmitted LSB first. Reset clears
LSBFE.
1 = Data transmitted LSB first.
0 = Data transmitted MSB first
NOTE: In SPIDR, the MSB is always bit 7 regardless of the LSBFE bit.
Table 17-3. SS Pin I/O Configurations
DDRSP3 SSOE Master M ode Slave Mode
0 0 Mode-fault input Slave-select input
0 1 General-purpose input Slave-select input
1 0 General-purpose output Slave-select input
1 1 Slave-select output Slave-select input
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
378 Serial Peripheral Interface Module (SPI) MOTOR OLA
Serial Peripheral Interface Module (SPI)
17.7.2 SPI Control R egister 2
Read: Anytime
Write: Anytime; writing to unimplemented bits has no effect
SPISDOZ SPI Stop in Doze Bit
The S PIDOZ bit stops the SPI clocks when the CPU is in doze mode.
Reset clears SPISDOZ.
1 = SPI inactive in doze mode
0 = SPI active in doze mode
SPC0 Seri al Pin Co ntrol Bit 0
The SPC0 bit enables the bidirectional pin configurations shown in
Table 17-4. Reset clears SPC0.
Address: 0x00cb_0001
Bit 7654321Bit 0
Read: 000000
SPISDOZ SPC0
Write:
Reset:00000100
= Writes have no effect and the access terminates without a transf er error exception.
Figure 17-3. SPI Control Regi ster 2 (SPICR2)
Table 17-4. Bidirectio nal Pin Co nfigurations
Pi n Mode SPC0 MS TR MISO Pin(1) MOSI Pin (2) SCK Pin(3) SS Pin(4)
ANormal 0 0 S lave data output Slave data input SCK input Slav e-select input
B 1 M aster data input Maste r data output SCK out put MODF input (DDRSP3 = 0)
or GP output (DDRSP3 = 1)
CBidirectional 1 0 S lave data I/O GP(5) I/O S CK input Slave-se lect input
D 1 GP I/O M aste r data I/O S CK out put MODF input (DDRSP3 = 0)
or GP output (DDRSP3 = 1)
1. Slave output is enabled if SPIDDR bit 0 = 1 , SS = 0, and MSTR = 0 (A, C).
2. Ma ster output is enabled if SPI DDR bit 1 = 1 a nd MSTR = 1 (B, D).
3. SCK output is enabl ed if SPIDDR bit 2 = 1 and MSTR = 1 (B, D).
4. SS outpu t is enabled if SPIDDR bit 3 = 1, SPICR1 bit 1 (SSOE) = 1, and MSTR = 1 (B, D).
5. GP = Gener al-purpos e
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Peripheral Interface Module (SPI)
Memory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Peripheral Interface Module (SPI) 379
17.7.3 SPI Baud Rate Register
Read: Anytime
Write: Anytime; writing to unimplemented bits has no effect
SPPR[6:4] SPI Baud Rate Preselection Bits
The SPPR[6:4] and S PR[2:0] bits select the SPI clock divisor as
shown in Table 17-5. Reset clears SPPR[6:4] and SPR[2:0], selecting
an SPI clock divisor of 2.
SPR[2:0] SPI Baud Rate Bits
The SPPR[6:4] and S PR[2:0] bits select the SPI clock divisor as
shown in Table 17-5. Reset clears SPPR[6:4] and SPR[2:0], selecting
an SPI clock divisor of 2.
NOTE: Writing to SPIBR during a transmission may cause spurious results.
Address: 0x00cb_0002
Bit 7654321Bit 0
Read: 0 SPPR6 SPPR5 SPPR4 0SPR2 SPR1 SPR0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 17-4. SPI Baud Rate Register (SPIBR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
380 Serial Peripheral Interface Module (SPI) MOTOR OLA
Serial Peripheral Interface Module (SPI)
Table 17-5. SPI Baud Rate Selection (33-MHz Module Clock)
SPPR[6:4] SPR[2:0] SPI Clock
Divisor Bau d Rate SPPR[6:4] S PR[ 2 : 0 ] SPI Clock
Divisor Ba ud Rate
000 000 2 16.5 MHz 100 000 10 3.3 MHz
000 001 4 8.25 MHz 100 001 20 1.65 MHz
000 010 8 4. 125 MH z 100 010 40 825 M H z
000 011 16 2.06 MHz 100 011 80 412.5 kHz
000 100 32 1.03 MHz 100 100 160 206.25 kHz
000 101 64 515.62 kHz 100 101 320 103.13 kHz
000 110 128 257.81 kHz 100 110 640 51. 56 kHz
000 111 256 128.9 kHz 100 111 1280 25.78 kHz
001 000 4 8.25 MHz 101 000 12 2.75 MHz
001 001 8 4.12 MHz 101 001 24 1.375 MHz
001 010 16 2.06 MHz 101 010 48 687.5 kHz
001 011 32 1.03 MHz 101 011 96 343.75 kHz
001 100 64 515.62 kHz 101 100 192 171.88 kHz
001 101 128 257.81 kHz 101 101 384 85. 94 kHz
001 110 256 128.9 kHz 101 110 768 42.97 kHz
001 111 512 64.45 kHz 101 111 1536 21.48 kHz
010 000 6 5.5 MHz 110 000 14 2. 36 M Hz
010 001 12 2.75 MHz 110 001 28 1.18 MHz
010 010 24 1. 375 MH z 110 010 56 589.29 kHz
010 011 48 687.5 kHz 110 011 112 296. 64 kHz
010 100 96 343.75 kHz 110 100 224 147.32 kHz
010 101 192 171.88 kHz 110 101 448 73. 66 kHz
010 110 384 85.94 kHz 110 110 896 36.83 kHz
010 111 768 42.97 kHz 110 111 1792 18.42 kHz
011 000 8 4.13 MHz 111 000 16 2.06 MHz
011 001 16 2.06 MHz 111 001 32 1.03 MHz
011 010 32 1.03 MHz 111 010 64 515.63 kHz
011 011 64 515.63 kHz 111 011 128 257.81 kHz
011 100 128 257.81 kHz 111 100 256 128.91 kHz
011 101 256 128.91 kHz 111 101 512 64. 45 kHz
011 110 512 64.45 kHz 111 110 1024 32.23 kHz
011 111 1024 32.23 k Hz 111 111 2048 16.11 kHz
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Peripheral Interface Module (SPI)
Memory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Peripheral Interface Module (SPI) 381
17.7.4 SPI Status Register
Read: Anytime
Write: Has no meaning or effect
SPIF SPI Interrupt Flag
The SPIF flag is set after the eighth SCK cycle in a transmission when
received data transfers from the shift register to SPIDR. If the SPIE bit
is also set, S PIF g enerates a n interru pt request . Once S PIF is set, n o
new data can be transferred into SPIDR until SPIF is cleared. Clear
SPIF by reading SP ISR with SPIF set and then accessing SPIDR.
Reset clears SPIF.
1 = New data available in SPIDR
0 = No new data available in SPIDR
WCOL Write Collision Flag
The WCOL flag is set when software writes to SPIDR during a
transmission. Clear WCOL by reading SPISR with WCOL set and
then accessing SPIDR. Reset clears WCOL.
1 = Write collision
0 = No write collision
MODF Mode Fault Flag
The MODF flag is set when the SS pin of a master SPI is driven low
and the SS pin is configured as a mode-fault input. If the SPIE bit is
also set, MODF generates an interrupt request. A mode fault clears
the SPE, MSTR, and DDRSP[2:0] bits. Clear MODF by reading
SPISR with MODF set and then writing to SPICR1. Reset clears
MODF.
1 = Mode fault
0 = No mode fault
Address: 0x00cb_0003
Bit 7654321Bit 0
Read: SPIF WCOL 0 MODF 0000
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 17-5. SPI Status Register (SPISR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
382 Serial Peripheral Interface Module (SPI) MOTOR OLA
Serial Peripheral Interface Module (SPI)
17.7.5 SPI Data Register
Read: Anytime; normally read only after SPIF is set
Write: Anytime; see WCOL
SPIDR is both the input and output register for SPI data. Writing to
SPIDR while a transmission is in progress sets the WCOL flag and
disa bles the attempted write. Rea d SPIDR after the S PIF fla g is set and
before the end of the next transmission. If the SPIF flag is not serviced
before a new byte enters the shift register, the new byte and any
successive b ytes a re lost. T he byte alre ady in the SPIDR remains there
until SPIF is serviced.
Address: 0x00cb_0005
Bit 76 54321Bit 0
Read: BIT 7654321BIT 0
Write:
Reset:00000000
Figure 17-6. SPI Data Register (SPIDR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Peripheral Interface Module (SPI)
Memory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Peripheral Interface Module (SPI) 383
17.7.6 SPI Pullup and Reduced Drive Register
Read: Anytime
Write: Anytime; writing to unimplemented bits has no effect
RSVD5 and RSVD1 Reserved
Writin g to these re ad/w rite bits upda tes th ei r va lues b ut h as no effe ct
on functionality.
RDPSP SPI Port Reduced Drive Control Bit
1 = Reduced drive cap ability on SPIPORT bits [7:4]
0 = Full drive enabled on SPIPORT bits [7:4]
PUPSP SPI Port Pullup Enable Bit
1 = Pullup devices enabled for SPIPORT bits [3:0]
0 = Pullup devices disabled for SPIPORT bits [3:0]
Address: 0x00cb_0006
Bit 7654321Bit 0
Read: 0 0 RSVD5 RDPSP 00
RSVD1 PUPSP
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transf er error exception.
Figure 17-7. SPI Pullup and Reduced Drive Register (SPIPURD)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
384 Serial Peripheral Interface Module (SPI) MOTOR OLA
Serial Peripheral Interface Module (SPI)
17.7.7 SPI Port Data Register
Read: Anytime
Write: Anytime
RSVD[7:4] Reser ved
Writin g to these re ad/w rite bits upda tes th ei r va lues b ut h as no effe ct
on functionality.
PORTSP[3:0] SPI Port Data Bits
Data written to SPIPORT drives pins only when they are configured
as general -pu rpose outputs.
Reading an input (DDRSP bit clear) returns the p in level; read ing an
output (DDRSP bit set) returns the pin driver input level.
Writing to any of the PORTSP[3:0] pins does not change the pin state
when the pin is configured for SPI output.
SPIPORT I/O function depends upon the state of the SPE bit in
SPICR1 and the state the DDRSP bits in SPIDDR.
Address: 0x00cb_0007
Bit 7654321Bit 0
Read: RSVD7 RSVD6 RSVD5 RSVD4 PORTSP3 PORTSP2 PORTSP1 PORTSP0
Write:
Reset:00000000
Pin function: SS SCK MOSI/
MOMI MISO/
SISO
Figure 17-8. SPI Por t Data Register (SPIPORT)
Table 17-6. SPI Port Summary
Pullup Enable Control Reduced Drive Control Wired-OR
Mode C on t rol
Register Bit Reset
State Register Bit Reset
State Register Bit Reset
State
SPIPURD PUPSP 0 SPIPURD RDPSP[1:0] Full drive SPICR1 SWOM Normal
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Peripheral Interface Module (SPI)
Memory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Peripheral Interface Module (SPI) 385
17.7.8 SPI Port Data Direction Reg ister
Read: Anytime
Write: Anytime
RSVD[7:4] Reser ved
Writin g to these re ad/w rite bits upda tes th ei r va lues b ut h as no effe ct
on functionality.
DDRSP[3:0] Data Direction B its
The DDRSP[3:0] bits control the data direction of SPIPORT pins.
Reset clears DD RSP[3:0].
1 = Corresponding pin configured as output
0 = Corresponding pin configured as input
In slave mode , DDRSP3 has no meaning or effect. In master mode,
DDRSP3 determines whether SPI port pin 3 is a mode-fault input, a
general-purpose output, or a slave-select output.
NOTE: When the SPI is enabled (SPE = 1), the MISO, MOSI, and SCK pins:
Are inputs if their SPI functions are input functions regardless of
the state of their DDRSP bits.
Are outputs if their SPI functions are output functions only if their
DDRSP bits are set.
Address: 0x00cb_0008
Bit 7654321Bit 0
Read: RSVD7 RSVD6 RSVD5 RSVD4 DDRSP3 DDRSP2 DDRSP1 DDRSP0
Write:
Reset:00000000
Pin function: SS SCK MOSI/
MOMI MISO/
SISO
Figure 17-9. SPI Port Data Direction Registe r (SPIDDR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
386 Serial Peripheral Interface Module (SPI) MOTOR OLA
Serial Peripheral Interface Module (SPI)
17 .8 Fun cti on al Descr ipti o n
The SPI module allows full-duplex, synchronous, serial communication
between the MCU and peripheral devices. Software can poll the SPI
status flags or SPI operation can be interrupt driven.
Setting the SPE bit in SPICR1 enables the SPI and dedicates four SPI
port pins to SPI functions:
Slave select (SS)
Serial clock (SCK)
Master out/slave in (MOSI)
Master in/slave out (MISO)
When the SPE bit is clear, the SS, SCK, MOSI, and MISO pins are
general-purpose I/O pins controlled by SPIDDR.
The 8-bit shift register in a master SPI is linked by the MOSI and MISO
pin s to t he 8- bit sh if t re gister in the sl ave. The linked shi ft r egister s for m
a di stribu ted 1 6-bit regi ste r. In an SPI tr ansmiss ion, th e S CK clo ck fro m
the master shifts the data in the 16-bit register eight bit positions, and the
master and slave exchange data. Data written to the master SPIDR
register is the output data to the slave. After the exchange, data read
from the master SPIDR is the input data from the slave.
Figure 17-10. Full-Duplex Operation
SHIFT REGISTER
SHIFT REGI ST ER
BAUD RAT E
GENERATOR
MASTER SPI SLAVE SPI
VDD
MOSI MOSI
MISO MISO
SCK SCK
SS SS
SPIDRSPIDR
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Peripheral Interface Module (SPI)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Peripheral Interface Module (SPI) 387
17.8.1 Master Mod e
Setting the MSTR bit in SPICR1 puts the SPI in master mode. Only a
master SPI can initiate a transmission. Writing to the master SPIDR
begi ns a tra nsmission . If the sh i ft regi ster is em pty, the byte t ransf ers t o
the shift register and begins shifting out on the MOSI pin under the
control of the master SCK clock. The SCK clock starts one-hal f SCK
cycle after writing to SPIDR.
The SPR[2:0] and SPPR[6:4] bits in SPIBR control the baud rate
generator and determin e the speed of the shift registe r. The SCK pin is
the SPI clock output. Through the SCK pin, the baud rate generator of
the master controls the shift register of the slave.
The MSTR bit in SPICR1 and the SPC0 bit in SPICR2 control the
function of the data pins, MOSI and MISO.
The SS pin is normally an input that remains in the inactive high state.
Setting the DDRSP3 bit in SPIDDR configures SS as an output. The
DDRSP3 bit and the SSOE bit in SPICR1 can configure SS for
general-purpose I/O, mode fault detection, or slave selection.
See Table 17-3.
The S S output g oes l ow dur ing each transmission an d is high when the
SPI is in the idle state. Driving the master SS input low sets the MODF
flag in SPISR, indicating a mode fault. More than one master may be
trying to drive the MOSI and SCK lines simultaneously. A mode fault
clears the data direction bits of the MISO, MOSI (or MOMI), and SCK
pin s to make them inputs. A mode faul t also clears the SPE and MSTR
bits in SPICR1. If the SPIE bit is also se t, the MODF flag generates an
interrupt request.
17.8.2 Slave Mode
Clear ing t he M ST R bit in S PICR1 puts t he S P I in sla ve mode. The SCK
pin is the SPI clock input from the master, and the SS pin is the
slave-select input. For a transmission to occur, the SS pin must be driven
low and remain low until the transmission is complete.
The MSTR bit and the SPC0 bit in SPICR2 control the function of the
data pi ns, MOSI and MISO. The SS input al so con trols the M ISO pin. If
SS is low, the MSB i n the shift reg ister shi fts ou t on the MISO pin. If S S
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
388 Serial Peripheral Interface Module (SPI) MOTOR OLA
Serial Peripheral Interface Module (SPI)
is high, the MISO pin is in a high impedance state, and the slave ignores
the SCK input.
NOTE: When using peripherals with full-duplex capability, do not simultaneously
enable two receivers that drive the same MISO output line.
As long as only one slave drives the master input line, it is possible for
several slaves to receive the same transmission simultaneously.
If the CPHA bit in SPICR1 is clear, odd-numbered edges on the SCK
input latch the data on the MOSI pin. Even-numbered edges shift the
data int o th e LS B po sit ion o f the SPI shift registe r a nd sh ift the MSB ou t
to the MISO pin.
If the CPHA bit is set, even -numbere d edges on the SCK input l atch the
data on the MOSI pin. O dd-n umbe red e dges shift the dat a i nto the LSB
position of the SPI shift register and shift the MSB out to the MISO pin.
The transmission is complete after the eighth shift. The received data
transfers to SPIDR, setting the SPIF flag in SPISR.
17.8.3 Transmission For mats
The CP HA and CPOL bi ts in SPICR 1 select one of fo ur combinatio ns of
serial clock phase and polarity. Clock phase and polarity must be
ide ntical for the master SPI devic e and the communi cating slave device.
17.8.3.1 Transfer Format When CPHA = 1
Some peripherals require the first SCK edge to occur before the slave
MSB becomes available at its MISO pin. When the CPHA bit is set, the
master SPI waits for a synchronization delay of one-half SCK clock
cycle. Then it issues the first SCK edge at the beginning of the
transmissi o n. The first ed ge cause s the sl ave to transm it its MS B to the
MISO pin of t he master. The second edge and the following
even-numbered edges latch the data. The third edge and the following
odd-numbered edges shift the latched slave data into the master shift
register and shift master data out on the master MOSI pin.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Peripheral Interface Module (SPI)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Peripheral Interface Module (SPI) 389
After the 16th and final SCK edge:
Data that was in the master S PIDR registe r is in the sl ave SPIDR.
Data that was in the slave SPIDR register is in the master SPIDR.
The S CK clock sto ps and the SPIF fl ag in SPISR is set, ind icating
that the transm i ssion is com plete. If the S P IE bit i n SP CR1 is set,
SPIF generates an interrupt request.
Figure 17-11 shows the timi ng of a transmi ssion with the CPHA bit set.
The SS pin of the master must be either high or configured as a
general-purpose output not affecting the SP I.
Figure 17-11. SPI Clock Format 1 (CPHA = 1)
tL
BEGIN TRANSMISSION END TRANSMISSION
SCK (CPO L = 0)
SAMP LE IN PU T
CHANGE OUTPUT
SS PIN OUTPUT
SCK (CPO L = 1)
MSB FIRST (LSBF E = 0):
L S B FIRS T ( L SB FE = 1) : MSB
LSB LSB
MSB
BIT 5
BIT 2
BIT 6
BIT 1 BIT 4
BIT 3 BIT 3
BIT 4 BIT 2
BIT 5 BIT 1
BIT 6
CHANGE OUTPUT
SLAVE SS PI N
MOSI PIN
MISO PIN
MASTER ONLY
MOSI/MISO
tT
IF NEXT TRANSFER BEGINS HERE
FOR tT, tL, t l
MINIMUM 1/2 SCK
tItL
tL = Minimum leading time before the first SCK edge
tT = Minimum trailing time after the last SCK edge
tI = Minimum idling time between transmissions (minimum SS high time)
tL, tT, and tI are guara nteed for ma ster mode and re quired for slave mode.
Legend:
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
390 Serial Peripheral Interface Module (SPI) MOTOR OLA
Serial Peripheral Interface Module (SPI)
When CP HA = 1, the slave SS line can remain low between bytes. T his
format is good for systems with a single master and a single slave driving
the MISO data line.
Writing to SPIDR while a transmission is in progress sets the WCOL flag
to indicate a write collision and inhibits the write. WCOL does not
generate an interrupt request; the SPIF interrupt request comes at the
end of the transfer that was in progress at the time of the error.
17.8.3.2 Transfer Format When CPHA = 0
In som e p eri phe rals, the sl ave MSB is availabl e a t its MIS O p in a s soon
as the slave is selected. When the CPHA bit is clear, the master SPI
delays its first SCK edge for half a SCK cycle after the transmission
starts. The first edge and all following odd-numbered edges latch the
slave data. Even- numb ered SCK edges sh ift slave data i nt o the ma ster
shift register and shift master data out on the master MOSI pin.
After the 16th and final SCK edge:
Data that was in the master SPIDR is in the slave SPIDR. Data
that was in the slave SPIDR is in the master SPIDR.
The S CK clock sto ps and the SPIF fl ag in SPISR is set, ind icating
that the transm i ssion is com plete. If the S P IE bit i n SP CR1 is set,
SPIF generates an interrupt request.
Figure 17-12 shows the timing of a transmission with the CPHA bit clear.
The SS pin of the master must be either high or configured as a
general-purpose output not affecting the SP I.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Peripheral Interface Module (SPI)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Peripheral Interface Module (SPI) 391
Figure 17-12. SPI Clock Format 0 (CPHA = 0)
When CPHA = 0, the slave SS pin must be negated and reasserted
between bytes.
NOTE: Clock skew between the master and slave can cause data to be lost
when:
CPHA = 0, and,
The baud rate is the SPI clock divided by two, and
The master SCK frequency is half the slave SPI clock frequency,
and
Software writes to the slave SPIDR just before the synchronized
SS signal goes low.
tL
BEGIN TRANSMISSION END TRANSMISSION
SCK (CPO L = 0)
SAMPLE INPUT
CHANGE OU T PU T
SS PIN OUTPU T
SCK (CPO L = 1)
MSB FIRST (LSBFE = 0):
LSB F IRS T (LSBFE = 1): MSB
LSB LSB
MSB
Bit 5
Bit 2
Bit 6
Bit 1 Bit 4
Bit 3
Bit 3
Bit 4 Bit 2
Bit 5 Bit 1
Bit 6
CHANGE OU T PU T
SLAVE SS PIN
MOSI PIN
MISO PIN
MA S TER ONLY
MOSI/MISO
tT
IF NEXT TRA NS FER BEGI N S HE RE
FOR tT, tL, tl
MINIMUM 1/2 SCK
tItL
tL = Minimum leading time before the first SCK edge
tT = Mi nimum trail ing time after the last SCK edge
tI = Minimum idling time bet ween t ransmissions (minimum SS high time)
tL, tT, and tI a r e gu ar a nt eed for ma s t er mo de and re qu ir e d for sl av e mo de.
Legend:
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
392 Serial Peripheral Interface Module (SPI) MOTOR OLA
Serial Peripheral Interface Module (SPI)
Figure 17-13. Transmission Error Due to Master/Slave Clock Skew
The synchronized SS signal is synchronized to the SPI clock.
Figure 17-13 shows an example with the synchronized SS signal almost
a full SPI clock cycle late. While the synchronized SS of the slave is high,
writing is allowed even though the SS pin is already low. The write can
change the MISO pin while the master is sampling the MISO line. The
fir st bit of t he tr ansfe r m ay n ot be stab le w hen the ma ster samp les it, so
the byte sent to the master may be corrupted.
Also, if the sl ave gener ates a lat e write, i ts stat e machin e may no t have
time to reset, causing it to incorrectly receive a byte from the master.
This error is most likely when the SCK frequency is half the slave SPI
clock frequency. At other baud rates, the SCK skew is no more than one
SPI clock, and there is more time between the synchronized SS signal
and the first SCK edge. For example, with a SCK frequency one-fourth
SCK (CPOL = 0)
SAMP LE I
CHA NG E O
CHA NG E O
SS PIN (I )
SPI CLOCK
SS SYNCHRONIZED
MISO PIN
SPIDR W RIT E
TO SPI CLOC K
MOSI/MISO
MOSI PIN
MISO PIN
SCK (CPOL = 1)
THIS CYCLE
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Peripheral Interface Module (SPI)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Peripheral Interface Module (SPI) 393
the slave S PI clock frequency, t here are t wo SPI clocks b etween the fall
of S S and the SCK edge.
As lon g as another late SPIDR wri te do es no t occur , th e fo llow ing byt es
to and fr om the slave are correctly transmitted.
17.8.4 SPI Baud Rate Generation
The baud rate generator divides the SPI clock to produce the SPI baud
clock. The SPPR[6:4] and SPR[2:0] bits in SPIBR select the SPI clock
divisor:
SPI clock divisor = (SPPR + 1) × 2(SPR+1)
where:
SPPR = the value written to bits SPPR[6:4]
SPR = the value written to bits SPR[2:0]
The baud rate generator is active only when the S PI is in master mode
and transm itting. Oth erwise, the divide r is inactive to redu ce IDD current.
17.8.5 Slave-Select Output
The slave-select output feature automatically drives the SS pin low
during transmission to select external devices and drives it high during
idle to deselect external devices. When SS output is selected, the SS
output pin is connected to the SS input pin of the external device.
In master mode only, setting the SSOE bit in SPICR1 and the DDRSP[3]
bit in SPIDDR configures the SS pin as a slave-select output.
Setting the SSOE bit disables the mode fault feature.
NOTE: Be careful when using the slave-select output feature in a multimaster
system. The mode fault feature is not available for detecting system
errors between masters.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
394 Serial Peripheral Interface Module (SPI) MOTOR OLA
Serial Peripheral Interface Module (SPI)
17.8.6 Bidirectional Mode
Setting the SPC0 bit in SPICR1 selects bidirectional mode (see
Table 17-7). The SPI uses only one data pin for the interface with
external device(s). The MSTR bit determines which pin to use. In master
mode, the MOSI pin is the master out/master in pin, MOMI. In slave
mode, t he MISO pin is the slave out/slave i n pin, S ISO. The MI SO pin in
master mode and M OSI pin i n slave mo de are gen eral-purp ose I/O pi ns.
The dir ection of e ach da ta I/O pin d epend s on its dat a direct io n reg ister
bit. A pin configured as an output is the output from the shift register. A
pin configured as an input is the input to the shift register, and data
coming out of the shift register is discarded.
The SCK pin is an output in master mode and an input in slave mode.
The SS pin can be an input or an output in master mode, and it is always
an input in slave mode.
In bidirectional mode, a mode fault does not clear DDRSP0, the data
direction bit for the SISO pin.
Table 17-7. Normal Mode and Bidir ectional Mode
SPE = 1 Master Mod e, MS TR = 1 Slave Mo de, MSTR = 0
Normal Mode
SPC0 = 0
SWOM enables open drain output. SWOM enables open drain output.
Bidir e ct ional Mode
SPC0 = 1
SWOM enables open drain output.
SPI port pin 0 is general-pu rpose I/O. SWO M enab les open drain output.
SPI port pin 1 is general -purpose I/O.
SPI
MOSI
MISO
DDRSP1
SERIAL OUT
SERIAL IN
SPI
MOSI
MISO
SERIAL IN
SERIAL OUT
DDRSP0
SPI
MOMI
SPI PORT
DDRSP1
SERIAL OUT
SERIAL IN PIN 0
SPI
SISO
DDRSP0
SERIAL IN
SERIAL OUT
SPI PORT
PIN 1
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Peripheral Interface Module (SPI)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Peripheral Interface Module (SPI) 395
17.8.7 Error Conditions
The SPI has two error conditions:
Write collision error
Mode fault error
17.8.7.1 Write Collision Error
The WCOL flag in SPIS R indicat es that a ser ial tra nsfer was in pr ogress
when the MCU tried to write new data to SPIDR. Valid write times are
listed below (see Figu re 17-1 1 and Figure 17-12 for definitions of tT
and tI):
In master mode, a valid write is within tI (when SS is high).
In slave phase 0, a valid write within tI (when SS is high).
In slave phase 1, a valid write is within tT or tI (after the last SCK
edge and before SS goes low), excluding the first two SPI clocks
after the last SCK edge (the beginning of tT is an illegal write).
A write during any other time causes a WCOL error. The write is disabled
to avoid writing over the data being transmitted. WCOL does not
genera te an interrupt request because the WCOL flag can be read upon
completion of the transmission that was in progress at the time of the
error.
17.8.7.2 Mode Fault Error
If the SS input of a master SPI goes low, it indicates a system error in
which more than one master may be trying to drive the MOSI and SCK
lines simultaneously. This condition is not permitted in normal ope ration;
it sets the MODF flag in SPISR. If the SPIE bit in SPICR 1 is also set,
MODF generates an interrupt request.
Configuring the SS pin as a general-purpose output or a slave-select
output disables the mode fault function.
A mode fault clears the SPE and MSTR bits and the DDRSP bits of the
SCK, MISO, and MOSI (or MOMI) pins. This forces those pins to be
high-impedance inputs to avoid any conflict with another output driver.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
396 Serial Peripheral Interface Module (SPI) MOTOR OLA
Serial Peripheral Interface Module (SPI)
If the mo de fault error occurs in bidirectional mode, the DDRSP bit of the
SISO pin is not affected, since it is a general-purpose I/O pin.
17.8.8 Low-Power Mode Options
This subsection describes the low-power mode options.
17.8.8.1 Run Mode
Clearing the SPE bit in SPICR1 puts the SPI in a disabled, low-power
state. SP I registers are accessible, but SPI clocks are disabled.
17.8.8.2 Doze Mode
SPI operation in doze m ode depen ds on the stat e of th e SPISDOZ bi t in
SPICR2.
If SPISDOZ is clear, the SP I operates normally in doze mode.
If SPISDOZ is set, the SPI clock stops, and the SPI enters a
low-power state in doze mode.
Any master transmission in progress stops at doze mode entry
and resumes at doze mode exit.
Any slave transmission in progress continues if a master
continues to drive the slave SCK pin. The slave stays
synchronized to the master SCK clock.
NOTE: Although the slave shift register can receive MOSI data, it cannot
transfer data to SPIDR or set the SPIF flag in doze or stop mode. If the
slave enters doze mode in an idle state and exits doze mode in an idle
state, SPIF remains clear and no transfer to SPIDR occurs.
17.8.8.3 Stop Mode
SPI operation in stop mode is the same as in doze mode with the
SPISDOZ bit set.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Serial Peripheral Interface Module (SPI)
Reset
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Serial Peripheral Interface Module (SPI) 397
17.9 Reset
Rese t initial izes the SPI re gisters t o a know n startu p state as descr ibed
in 17 .7 Mem ory Map and Re gist ers. A tr ansmission from a slave after
reset an d befo re w ritin g to the SPID R re gister i s eit her i nd eter minate or
the byte last received from the master before the reset. Reading the
SPIDR after reset returns 0s.
17.10 Interrupts
17.10.1 SPI Interrupt Flag (SPIF)
SPIF is set after the eighth SCK cycle in a transmission when received
data tr ansfers fr om the sh ift register to SPIDR. If the SPIE bit is also set,
SPIF generates an interrupt request. Once SPIF is set, no new data can
be transferred into SPIDR until SPIF is cleared. Clear SPIF by reading
SPISR with SPIF set and then accessing SPIDR. Reset clears SPIF.
17.10.2 Mode Fault (MODF) Flag
MODF is set when the SS pi n of a master SPI is driven low and the SS
pin is confi gured as a mode- fault inp ut. If the SPIE bit is also set, MODF
generates an interrupt request. A mode fault clears the SPE, MSTR, and
DDRSP[2:0] bits. Cl ear MODF by reading SPISR with MODF set and
then writing to SPICR1. Reset clears MODF.
Table 17-8. SPI Interrupt Request Sources
Interrupt Request Flag Enable Bit
Mode fault MODF SPIE
Transmission complete S PIF
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
398 Serial Peripheral Interface Module (SPI) MOTOR OLA
Serial Peripheral Interface Module (SPI)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Queued Analog-to-Digital Converter (QADC) 399
Technical Data MMC2107
Section 18. Queued Analog-to-Digital Conver ter (QADC)
18.1 Contents
18.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .401
18.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .402
18.4 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .403
18.5 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .404
18.5.1 Debug Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .404
18.5.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .405
18.6 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .405
18.6.1 Port QA Pin Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . .406
18.6.1.1 Port QA Analog Input Pins. . . . . . . . . . . . . . . . . . . . . . .406
18.6.1.2 Port QA Digital Input/Output Pins . . . . . . . . . . . . . . . . .407
18.6.2 Port QB Pin Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . .407
18.6.2.1 Port QB Analog Input Pins. . . . . . . . . . . . . . . . . . . . . . .407
18.6.2.2 Port QB Digital Input Pins . . . . . . . . . . . . . . . . . . . . . . .407
18.6.3 External Trigger Input Pins. . . . . . . . . . . . . . . . . . . . . . . . .408
18.6.4 Multiplexed Address Output Pins. . . . . . . . . . . . . . . . . . . .408
18.6.5 Multiplexed Analog Input Pins . . . . . . . . . . . . . . . . . . . . . .409
18.6.6 Voltage Reference Pins . . . . . . . . . . . . . . . . . . . . . . . . . . .409
18.6.7 Dedicated Analog Supply Pins. . . . . . . . . . . . . . . . . . . . . .409
18.7 Memory Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .409
18.8 Register Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .411
18.8.1 QADC Module Configuration Register . . . . . . . . . . . . . . . .411
18.8.2 QADC Test Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .412
18.8.3 Port Data Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .412
18.8.4 Port QA Data Direction Register . . . . . . . . . . . . . . . . . . . .414
18.8.5 Control Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .416
18.8.5.1 Control Register 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .416
18.8.5.2 Control Register 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .419
18.8.5.3 QADC Control Register 2. . . . . . . . . . . . . . . . . . . . . . . .422
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
400 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.8.6 Status Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .427
18.8.6.1 QADC Status Register 0 . . . . . . . . . . . . . . . . . . . . . . . .427
18.8.6.2 QADC Status Register 1 . . . . . . . . . . . . . . . . . . . . . . . .436
18.8.7 Conversion Command Word Table . . . . . . . . . . . . . . . . . .437
18.8.8 Result Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .441
18.8.8.1 Right-Justified Unsigned Result Register. . . . . . . . . . . .441
18.8.8.2 Left-Justified Signed Result Register. . . . . . . . . . . . . . .442
18.8.8.3 Left-Justified Unsigned Result Register. . . . . . . . . . . . .442
18.9 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .443
18.9.1 QADC Bus Accessing . . . . . . . . . . . . . . . . . . . . . . . . . . . .443
18.9.2 External Multiplexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . .443
18.9.2.1 External Multiplexing Operation. . . . . . . . . . . . . . . . . . .443
18.9.2.2 Module Version Options. . . . . . . . . . . . . . . . . . . . . . . . .444
18.9.2.3 External Multiplexed Address Configuration . . . . . . . . .446
18.9.3 Analog Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .446
18.9.3.1 Analog-to-Digital Converter Operation. . . . . . . . . . . . . .446
18.9.3.2 Conversion Cycle Times . . . . . . . . . . . . . . . . . . . . . . . .446
18.9.3.3 Channel Decode and Multiplexer. . . . . . . . . . . . . . . . . .448
18.9.3.4 Sample Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .448
18.9.3.5 Digital-to-Analog Converter (DAC) Array. . . . . . . . . . . .449
18.9.3.6 Comparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .449
18.9.3.7 Bias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .449
18.9.3.8 Successive-Approximation Register . . . . . . . . . . . . . . .449
18.9.3.9 State Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .450
18.10 Digital Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .450
18.10.1 Queue Priority Timing Examples. . . . . . . . . . . . . . . . . . . .450
18.10.1.1 Queue Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .451
18.10.1.2 Queue Priority Schemes . . . . . . . . . . . . . . . . . . . . . . . .453
18.10.2 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .465
18.10.3 Scan Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .466
18.10.4 Disabled Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .467
18.10.5 Reserved Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .467
18.10.6 Single-Scan Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .467
18.10.6.1 Software-Initiated Single-Scan Mode. . . . . . . . . . . . . . .468
18.10.6.2 External Trigger Single-Scan Mode. . . . . . . . . . . . . . . .469
18.10.6.3 External Gated Single-Scan Mode. . . . . . . . . . . . . . . . .470
18.10.6.4 Interval Timer Single-Scan Mode. . . . . . . . . . . . . . . . . .470
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Introduction
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 401
18.10.7 Continuous-Scan Modes . . . . . . . . . . . . . . . . . . . . . . . . . .472
18.10.7.1 Software-Initiated Continuous-Scan Mode. . . . . . . . . . .473
18.10.7.2 External Trigger Continuous-Scan Mode. . . . . . . . . . . .474
18.10.7.3 External Gated Continuous-Scan Mode . . . . . . . . . . . .474
18.10.7.4 Periodic Timer Continuous-Scan Mode . . . . . . . . . . . . .475
18.10.8 QADC Clock (QCLK) Generation. . . . . . . . . . . . . . . . . . . .476
18.10.9 Periodic/Interval Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . .480
18.10.10 Conversion Command Word Table . . . . . . . . . . . . . . . . . .481
18.10.11 Result Word Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .485
18.11 Pin Connection Considerations . . . . . . . . . . . . . . . . . . . . . . .486
18.11.1 Analog Reference Pins. . . . . . . . . . . . . . . . . . . . . . . . . . . .486
18.11.2 Analog P ower Pins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .486
18.11.3 Conversion Timing Schemes . . . . . . . . . . . . . . . . . . . . . . .488
18.11.4 Analog Supply Filtering and Grounding . . . . . . . . . . . . . . .490
18.11.5 Accommodating Positive/Negative Stress Conditions . . . .494
18.11.6 Analog Input Considerations . . . . . . . . . . . . . . . . . . . . . . .495
18.11.7 Analog Input Pins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .497
18.11.7.1 Settling Time for the External Circuit . . . . . . . . . . . . . . .498
18.11.7.2 Error Resulting from Leakage . . . . . . . . . . . . . . . . . . . .499
18.12 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .500
18.12.1 Interrupt Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .500
18.12.2 Interrupt Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .501
18.2 Introduction
The queued analog-to-digital converter (QADC) is a 10-bit, unipolar,
successive approximation converter. A minimum of eight analog input
channels can be supported using internal multiplexing. A maximum of 18
input channels can be supported in the expanded, externally multiplexed
mode. The actual number of ch annels depends upon the number of pins
available to the QADC module.
The QADC consists of an analog front-end and a digital control
subsystem, which includes an IPbus interface block.
The analog section includes input pins, an analog multiplexer, and
sample and hold analog circuits. The analog conversion is performed by
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
402 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
the digital-to-analog converter (DAC) resistor-capacitor (RC) array and
a high-g ain compara tor.
The digi ta l control sect io n contain s queue contro l log ic to sequen ce the
conversion process and interrupt generation logic. Also included are the
periodic/interval timer, control and status registers, the conversion
command word (CCW) table, random-access memory (RAM), and the
result table RAM.
The bus interface unit (BIU) allows the QADC to operate with the
applications software through the IPbus environment.
18.3 Features
Features of the QADC module include:
Internal sample and hold
Up to eight analog input channels using internal multiplexing
Directly supports up to four external multiplexers (for example, the
MC14051)
Up to 18 total input channels with internal and external
multiplexing
Programmable input sample time for various source impedances
Two conversion command queues with a total of 64 entries
Sub-queues possible using pause mechanism
Queue comp l ete and pau se software inte rrupts availabl e on both
queues
Queue po inters indicate current location for each queue
Automated queue modes initiated by:
External edge trigger and gated trigger
Periodic/interval timer, within QADC module [queues 1 and 2]
Software command
Single-scan or continuous-scan of queues
64 result registers
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Block Diagram
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 403
Output da ta readable in three formats:
Right-justified unsigned
Left-justified signed
Left-justified unsigned
Unused analog channels can be used as digital ports
18.4 Blo ck Diag r am
Figure 18-1. QADC Block Diagram
DIGITAL
EXTERNAL
EXTERNAL
REFERENCE
ANALOG POWER
64-ENTRY QUEUE
CONTROL
OF 10-B IT
CONVERSION
COMMAND WO RDS
IP
INTERFACE
10-BIT
ANALOG-TO-DIGITAL
CONVERTER
ANAL OG IN PU T MUX
AND DIGITAL
PIN FUNCTIONS
64-ENTR Y TABLE
OF 10-B IT
10-BIT TO 16-BIT
RESULT ALIGNMENT
8 ANALOG CHANNELS
MUX ADDRESS
TRIGGERS INPUTS
INPUTS
(CCWs) RESULTS
(4 GPIO)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
404 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.5 Modes of Operation
This subsection describes the two modes of operation:
Debug mode
Stop mode
18.5.1 Debug Mode
If the QD BG bit in the m odule configur ation regi ster (QADCMCR ) is set,
then the QADC enters debug mode when background debug mode is
enabled and a breakpoint is processed.
When in debug mode and the QDBG bit is set, the QADC finishes any
conversion in progress and then freezes. Depending on w hen debug
mode is asserted, the three possible queue freeze scenarios are:
When a queue is not executing, the QADC freezes immediately.
When a queue is executing, the QADC completes the current
conversion and then freezes.
If during the execution of the current conversion, the queue
operating mode for the active queue is changed, or a queue 2
abort occurs, the QADC freezes immediately.
When the QADC enters debug mode while a queue is active, the current
CCW location of the queue pointer is saved.
Debug mode:
Stops the analog clock
Holds the periodic/interval timer in reset
Prevents external trigger events from being captured
Keeps all QADC registers and RAM accessible
Although the QADC saves a pointer to the next CCW in the current
queue, the software can for ce the QADC to execute a diffe rent CCW by
writi ng new queue operating modes for normal operation. The QADC
loo ks at the que ue opera ting modes, t he curren t queue po inter, and any
pending trigger events to decide which C CW to execute.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Signals
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 405
18.5.2 Stop Mode
The QADC enters a low-power idle state whenever the QSTOP bit is set
or the part is in stop mode.
QADC stop:
Disable s the analog-to- digital converter, effect ively turning off the
analog circuit.
Aborts the conversion sequence in progress
Changes t he da ta dir ection r egister (DDRQA), port data registe rs
(PORTQA and PORTQB), control registers (QACR2, QACR1, and
QACR0) and the status registers (QASR1 and QASR0) to
read- onl y. On ly the mod ul e con figura ti on r egister (Q ADCMCR ) is
writable.
Causes the RAM to not be accessible, can not read valid results
from RAM (result word table and CCW) nor write to the RAM
(result word table and CCW).
Resets QACR1, QACR2, QASR0, and QASR1
Holds the QADC periodic/interval timer in reset
Becau se the bia s current s to the analo g circuit a re turn ed off in stop, the
QADC re quires some recov e ry ti m e (tSR) to stab ilize the a nal og circuits.
18.6 Signals
The QADC uses the external p ins shown in Figure 18-2. There are eight
channel/port pins that can support up to 18 channels when external
multiplexing is used (including internal channels). All of the channel pins
can al so be used as g ener al-pu rpose digi tal po rt pins. In addition, the re
are also two anal og reference pins and two analog submodule power
pins.
The QADC has external trigger inputs and the multiplexer outputs
combined onto some of the channel pins.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
406 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.6.1 Port QA Pin Functions
The fou r port QA pi ns can be used as a nalog inputs or as a bidirectional
4-bit digital input/output port.
18.6.1.1 Port QA Analog Input Pins
When used as analog inputs, the four port QA pins are referred to as
AN[56:55, 53:52]. Due to the digital output drivers associated with
port QA, the analog characteristics of port QA may be different from
those of port QB.
Figure 18-2. QADC Input and Output Signals
AN52/MA0/PQA0
AN53/MA1/PQA1
AN55/ETRIG1/PQA3
AN56/ETRIG2/PQA4
AN0/ANW/PQB0
AN1/ANX/PQB1
AN2/ANY/PQB2
AN3/ANZ/PQB3
DIGITAL
ANALOG
VSSI
ANALO G POWER AND GR OU ND
INTERNAL DIGITAL POWER
PORT QB
CONVERTER RESULTS
AND
CONTROL
ANALOG
MUX AND
PORT QB ANALOG INP UTS
EXTERNAL MUX INPUTS
DIGITAL INPUTS
PORT QA ANALOG INP UTS
EXTERNAL TRIGGER INPUTS
EXTERNAL MUX ADD RE SS OU TP UTS
VDDI
VSSA
VDDA
VRH
VRL
ANAL O G REFE RE NCE S
SHARED WITH OTHE R MOD UL ES
DIGITAL I/O
PORT LOGIC
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Signals
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 407
18.6.1.2 Port QA Digital Input/Output Pins
Port QA pins are referred to as PQA[4:3, 1:0] when used as a
bid irectiona l 4-bit digita l input/ou tput po rt. Th ese four pins may be used
for general-purpose digital input signals or digital output signals.
Port QA pins are conne cted to a digital in put synchro nizer dur ing read s
and may be used as general-purpose digital inputs when the applied
voltages meet high-voltage input (VIH) and low-voltage input (VIL)
requirements.
Each port QA pin is configured as an input or output by programming the
upper half of the port data direction register (DDRQA). The digita l in put
signal states are read by the software in the upper half of the port data
register when the port data direction register specifies that the pins are
inputs. The digital data in the port data register is driven onto the port QA
pins when the corresponding bit in the port data direction register
specifies output. Since the outputs are configured as output drivers,
ext erna l pullup pr ovis ions ar e no t necessa ry when the ou tput i s use d to
drive another integrated circuit.
18.6.2 Port QB Pin Functions
The fou r port QB pi ns can be used as analog input s or as an 4-b it digital
input-only port.
18.6.2.1 Port QB Analog Input Pins
When used as analog inputs, the four port QB pins are referred to as
AN[3:0]. Since port QB functions as analog and digital input only, the
analog characteristics may be different from those of port QA.
18.6.2.2 Port QB Digital Input Pins
Port QB pins are referred to as PQB[3:0] when used as an 4-bit di gital
input only port. In addition to functioning as analog input pins, the port
QB pins are also connected to the input of a synchronizer during reads
and may be used as general-purpose digital inputs when the applied
voltages meet VIH and VIL requirements.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
408 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Since port QB pins are input only, a data direction register is not
necessary. Th e digital i nput signal sta tes are r ead by the software i n the
lower half of the port data register.
18.6.3 Extern al Trigger Input Pins
The QADC uses two e xterna l tr igger pins (E TRIG[2 :1]). Each of t he two
input external trigger pins is associated with one of the scan queues,
queue 1 or queue 2. The assign ment of E TRIG[2 :1] to a queu e is ma de
in QACR0 by the TRG bit. When TRG = 0, ETRIG1 triggers queue 1 and
ETRIG2 triggers queue 2. When TRG = 1, ETRIG1 triggers queue 2 and
ETRIG2 triggers queue 1.
18.6.4 Multiplexed Address Output Pins
In the non-multiplexed mode, the eight channel pins are connected to an
inte rnal multipl exer which r outes the an alog sign als into t he internal A /D
converter.
In the externa lly multiplexed mode, the QADC allows automatic channel
selection through up to four external 4-to-1 selector chips. The QADC
provides a 2-bit multiplexed address output to the external multiplex
chips to allow selection of one of four inputs. The multiplexed address
output si gnals (M A[1: 0]) can be used as multip lexed address outpu t bits
or as general-purpose I/O.
MA[1:0] are used as the address inputs for one to two dual 4-channel
multiplexer chips. Since the MA[1:0] pins are digital outputs in the
multiplexed mode, the software programmed input/output direction for
the multiplexed address pins in the data direction register is superseded.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Memory Map
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 409
18.6.5 Multiplexed Analog Input Pins
In the external multi p lexed m ode, four of the por t QB pins a re r edefin ed
to each represent four input channels. See Table 18-1.
18.6.6 Voltage Reference Pins
VRH an d VRL are the d edicated input pins for the high an d low re ference
voltages. Separating the reference inputs from the power supply pins
allows for additional external filtering, which increa ses reference voltage
precision and stability, and subsequen tly contributes to a higher degree
of conversion accuracy.
18.6.7 Dedicated Analog Supply Pins
VDDA and VSSA pins supply power to the analog subsystems of the
QADC module. Dedicated power is required to isolate the sensitive
analog circuitry from the normal levels of noise present on the digital
power supply.
18.7 Memory Map
The QADC occupies 1 Kbyte, or 512 16-bit entries, of address space.
Ten 16-bit registers are control, port, and status registers, 64 16-bit
entries are the CCW table, and 64 16-bit entries are the result table
which occupies 192 16-bit address locations because the result data is
readable in three data alignment formats. Table 18-2 is the QADC
memory map.
Table 18-1. Multiplexed Analog Input Channels
Multiplexed
Analog Input Channels
ANw Even numbered channels from 0 to 6
ANx Odd numbered channels from 1 to 7
ANy Even channels from 16 to 22
ANz Odd channels from 17 to 23
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
410 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Table 18-2. QADC Memory Map
Address MSB LSB Access(1)
0x00ca_0000 QADC module configuration register (QADCMCR) S
0x00ca_0002 QADC test register (QADCTEST)(2) S
0x00ca_0004 Reserved(3)
0x00ca_0006 Port QA data register (PORTQA) Port QB data register (PORTQB) S/U
0x00ca_0008 Port QA data direction register (D DRQA ) S/U
0x00ca_000a QADC control register 0 (QACR0) S/U
0x00ca_000c QADC control register 1 (QACR1) S/U
0x00ca_000e QADC control register 2 (QACR2) S/U
0x00ca_0010 QADC status register 0 (QASR0) S/U
0x00ca_0012 QADC status register 1 (QASR1) S/U
0x00ca_0014
0x00ca_01fe Reserved(3)
0x00ca_0200
0x00ca_027e Conversion command word table (CCW) S/U
0x00ca_0280
0x00ca_02fe Right just i fie d, unsigned result register (RJURR) S/U
0x00ca_0300
0x00ca_037e Le ft justified, si gned result register (LJSRR) S/U
0x00ca_0380
0x00ca_03fe Left just ified, unsigned result regi ster (LJURR) S/U
1. S = CPU supervisor mode access onl y. S/U = CPU supervisor or us er mode access. User mode accesses to super visor
only addresses have no effect and result in a cycle termination transfer error.
2. Access results in the module generati ng an access term ination transfer error if not in test mode.
3. Read/wr ites have no effect and t he access termina tes wit h a tran sfer error exception.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 411
18.8 Register Descriptions
This subsection describes the QADC registers.
18.8.1 QADC Module Config uration Register
The QADCMCR contains fields and bits that control freeze and stop
modes and determines the privilege level required to access most
registers.
QSTOP Stop Enable Bit
1 = Forces QADC to idle state
0 = QADC is not forced to idle state
QDBG — Debug Enable Bit
1 = F inish any conver sion in progr ess, then free zes in debug m ode
0 = Ign ore r equest to enter debug mode a nd continu e conver sions
SUPV Supervisor/Unrestricted Data Space Bit
1 = Only supervisor mode access allowed; user mode accesses
have no effect and result in a cycle termination transfer error
0 = Supervisor and user mode accesses allowed
Address: 0x00ca_0000 and 0x00ca_0001
Bit 15 14 13 12 11 10 9 Bit 8
Read: QSTOP QDBG 000000
Write:
Reset:00000000
Bit 7654321Bit 0
Read: SUPV 0000000
Write:
Reset:10000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 18-3. QADC Module Configuration Register (QADCMCR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
412 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.8.2 QADC Test Register
QADCTE ST is used only dur ing fa ctory testi ng of th e MCU. Atte mpts to
access this reg iste r outside of factory test mode will result in access
privilege violation.
18.8.3 Port Data Registers
QADC ports A and B are a ccessed throu gh two 8-bi t port data registe rs
(PORTQA and PORTQB).
Port QA pins are referred to as PQA[4:3, 1:0] when used as a
bidirectional, 4-bit, input/output port that may be used for
general-purpose digital input signals or digital output signals. Port QA
can also be used for analog inputs (AN[56:55, 53:52]), external trigger
inputs ( ETRIG[2:1 ]), and external multiplexe r addre ss outputs (MA[1:0 ]).
Port QB pins are referred to as PQB[3:0] when used as an input-only,
4-bit, digital port that may be used for general-purpose digital input
signals. Data for PQB[3:0] is accessed from PORTQB. Port QB can also
be us ed for non-m ultiplexed (AN[ 3:0]) and multi plexed (ANz, ANy, ANx,
ANw) analog inputs.
PORTQA and PORT QB are not initialized by reset.
Address: 0x00ca_0002 and 0x00ca_0003
Bit 15 14 13 12 11 10 9 Bit 8
Read: Access results in the module generating an access termination transfer error if not in test mode.
Write:
Bit 7654321Bit 0
Read: Access results in the module generating an access termination transfer error if not in test mode.
Write:
Figure 18-4 . QADC Test Register (QADCTEST)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 413
Read: Anytime
Write: Anytime except stop mode
Address: 0x00ca_0006
Bit 7654321Bit 0
Read: 0 0 0 PQA4 PQA3 0PQA1 PQA0
Write:
Reset: 0 0 0 P P 0 P P
= Writes have no effect and the access terminates without a transfer error exception.
P = Current pin state if DDR is input, otherwise undefined
Analog Channel :
Muxed Address Outputs:
External Trigger Inputs:
AN56
ETRIG2
AN55
ETRIG1
AN53
MA1 AN52
MA0
Figure 18-5. QADC Port QA Data Register (PORTQA)
Address: 0x00ca_0007
Bit 7654321Bit 0
Read: 0 0 0 0 PQB3 PQB2 PQB1 PQB0
Write:
Reset:0000PPPP
= Writes have no effect and the access terminates without a transfer error exception.
P = Current pin state if DDR is input, otherwise undefined
Analog Channel :
Muxed Analog Inputs: AN3
AN2 AN2
ANy AN1
ANx AN0
ANw
Figure 18-6. QADC Port QB Data Register (PORTQB)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
414 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.8.4 Port QA Data Direction Register
The port data direction register (DDRQA) is associated with the port QA
digital I/O pins. The bidirectional pins may have somewhat higher
leakage and capacitance specifications. Any bit in this register set to 1
configures the corresponding pin as an output. Any bit in this register
clea red to 0 configu res t he cor resp onding pi n a s an input. The software
is responsible for ensuring that DDR bits are not set to 1 on pins used for
analog inputs. When the DDR bit is set to 1 and the pin is selected for
analog conversion, the voltage sampled is that of the output digital driver
as influenced by the load.
When the MUX (externally multiplexed) bit is set in QACR0, the data
direction register settings are ignored for the bits corresponding to
PQA[1:0], the two multiplexed address (MA[1:0]) output pins. The
MA[1:0] pins are forced to be digital outputs, regardless of the data
direction setting, and the multiplexed address outputs are driven. The
data returned during a port data register read is the value of MA[1:0],
regardless of the data direction setting.
Similarly, when the external trigger pins are assigned to port pins and
external trigger queue operating mode is selected, the data direction
setting for the corresponding pins, PQA3 or PQA4, is ignored. The port
pin s are for ced to be d igital inpu ts for ETRIG1 and/o r ETRIG2. T he data
driven during a port data register read is the actual value of the pin,
regardless of the data direction setting.
NOTE: Use caution when mixing digital and analog inputs. They should be
isolated as much as possible. Rise and fall times should be as large as
possible to minimize ac coupling effects.
Since port QB is input-only, a data direction register is not needed.
Therefore, the lower byte of the port data direction register is not
implemented.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 415
Read: Anytime
Write: Anytime except stop mode
Address: 0x00ca_0008 and 0x00ca_0009
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0 0 0 DDQA4 DDQA3 0DDQA1 DDQA0
Write:
Reset:00000000
Bit 7654321Bit 0
Read: 0 0 000000
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 18-7. QADC Port QA Data Direct ion Register (DDRQA)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
416 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.8.5 Control Registers
This subsection describes the QADC control registers.
18.8.5.1 Control Register 0
Control register 0 (QACR0) establishes the QCLK with prescaler
parameter fields and defines whether external multiplexing is enabled.
They are typically written once when the software initializes the QADC
and not changed afterward.
Read: Anytime
Write: Anytime except stop mode
MUX Externally Multiplexed Mode Bit
The MUX bit allows the software to select the externally multiplexed
mode, which affects the interpretation of the channel numbers and
forces the MA[1:0] pins to be outputs.
1 = Externally multiplexed, 18 possible channels
0 = Internally multiplexed, eight possible channels
Address: 0x00ca_000a and 0x00ca_000b
Bit 15 14 13 12 11 10 9 Bit 8
Read: MUX 00
TRG 000
PSH8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: PSH7 PSH6 PSH5 PSH4 PSA PSL2 PSL1 PSL0
Write:
Reset:00110111
= Writes have no effect and the access terminates without a transfer error exception.
Figure 18-8. QADC Control Register 0 (QACR0)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 417
TRG Trigger Assignment Bit
The TRG bit allows the softw are to assign the ETRIG[2:1] pins to
queue 1 and queue 2.
1 = ETRIG1 triggers queue 2, ETRIG2 triggers queue 1
0 = ETRIG1 triggers queue 1, ETRIG2 triggers queue 2
PSH[8:4] Prescaler Clock High Ti me Field
The PSH field selects the QCLK high time in the prescaler.
See Section 22. Electrical Specifications for operating
clock frequency (fQCLK) values. To keep the QCLK within the spe cified
range, the PSH field selects the high time of the QCLK, which can
range from 1 to 32 system clock cycles. The minimum high time for
the QCLK is specified as tPSH. Table 18-3 displays the bits in PSH field
which enable a range of QCLK high times.
Table 18-3. Prescaler Clock High Times
PSH[8:4] Q CLK High Time PSH[8:4] Q CLK High Time
00000 1 syst em clock cycle 1 0000 17 s ystem clock cycles
00001 2 system clock cycles 10001 18 system clock cycles
00010 3 system clock cycles 10010 19 system clock cycles
00011 4 system clock cycles 10011 20 system clock cycles
00100 5 system clock cycles 10100 21 system clock cycles
00101 6 system clock cycles 10101 22 system clock cycles
00110 7 system clock cycles 10110 23 system clock cycles
00111 8 system clock cycles 10111 24 system clock cycles
01000 9 system clock cycles 11000 25 system clock cycles
01001 10 s ystem clock cycles 1 1001 26 system clock cycles
01010 11 s ystem clock cycles 1 1010 27 system clock cycles
01011 12 s ystem clock cycles 1 1011 28 system clock cycles
01100 13 s ystem clock cycles 1 1100 29 system clock cycles
01101 14 s ystem clock cycles 1 1101 30 system clock cycles
01110 15 s ystem clock cycles 1 1110 31 system clock cycles
01111 16 s ystem clock cycles 1 1111 32 system clock cycles
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
418 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
PSA Prescaler Add Clock Tick Bit
PSA is maintained for software compatibility but has no functional
benefit to this version of the module.
PSL[2:0] Prescaler Clock Low Time Field
The PSL field selects the QCLK low time in the prescaler.
See Section 22. Electrical Specifications for fQCLK values.
To keep the QCLK within the specified range, the PSL field selects the
low time of the QCLK, which can range from one to eight system clock
cycles. The minimum low time for the clock is specified as tPSL.
Table 18-4 displays the bits in PSL field which enable a range of
QCLK low times.
Table 18-4. Prescaler Clock Low Times
PSL [2 :0 ] Q C LK Lo w Ti m e
000 1 system clock cycle
001 2 system clock cycles
010 3 system clock cycles
011 4 system clock cycles
100 5 system clock cycles
101 6 system clock cycles
110 7 system clock cycles
111 8 system clock cycles
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 419
18.8.5.2 Control Register 1
Control register 1 (QACR1) is the mode control register for the o peration
of queue 1. The applications software defines the queue operating mode
for th e queue and may enable a completio n and/or pause interrupt. Mo st
of the bits are typically written once when the software initializes the
QADC and not changed afterward.
Stop mode resets the register ($0000)
Read: Anytime
Write: Anytime except stop mode
CIE1 Queue 1 Completion Interrupt Enable Bit
CIE1 ena bl es an inter rupt upon com pletion of qu eue 1. T he i nterr upt
request is initiated when the conversion is complete for the CCW in
queue 1.
1 = Enable interrupt after the conversion of the sample requested
by the last CCW in queue 1
0 = Disable queue 1 completion interrupt
Address: 0x00ca_000c and 0x00ca_000d
Bit 15 14 13 12 11 10 9 Bit 8
Read: CIE1 PIE1 0MQ112 MQ111 MQ110 MQ19 MQ18
Write: SSE1
Reset:00000000
Bit 7654321Bit 0
Read: 0 0 000000
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 18-9. QADC Control Register 1 (QACR1)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
420 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
PIE1 Queue 1 Pause Interrupt Enable Bit
PIE 1 ena bles an inter rupt w hen q ueue 1 en ters th e pa use stat e. T he
interrupt request is initiated when conversion is complete for a CCW
that has the pause bit set.
1 = Enable an interrupt after an end-of-conversion for queue 1
which has the pause bit set.
0 = Disable the pause interrupt associated with queue 1.
SSE1 Queue 1 Single-Scan Enable Bit
SSE1 enables a single-scan of queue 1 to start after a trigger event
occurs. The SSE1 bit may be set to a 1 during the same write cycle
whe n the MQ 1 bits are set for on e of th e singl e-scan qu eue ope rating
modes. Th e sin gle-scan enable bi t can be written as a 1 or a 0, but is
always read as a 0, unless a test mode is selected. The SSE1 bit
enables a trigger event to initiate queue execution for any single-scan
operation on queue 1.The QADC clears the SSE1 bit when the
single-scan is complete.
1 = Accept a trigger event to start queue 1 in a single-scan mode.
0 = Tr igger events are not accepted for single-scan modes.
MQ1[12:8] Queue 1 Operating Mode Field
The MQ1 field selects the queue operating mode for queue 1.
Table 18-5 shows the bits in the MQ1 field which enable different
queue 1 operating modes.
Table 18-5. Queue 1 Oper ating Modes
MQ1[12:8] Opera t ing Mode
00000 Disabled mo de, conversions do not occur
00001 Software-triggered single-scan mode (started with SSE 1)
00010 External-trigger rising-edge single-scan mode
00011 External-trigger falling-edge single-scan mode
00100 Interval timer single-scan mode: time = QCLK period × 27
00101 Interval timer single-scan mode: time = QCLK period × 28
00110 Interval timer single-scan mode: time = QCLK period × 29
00111 Interval timer single-scan mode: time = QCLK period × 210
01000 Interval timer single-scan mode: time = QCLK period × 211
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 421
01001 Interval timer single-scan mode: time = QCLK period × 212
01010 Interval timer single-scan mode: time = QCLK period × 213
01011 Interval timer single-scan mode: time = QCLK period × 214
01100 Interval timer single-scan mode: time = QCLK period × 215
01101 Interval timer single-scan mode: time = QCLK period × 216
01110 Interval timer single-scan mode: time = QCLK period × 217
01111 Externally gated single-scan mod e (started wit h SSE1)
10000 Reserved m ode
10001 Software- triggered continuous-scan mode
10010 External-trigger rising-edge continuou s-scan mo de
10011 External-trigger falling-edge continuous-scan mode
10100 Periodic timer continuous-scan mode: time = QCLK period × 27
10101 Periodic timer continuous-scan mode: time = QCLK period × 28
10110 Periodic timer continuous-scan mode: time = QCLK period × 29
10111 Periodic timer continuous-scan mode: time = QCLK period × 210
11000 Periodic timer continuous-scan mode: time = QCLK period × 211
11001 Periodic timer continuous-scan mode: time = QCLK period × 212
11010 Periodic timer continuous-scan mode: time = QCLK period × 213
11011 Periodic timer continuous-scan mode: time = QCLK period × 214
11100 Periodic timer continuous-scan mode: time = QCLK period × 215
11101 Periodic timer continuous-scan mode: time = QCLK period × 216
11110 Periodic timer continuous-scan mode: time = QCLK period × 217
11111 Externally gated continuous-scan mode
Table 18-5. Queue 1 Operating Modes (Continued)
MQ1[12:8] Opera t ing Mode
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
422 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.8.5.3 QADC Control Register 2
Control register 2 (QACR2) is the mode control register for the o peration
of queue 2. Software specifies the queue operating mode of queue 2
and may enable a completion and/or a pause interrupt. Most of the bits
are typically written once when the software initializes the QADC and not
changed afterward.
Stop mode resets the register ($007f)
Read: Anytime
Write: Anytime except stop mode
CIE2 Queue 2 Completion Software Interrupt Enable Bit
CIE2 ena bl es an inter rupt upon com pletion of qu eue 2. T he i nterr upt
request is initiated when the conversion is complete for the CCW in
queue 2.
1 = Enable an interrupt after an end-of-conversion for queue 2.
0 = Disable the queue completion interrupt associated with
queue 2.
Address: 0x00ca_000e and 0x00ca_000f
Bit 15 14 13 12 11 10 9 Bit 8
Read: CIE2 PIE2 0MQ212 MQ211 MQ210 MQ29 MQ28
Write: SSE2
Reset:00000000
Bit 7654321Bit 0
Read: RESUME BQ26 BQ25 BQ24 BQ23 BQ22 BQ21 BQ20
Write:
Reset:01111111
Figure 18-10. QADC Control Regis ter 2 (QACR2)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 423
PIE2 Queue 2 Pause Software Interrupt Enable Bit
PIE 2 ena bles an inter rupt w hen q ueue 2 en ters th e pa use stat e. T he
interrupt request is initiated when conversion is complete for a CCW
that has the pause bit set.
1 = Enable an interrupt after an end-of-conversion for queue 2
which has the pause bit set.
0 = Disable the pause interrupt associated with queue 2.
SSE2 Queue 2 Single-Scan Enable Bit
SSE2 enables a single-scan of queue 2 to start after a trigger event
occurs. The SSE2 bit may be set to a 1 during the same write cycle
whe n the MQ 2 bits are set for on e of th e singl e-scan qu eue ope rating
modes. Th e sin gle-scan enable bi t can be written as a 1 or a 0, but is
always read as a 0, unless a test mode is selected. The SSE2 bit
enables a trigger event to initiate queue execution for any single-scan
operation on queue 2. The QADC clears the SSE2 bit when the
single-scan is complete.
1 = Accept a trigger event to start queue 2 in a single-scan mode.
0 = Tr igger events are not accepted for single-scan modes.
MQ2[12:8] Queue 2 Operating Mode Field
The MQ2 field selects the queue operating mode for queue 2.
Table 18-6 shows the bits in the MQ2 field which enable different
queue 2 operating modes.
Table 18-6. Queue 2 Oper ating Modes
MQ2[12:8] Operating Modes
00000 Disabled mode, conversions do not occur
00001 Software triggered single-scan mode (started with SSE2)
00010 External trigger rising edge single-scan m ode
00011 Ext ernal trigger falling edge single-scan mode
00100 I nt erval timer single-scan mode: time = Q C LK period x 27
00101 I nt erval timer single-scan mode: time = Q C LK period x 28
00110 I nt erval timer single-scan mode: time = Q C LK period x 29
00111 I nt erval timer single-scan mode: time = Q C LK period x 210
01000 I nt erval timer single-scan mode: time = Q C LK period x 211
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
424 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
01001 I nt erval timer single-scan mode: time = Q C LK period x 212
01010 I nt erval timer single-scan mode: time = Q C LK period x 213
01011 I nt erval timer single-scan mode: time = Q C LK period x 214
01100 I nt erval timer single-scan mode: time = Q C LK period x 215
01101 I nt erval timer single-scan mode: time = Q C LK period x 216
01110 I nt erval timer single-scan mode: time = Q C LK period x 217
01111 Reserved mode
10000 Reserved mode
10001 Software triggered continuous-scan mode
10010 External trigger rising edge continuous-scan mode
10011 Ext ernal trigger falling edge continuou s-scan mo de
10100 P eri odic timer continuous -scan mode : time = QCLK period x 27
10101 P eri odic timer continuous -scan mode : time = QCLK period x 28
10110 P eri odic timer continuous -scan mode : time = QCLK period x 29
10111 P eri odic timer continuous -scan mode : time = QCLK period x 210
11000 P eri odic timer continuous -scan mode : time = QCLK period x 211
11001 P eri odic timer continuous -scan mode : time = QCLK period x 212
11010 P eri odic timer continuous -scan mode : time = QCLK period x 213
11011 P eri odic timer continuous -scan mode : time = QCLK period x 214
11100 P eri odic timer continuous -scan mode : time = QCLK period x 215
11101 P eri odic timer continuous -scan mode : time = QCLK period x 216
11110 P eri odic timer continuous -scan mode : time = QCLK period x 217
11111 Reserved mode
Table 18-6. Queue 2 Operating Modes (Continued)
MQ2[12:8] Operating Modes
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 425
RESUME Queue 2 Resume Bit
RESUM E selects the que ue 2 resu mption point after suspe nsion due
to queue 1. If RESUME is changed during the execution of queue 2,
the change is not recognized until an end-of-queue condition is
reached or the queue operating mode of queue 2 is changed.
The primary reason for selecting re-execution of the entire queue or
subqueu e i s to guar ante e tha t all sam pl es are t aken co nsecuti ve ly i n
one scan (coherency).
When subqueues are not used, queue 2 execution restarts after
suspension with the first CCW in queue 2. When a pause has
previously occurred in queue 2 execution, queue execution restarts
after suspension wi th the first CCW in the current subqueue.
A subqueue is considered to be a stand-alone sequence of
conversions. Once a pause flag has been set to report subqueue
completion, that subqueue is not repeated until all CCWs in queue 2
are executed.
An example of using the RESUME bit is when the frequency of
queue 1 trigger events prohibit queue 2 completion. If the rate of
queue 1 execution is too high, it is best for queue 2 execution to
conti nue with the C CW that w as being con verted when queue 2 was
suspended. This allows queue 2 to eventually complete execution.
1 = After suspension, begin execution with the aborted CCW in
queue 2.
0 = After suspension, begin execution with the first CCW of
queue 2 or the current subqueue of queue 2.
BQ2[6:0] Beginning of Queue 2 Field
BQ2[6:0] indicates the CCW location where queue 2 begins. To allow
the length of queue 1 and queue 2 to vary, a programmable pointer
identifies the CCW table location where queue 2 begins. The BQ2
field also serves as an end-of-queue condition for queue 1. Setting
BQ2[6 :0] beyond physi cal CCW table memory space allow s queue 1
all 64 entries.
Softwar e defi ne s the beginn i ng of que ue 2 by prog ram ming the BQ2
field in QACR2. BQ2 is usually programmed before or at the same
time as the queue operating mode for queue 2 is selected. If BQ2 is
64 or greater, queue 2 has no entries, the entire CCW table is
dedicated to queue 1 and CCW63 is the end-of-queue 1. If BQ2[6:0]
is 0, the entire C CW table i s dedicated to q ueue 2. A s a special case,
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
426 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
when a queue operating mode for queue 1 is selected and a trigger
event occurs for queue 1 with B Q2 set to 0, queue 1 execution is
terminated after CCW0 is read. Conversions do not occur.
The BQ2[6:0] pointer may be changed dynamically, to alternate
between queue 2 scan sequences. A change in BQ2[6:0] after
queue 2 has b egun or if queue 2 has a trigger pending does not affect
queue 2 until queue 2 is started again. For example, two scan
sequences could be defined as follows: The first sequence starts at
CCW10, with a pause after CCW11 and an EOQ programmed in
CCW15; the second sequence starts at CCW16, with a pause after
CCW17 and an EOQ programmed in CCW39.
With BQ2[6:0] set to CCW10 and the continuous-scan mode
selected, queue execution begins. When the pause is encountered in
CCW11, a software interrupt routine can redefine BQ2[6:0] to be
CCW16. Therefore, afte r the end- of-q ueue is recog ni zed in CCW15,
an internal retrigger event is generated and execution restarts at
CCW16. When the pause software interrupt occurs again, software
can change BQ2 back to CCW10. After the end-of-queue is
recognized in CCW39, an internal retrigger event is created and
execution now restarts at CCW10.
If BQ2[6 :0] is changed while queue 1 is acti ve, th e effect o f BQ2[6:0]
as an end-of-queue indication for queue 1 is immediate. However,
beware of the risk of losing the end-of-queue 1 when changing
BQ2[6:0]. Using EOQ (chan63) to end queue 1 is recommended.
NOTE: If BQ2[6:0] was assigned to the CCW that queue 1 is currently working
on, then that conversion is completed before BQ2[6:0] takes effect.
Each time a C CW is read for queu e 1, the C CW locat ion i s compar ed
with the current value of the BQ2[6:0] pointer to detect a possible
end-of-queue condition. For example, if BQ2[6:0] is changed to
CCW3 while queue 1 is converting CCW2, queue 1 is terminated after
the conversion is completed. However, if BQ2[6:0] is changed to
CCW1 while queue 1 is converting CCW2, the QADC would not
recognize a BQ2[6:0] end -of-queue condition until queue 1 execution
reached CCW1 again, presumably on the next pass through the
queue.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 427
18.8.6 Status Registers
This subsection describes the QADC status registers.
18.8.6.1 QADC Status Register 0
The QADC status register 0 (QASR0) contains information about the
state of each queue and the current A/D conversion.
Stop mode resets the register ($0000)
Read: Anytime
Write:
For f la g bits (C F1, PF1, C F 2, PF2 , TOR1, TO R2 ): Wr it ing a 1 has no
effect, write a 0 to clear.
For QA[9:6] and CWP: Write has no effect.
Never in stop mode
CF1 Queue 1 Completion Flag
CF1 indicates that a queue 1 scan has been completed. The scan
completion flag is set by the QADC when the input channel sample
request ed by the la st CCW in queue 1 is converted, and the result is
stored in the result table.
Address: 0x00ca_0010 and 0x00ca_0011
Bit 15 14 13 12 11 10 9 Bit 8
Read: CF1 PF1 CF2 PF2 TOR1 TOR2 QS9 QS8
Write:
Reset:00000000
Bit 7654321Bit 0
Read: QS7 QS6 CWP5 CWP4 CWP3 CWP2 CWP1 CWP0
Write:
Reset:00000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 1 8-11. QADC Status Regist er 0 (QASR0)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
428 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
The end-of-queue 1 is identified when execution is complete on the
CCW i n th e loca tion pri or t o th at pointed to by B Q2, when the current
CCW contains an end-of-queue code instead of a valid channel
number, or when the currently completed CCW is in the last location
of the CCW RAM.
When CF1 is set and interrupts are enabled for that queue completion
flag, the QADC asserts an interrupt request. The software reads the
completion flag during an interrupt service routine to identify the
interrupt request. The interrupt request is cleared when the software
writ es a 0 to the completion fl ag bit, when the bit was pre viously read
as a 1. Once set, only software or reset can clear CF1.
CF1 is maintained by the QADC regardless of whether the
corresponding interrupt is enabled. The software polls for CF1 bit to
see if it is set. This allows the software to recognize that the QADC is
finish ed wit h a queue 1 scan. The software ackno wle dges that it has
detected the completion flag being set by writing a 0 to the completion
flag after the bit was read as a 1.
PF1 Queue 1 Pause Flag
PF1 indicates that a queue 1 scan has reached a pause. PF1 is set
by the QADC when the current queue 1 CCW has the pause bit set,
the selected input channel has been converted, and the result has
been stored in the result table.
Once PF1 is set, the queue enters the paused state and waits for a
trigger event to allow queue execution to continue. However, if the
CCW with the pause bit set is the last CCW in a queue, the queue
execution is complete. The queue status becomes idle, not paused,
and both the pause and completion flags are set. Another exception
occurs in software controlled mode, where the PF1 can be set but
queue 1 never enters the pause state since queue 1 continues without
pausing.
When PF1 is set and interrupts are enabled for the corresponding
queue, the QADC asserts an interrupt request. The software may
read PF1 during an interrupt service routine to identify the interrupt
request . The interrupt request is cleared when the software writes a 0
to PF1, when the bit was previously read as a 1. Once set, only
software or reset can clear PF1.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 429
In external gated single-scan and continuous-scan mode, the
definition of PF1 has been redefined. When the gate closes before the
end-of-queue 1 is reached, PF1 becomes set to indicate that an
inco mplete scan has occurr ed. In sing l e-scan mo de, s etting PF 1 ca n
be used to cause an interrupt and software can then determine if
queue 1 should be enabled again. In either external gated mode,
setting PF1 indicates that the results for queue 1 have not been
collected during one scan (coherently).
NOTE: If a pause in a CCW is encountered in external gated mode for either
single-scan an d continuou s-scan mo de, the pau se flag will not set, and
execution continues without pausing. This has allowed for the added
definition of PF1 in the external gated modes.
PF1 is maintained by the QADC regardless of whether the
corresponding interrupts are enabled. The software may poll PF1 to
find out when the QADC has reached a pause in scanning a
queue.The software acknowledges that it has detected a pause flag
being set by writing a 0 to PF1 after the bit was last read as a 1.
1 = Queue 1 has reached a pause or gate closed before
end-of-queue in gated mode.
0 = Queue 1 has not reached a pause or gate has not closed before
end-of-queue in gated mode.
See Table 18-7 for a summary of pause response in all scan modes.
Table 18-7. Pause Response
Scan Mode Queue Operatio n PF Asserts?
External trigger single-scan Pauses Ye s
Exte rnal trigger continuous-scan Pauses Yes
Interval timer trigger single-scan Pauses Yes
Interval timer continuous-scan Pauses Yes
Softwa re-initiated single-scan Continues Yes
Softwa re-initiated continuous-s can Cont inues Yes
Extern al gated single-scan Continues No
Extern al gated continuous-scan Continues No
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
430 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
CF2 Queue 2 Completion Flag
CF2 indicates that a queue 2 scan has been completed. CF2 is set by
the QADC when the input channel sample requested by the last CCW
in queue 2 is converted, and the result is stored in the result table.
The end-of-queue 2 is identified when the current CCW contains an
end-of-queue code instead of a valid channel number or when the
currently completed CCW is in the last location of the CCW RAM.
When CF2 is set and interrupts are enabled for that queue completion
flag , the QADC asser ts an interru pt request. T he software reads CF2
during an interrupt service routine to identify the interrupt request. The
interrupt request is cleared when the software writes a 0 to the CF2
bit, when the bit was previously read as a 1. Once set, only software
or reset can clear CF2.
CF2 is maintained by the QADC regardless of whether the
corresponding interrupts are enabled. The software polls for CF2 to
see if it is set. This allows the software to recognize that the QADC is
finish ed wit h a queue 2 scan. The software ackno wle dges that it has
detected the completion flag being set by writing a 0 to the completion
flag after the bit was read as a 1.
PF2 Queue 2 Pause Flag
PF2 indicates that a queue 2 scan has reached a pause. PF2 is set
by the QADC when the current queue 2 CCW has the pause bit set,
the selected input channel has been converted, and the result has
been stored in the result table.
Once PF2 is set, the queue enters the paused state and waits for a
trigger event to allow queue execution to continue. However, if the
CCW with the pause bit set is the last CCW in a queue, the queue
execution is complete. The queue status becomes idle, not paused,
and both the pause and completion flags are set. Another exception
occurs in software controlled mode, where the PF2 can be set but
queue 2 never enters the pause state.
When PF2 is set and interrupts are enabled for the corresponding
queue, the QADC asserts an interrupt request. The software reads
PF2 during an interrupt service routine to identify the interrupt
request . The interrupt request is cleared when the software writes a 0
to PF2, when the bit was previously read as a 1. Once set, only
software or reset can clear PF2.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 431
PF2 is maintained by the QADC regardless of whether the
corresponding interrupts are enabled. The software may poll PF2 to
find out when the QADC has reached a pause in scanning a queue.
The software acknowledges that it has detected a pause flag being
set by writing a 0 to PF2 after the bit was l ast read as a 1.
1 = queue 2 has reached a pause.
0 = queue 2 has not reached a pause.
See Table 18-7 for a summary of pause response in all scan modes.
TOR1 Queue 1 Trigger Overrun
TOR1 indicates that an unexpected trigger event has occurred for
queue 1. TOR1 can be set only while queue 1 is in the active state.
A tr igger event gener ated by a tr ansition on the exte rnal trigger pin o r
by the periodic/interval timer may be captured as a trigger overrun.
TOR1 cannot occur when the softwar e-ini tiat ed singl e-sca n mode or
the software-initiated continuous-scan mode are selected.
TOR1 occurs when a trigger event is received while a queue is
executing and before the scan has completed or paused. TOR1 has
no effect on the queue execution.
After a trigger event has occurred for queue 1, and before the scan
has completed or paused, additional queue 1 trigger events are not
retained. Such trigger events are considered unexpected, and the
QADC sets the TOR1 error status bit. An unexpected trigger event
may be a system overrun situation, indicating a system loading
mismatch.
In external gated continuous-scan mode, the definition of TOR1 has
been redefined. In the case when queue 1 reaches an end -of- queue
condition for the second time during an open gate, TOR1 becomes
set. This is considered an overrun condition. In this case CF1 has
been set for the first end-of-queue 1 condition and then TOR1
becomes set for the second end-of-queue 1 condition. For TOR1
to be set, software must not clear CF1 before the second
end-of-queue 1.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
432 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
The software acknowledges that it has detected a trigger overrun
being set by writing a 0 to the trigger overrun, after the bit was read
as a 1. Once set, only software or reset can clear TOR1.
1 = At le ast one une xpected queu e 1 trigge r event has occurred o r
queue 1 reaches an end-of-queue condition for the second
time in gated mode
0 = No unexpected queue 1 trigger events have occurred
TOR2 Queue 2 Trigger Overrun Flag
TOR2 indicates that an unexpected trigger event has occurred for
queue 2. TOR 2 can be set when queue 2 is in the active, su spended,
and trigger pending states.
The TOR2 trigger overrun can occur only when using an external
trigger mode or a periodic/interval timer mode. Trigger overruns
cannot occur when the software-initiated single-scan mode and the
software-initiated continuous-scan mode are selected.
TOR2 occurs when a trigger event is received while queue 2 is
executing, suspended, or a trigger is pending. TOR2 has no effect on
the queue execution. A trigger event that causes a trigger overrun is
not retained since it is considered unexpected.
An unexpected trigger event may be a system overrun situation,
indicating a system loading mismatch. The software acknowledges
that it has detected a trigger overrun being set by writing a 0 to the
tri gger over run , after the bi t was read as a 1 . Once set, onl y softwar e
or reset can clear TOR2.
1 = At least one unexpected queue 2 trigger event has occurred.
0 = No unexpected queue 2 trigger events have occurred.
QS[9:6] Queue Status Field
The 4-bit read-only QS field indicates the current condition of queue 1
and queue 2. There are five queue status conditions:
Idle
Active
Paused
Suspended
Trigger pending
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 433
The two most significant bits are associated primarily with queue 1,
and the remaining two bits are associated with queue 2. Since the
priority scheme between the two queues causes the status to be
interlinked, the status bits are considered as one 4-bit field.
Table 18-8 shows the bits in the QS field and how they affect the
status of queue 1 and queue 2.
One or both queues may be in the idle state. When a queue is idle,
CCWs are not be in g executed for that que ue, the queu e is no t in the
pause state, and there is not a trigger pending.
The idl e state occurs when a queu e is disa bled, when a que ue is in a
reserved mode, or when a queue is in a valid queue operating mode
awaiting a trigger event to initiate queue execution.
A queue is in the active state when a valid queue operating mode is
selected, when the selected trigger event has occurred, or when the
QADC is performing a conversion specified by a CCW from that
queue.
Table 18-8. Queue Status
QS[9:6] Queue 1/Queue 2 States
0000 Q ueue 1 idle , queue 2 idle
0001 Q ueue 1 idle , queue 2 paused
0010 Q ueue 1 idle , queue 2 active
0011 Q ueue 1 idle , queue 2 trigger pending
0100 Q ueue 1 paus ed, queue 2 idle
0101 Q ueue 1 paus ed, queue 2 paus ed
0110 Q ueue 1 paus ed, queue 2 ac tive
0111 Q ueue 1 paus ed, queue 2 trigg er pending
1000 Q ueue 1 ac tive, queue 2 idle
1001 Q ueue 1 ac tive, queue 2 paused
1010 Q ueue 1 ac tive, queue 2 suspended
1011 Q ueue 1 ac tive, queue 2 trigger pending
1100 Reserved
1101 Reserved
1110 Reserved
1111 Reserved
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
434 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Only one queue can be active at a time. Either or both queues can be
in the paused state. A queue is paused when the previous CCW
exec uted from that queue ha d the pause bit set. The QA DC does not
execute any CCWs from the paused queue until a trigger event
occurs. C onsequently, th e QADC can ser vice queue 2 while queue 1
is paused.
Only queue 2 can be in the suspended state. When a trigger event
occurs on queue 1 while queue 2 is executing, the current queue 2
conv ersion is aborted . The queue 2 statu s is re ported as suspen ded.
Queue 2 transitions back to the active state when queue 1 becomes
idle or paused.
A trigger pending state is required since both queues cannot be active
at the same time. The status of queue 2 is changed to trigger pending
when a trigger event occurs for queue 2 while queue 1 is active. In the
opposite case, when a trigger event occurs for queue 1 while queue 2
is active, queue 2 is aborted and the status is reported as queue 1
active, queue 2 suspended. So due to the priority scheme, only
queue 2 can be in the trigger pending state.
Two transition cases cause the queue 2 status to be trigger pending
before queue 2 is shown to be in the active state. When queue 1 is
active and there is a trigger pending on queue 2, after queue 1
completes or pauses, queue 2 continues to be in the trigger pending
state for a few clock cycles. The fleeting status conditions are:
queue 1 idle with queue 2 trigger pending
queue 1 paused with queue 2 trigger pending
Figu re 18- 12 displa ys the status conditions of the queue status fiel d
as the QADC goes through the transition from queue 1 active to
queue 2 active.
The queue status field is affected by the stop mode. Since all of the
analog logic and control registers are reset, the queue status field is
reset to queue 1 idle, queue 2 idle.
During the debug mode, the queue status field is not modified. The
queue status field retains the status it held prior to freezing. As a
result, the queu e status can show queue 1 active, queu e 2 idle, even
though neither queue is being executed during freeze.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 435
Figure 18-12. Queue Status Tran sition
CWP[5:0] Command Word Pointer Field
The CWP allows the software to know which CCW is executing at
present, or was last completed. The command word pointer is a
software read-only field, and write operations have no effect. The
CWP allows software to monitor the progress of the QADC scan
sequence . The CWP field is a CCW word pointer with a valid range of
0 to 63.
When a queue ente rs the pau sed state, the CWP points to the CCW
with the pause bit set. While in pause, the CWP value is maintained
until a trigger event occurs on the same queue or the other queue.
Usually, the CWP is updated a few clock cycles before the queue
status field shows that the queue has become active. For example,
software may read a CWP pointing to a CCW in queue 2, and the
status field shows queue 1 paused, queue 2 trigger pending.
When the QADC finishes the scan of the queue, the CWP points to
the CCW where the end-of-queue condition was detected. Therefore,
when the end-of-queue condition is a CCW with the EOQ code
(channel 63), the CWP points to the CCW containing the EOQ.
When the last CCW in a queue is in the last CCW table location
(CCW63 ), and it does not contain the EOQ code, the end-of- queue is
detected when the following CCW is read, so the CWP points to word
CCW0.
Finally, when queue 1 operation is terminated after a CCW is read
that is defined as BQ2, the CWP points to the same CCW as BQ2.
ACTIVE
QUEUE 1
ACTIVE
I D LE (PAUSE D )
I D LE (PAUSE D )
IDLE
QUEUE 2
TRIG GER PEND ING
TRIG GER PEND ING
ACTIVE
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
436 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
During the stop mode, the CWP is reset to 0, since the control
registers and the analog logic are reset. When the debug mode is
entered, the CWP is unchanged; it points to the last executed CCW.
18.8.6.2 QADC Status Register 1
Stop mode resets the register ($3f3f)
Read: Anytime
Write: Never
CWPQ1[5:0] Queue 1 Command Word Poi nter Field
CWPQ1[5:0] allows the software to know what CCW was last
completed for queue 1. This field is a software read-only field, and
write operations have no effect. CWPQ1 allows software to read the
last executed CCW in queue 1, regardless of which queue is active.
The CWPQ1[5:0] field is a CCW word pointer with a valid range of 0
to 63 (0x3f).
In contrast to CWP, CPWQ1 is updated when the conversion result is
written. When the QADC finishes a conversion in queue 1, both the
result register is written and the CWPQ1 is updated.
Finally, when queue 1 operation is terminated after a CCW is read
that is defined as BQ2, CWP points to BQ2 while CWPQ1 points to
the last CCW queue 1.
Address: 0x00ca_0012 and 0x00ca_0013
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0 0 CWPQ15 CWPQ14 CWPQ13 CWPQ12 CWPQ11 CWPQ10
Write:
Reset:00111111
Bit 7654321Bit 0
Read: 0 0 CWPQ25 CWPQ24 CWPQ23 CWPQ22 CWPQ21 CWPQ20
Write:
Reset:00111111
= Writes have no effect and the access terminates without a transfer error exception.
Figure 1 8-13. QADC Status Regist er 1 (QASR1)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 437
During the stop mode, the CWPQ1 is reset to 63 (0x3f), since the
control registers and the analog logic are reset. When the debug
mode is entered, the CWPQ1 is unchanged; it points to the last
exec uted CCW in queue 1.
CWPQ2[5:0] Queue 2 Command Word Poi nter Field
CWPQ2[5:0] allows the software to know what CCW was last
completed for queue 2. This field is a software read-only field, and
writ e op eratio ns ha ve no effe ct. C WP Q2[5:0 ] allow s softwar e to rea d
the l ast executed CCW in qu eue 2, regardless w hich queue is active.
The CWPQ2[5:0] field is a CCW word pointer with a valid range of 0
to 63.
In contrast to CWP, CPWQ2 is updated when the conversion result is
written. When the QADC finishes a conversion in queue 2, both the
result register is written and the CWPQ2 are updated.
During the stop mode, the CWPQ2 is reset to 63, since the control
registers and the analog logic are reset. When the debug mode is
entered, the CWP is unchanged; it points to the last executed CCW
in queue 2.
18.8.7 C onversion Command Word Table
Address: 0x00ca_0200 through 0x00ca_027e
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0 0 0000PBYP
Write:
Reset:000000UU
Bit 7654321Bit 0
Read: IST1 IST0 CHAN5 CHAN4 CHAN3 CHAN2 CHAN1 CHAN0
Write:
Reset:UUUUUUUU
= Writes have no effect and the access terminates without a transfer error exception.
U = Unaffected
Figure 18-14. Conversion Com mand Word Table (CCW)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
438 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Read: Anytime except reads during stop mode are invalid
Write: Anytime except stop mode
P Pause Bit
The pause bit allows software to create subqueues within queue 1
and queue 2. The QADC pe rforms the conversion specified by the
CCW with the pause bit set, and then the queue enters the pause
state. Another trigger event causes execution to continue from the
pause to the next CCW.
1 = Enter pause state after execution of current CCW
0 = Do not enter pause state after execution of current CCW
NOTE: The P bit does not cause the queue to pause in the software controlled
modes or external gated modes.
BYP Sample Amplif ier Bypass Bit
Setting the B YP fiel d in t he CC W ena bl es the amp lifie r byp ass mo de
for a conversion and subsequently changes the timing. The initial
sample time is eliminated, reducing the potential conversion time by
two QCLKs. However, due to internal RC effects, a minimum final
sampl e time of four QCLK s must be al lowed. W hen using this mo de,
the external circuit should be of low source impedance. Loading
effects of the external circuitry need to be considered, since the
benefits of the sample amplifier are not present.
1 = Amplifier bypass mode enabled
0 = Amplifier bypass mode disabled
NOTE: BYP is maintained for software compatibility but has no functional
benefit to this version of the module.
IST[0:1] Input Sample Time Field
The IST field allows software to specify the length of the sample
window. Provision is made to vary the input sample time, through
software control, to offer flexibility in the source impedance of the
circuitry providing the QADC analog channel inputs. Longer sample
times permit more accurate A/D conversions of signals with higher
source impedances.
Table 18-9 shows the four selectable input sample times.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 439
The programmable sample time can also be used to increase the time
interval between conversions to adjust the queue execution time or
the sampling rate.
CHAN[5:0] Channel Number Field
The CHAN field selects the input channel number. The software
programs the channel field of the CCW with the channel number
corresponding to the analog input pin to be sampled and converted.
The analog input pin channel number assignments and the pin
definitions vary depending on whether the multiplexed or
non-m ultiplexed mode i s used b y the applicat ion. A s far a s the queu e
scanning operations are concerned, there is no distinction between
an internally or externally multiplexed analog input.
Table 18-10 shows the channel number assignments for the
non-m ul tiplexed mode. Table 18-11 shows the channel number
assignments for the multiplexed mode.
The channel field is programmed for channel 63 to indicate the end of
the queue. Channels 60 to 62 are special internal channels. When
one of the special channels is selected, the sampling amplifier is not
used. The value of VRL, VRH, or (VRH–VRL)/2 is placed directly onto
the converter. Also for the internal special channels, programming
any input sample time other than two has no benefit except to
lengthen the overall conversion time.
Table 18-9. Input Sample Times
IST[0:1] Input Sample Times
00 In put sa mp le time = QCLK p e rio d × 2
01 In put sa mp le time = QCLK p e rio d × 4
10 In put sa mp le time = QCLK p e rio d × 8
11 In put sa mp le time = QCLK p e rio d × 16
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
440 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Tab le 18- 10. Non-Multiplexed Channel Assignments
and Pin Designations
Non - Mu l tiplex e d Inp ut Pins Channel Number(1)
in CCW CHAN Field
Port Pin N ame An alog Pin Na me Other
Functions Pin Type Binary Decimal
PQB0
PQB1
PQB2
PQB3
AN0
AN1
AN2
AN3
Input
Input
Input
Input
000000
000001
000010
000011
0
1
2
3
PQA0
PQA1 AN52
AN53
Input/output
Input/output 110100
110101 52
53
PQA3
PQA4 AN55
AN56 ETRIG1
ETRIG2 Input/output
Input/output 110111
111000 55
56
VRL
VRH
Low reference
High reference
(VRHVRL)/2
Input
Input
111100
111101
111110
60
61
62
——End-of-queue code 111111 63
1. All channels not li sted are reser ved or unimpl emented and return undefined results.
Table 18-11. Multiplexed Channel Assignments
and Pin Designations
Multiplexed Input Pins Channel Number(1)
in CCW CHAN Field
Port Pin
Name Analog
Pin Name Other
Functions P in Type Binary Dec i m al
PQB0
PQB1
PQB2
PQB3
ANw
ANx
ANy
ANz
Input
Input
Input
Input
000XX0
000XX1
010XX0
010XX1
0, 2, 4, 6
1, 3, 5, 7
16, 18, 20, 22
17, 19, 21, 23
PQA0
PQA1
MA0
MA1 Output
Output 110100
110101 52
53
PQA3
PQA4 AN55
AN56 ETRIG1
ETRIG2 Input/output
Input/output 110111
111000 55
56
VRL
VRH
Low reference
High reference
(VRH–VRL)/2
Input
Input
111100
111101
111110
60
61
62
——End-of-queue code 111111 63
1. All channels not li sted are reser ved or unimpl emented and return undefined results.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Register Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 441
18.8.8 Result Registers
This subsection describes the result registers.
18.8.8.1 Right-Justified Unsigned Result Register
Read: Anytime except reads during stop mode are invalid
Write: Anytime except stop mode
RESULT[9:0] Resu lt Field
The conversion result is unsigned, right-justified data.
Address: 0x00ca_0280 through 0x00ca_02fe
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0 0 0000 RESULT
Write:
Reset:000000
Bit 7654321Bit 0
Read: RESULT
Write:
Reset:
= Writes have no effect and the access terminates without a transfer error exception.
Figure 18-15. Right-Justified Unsigned Result Register (RJURR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
442 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.8.8.2 Left-Justified Signed Result Register
S Sign Bit
RESULT[14:6] Result Field
The conversion result is signed, left-justified data.
18.8.8.3 Left-Justified Unsigned Result Register
RESULT[15:6] Result Field
The conversion result is unsigned, left-justified data.
Address: 0x00ca_0300 through 0x00ca_037e
Bit 15 14 13 12 11 10 9 Bit 8
Read: S RESULT
Write:
Reset:
Bit 7654321Bit 0
Read: RESULT 000000
Write:
Reset: 000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 18-16. Left-Justified Signed Result Register (LJSRR)
Address: 0x00ca_0380 through 0x00ca_03fe
Bit 15 14 13 12 11 10 9 Bit 8
Read: RESULT
Write:
Reset:
Bit 7654321Bit 0
Read: RESULT 000000
Write:
Reset: 000000
= Writes have no effect and the access terminates without a transfer error exception.
Figure 18-17. Lef t-Justified Unsigned Result Register (LJURR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 443
18 .9 Fun cti on al Descr ipti o n
This subsection provides a functional description of the QADC.
18.9.1 QADC Bus Accessing
Coherency of results read across multiple cycles is not guaranteed.
18.9.2 External Multiplexing
Exter nal mul tip lexer chi p s concentrate a n umbe r of an al og signa ls onto
a few inputs to the analog converter. This is helpful in applications that
need to convert more analog signals than the A/D converter can
normally provide. External multiplexing also puts the multiplexed chip
closer to the signal source. This minimizes the number of analog signals
that need to be shi eld ed due to the pr oximity to n oi sy high spee d digi tal
signals at the microcontroller chip.
For example, four 4-input multiplexer chips can be put at the connector
whe re the analog signals fi rst arrive on the comput er board. As a result,
only four analog signals need to be shielded from noise as they
approach the microcontroller chip, rather than having to protect 16
analog signals. However, external multiplexer chips may introduce
additional noise and errors if not properly utilized. Therefore, it is
necessary to maintain low on resistance (th e im peda nce of an analog
switch when active within a multip lexed chip) and insert a low pass filter
(R/C) on the input side of the multiplexed chip.
18.9.2.1 External Multiplexing Operation
The QADC can use from one to four or two dual external multiplexer
chips to expand the number of analog signals that may be converted. Up
to 16 analog channels can be converted through external multiplexer
selection. The externally multiplexed channels are automatically
selected from the channel field of the conversion command word (CCW)
table, the same as internally multiplexed channels. The software selects
the external multiplexed mode by setting the MUX bit in control register 0
(QACR0).
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
444 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Fi gu re 18-1 8 shows the maximum configuration of four external
multiplexer chips connected to the QADC. The external multiplexer chips
select one of four analog inputs and connect it to one analog output,
which becomes an input to the QADC. The QADC provides two
multiplexed addr ess signals MA[1:0] to select one of four inputs.
These inputs are connected to all four external multiplexer chips. The
analog output of the four multiplex chips are each connected to separate
QADC inputs (ANw, ANx, A Ny, and ANz) as shown in Figure 18-18.
When the external multiplexed mode is selected, the QADC
automa tically cre ates the M A outp ut signals fr om the ch annel number in
each CCW. The QADC also converts the proper input channel (ANw,
ANx, ANy, and ANz) by interpreting the CCW channel number. As a
result, up to 16 externally multiplexed channels appear to the conversion
queues as directly connected signals. The software simply puts the
channel number of externally multiplexed channels into CCWs.
Fi gu re 18-1 8 shows that the two MA signals may also be analog input
pins. When external multiplexing is selected, none of the MA pins can be
used for analog or digital inputs. They become multiplexed address
outputs and are unaffected by DDRQA[1 : 0].
18.9.2.2 Module Version Options
The n umber o f availab le analog ch anne ls vari es, dep ending on whether
external multiplexing is used. A maximum of 16 analog channels are
supported by the internal multiplexing circuitry of the converter.
Table 18-12 shows the total number of an alog input channels supported
with 0 to four external multiplexer chips.
Table 18-12. Analog Input Channels
Number of Analog Input Channels Available
Directly Connected + External Multiplexed = Total Channe ls(1), (2)
1. The external trigger inputs are not shared with two anal og input pins.
2. W hen external mu ltiplexing is used , t w o input channe ls can be configur ed as multi plexed
addres s outputs, and for eac h external multiplexer chip, one input channel is a mult iplexed
analog input.
No Ex ternal
Mux One External
Mux Two Exte rnal
Muxes Three External
Muxes Four External
Muxes
8 5 + 4 = 9 4 + 8 = 12 3 + 12 = 15 2 + 16 = 1 8
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 445
Figure 18-18. External Multiplexing Configuratio n
AN52/MA0/PQA0
AN53/MA1/PQA1
AN55/ETRIG1PQA3
AN56/ETRIG2/PQA4
AN0/ANW/PQB0
AN1/ANX/PQB1
AN2/ANY/PQB2
AN3/ANZ/PQB3
PORT QBPORT QA
AN0
AN2
AN4
AN6
AN1
AN3
AN5
AN7
AN16
AN18
AN20
AN22
AN17
AN19
AN21
AN23 MUX
MUX
MUX
MUX
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
446 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.9.2.3 External Multiplexed Address Configuration
The QADC can drive external multiplexed addresses. If configured to
drive external addresses, the external address pins MA[1:0] will function
as address pins and will not maintain analog input functions in external
address mode.
18.9.3 Analog Subsystem
This section describes the QADC an alog subsystem, which includes the
front-end analog multiplexer and analog-to-digital converter.
18.9.3.1 Analog-to-Digital Converter Operation
The analog subsy stem consists of the path from the input pins to the A/D
converter block. Signals from the queue control logic are fed to the
multiplexer and state machine. The end-of-conversion (EOC) signal and
the successive-approximation register (SAR) reflect the result of the
conversion. Figure 18-19 shows a block diagram of the QADC analog
subsystem.
NOTE: The following description assumes the use of a buffer amplifier.
18.9.3.2 Conversion Cycle Times
Total conversion time is made up of initial sample time, final sample time,
and resolution time. Initial sample time refers to the time during which the
selected input channel is coupled through the buffer amplifier to the
sample capacitor. This buffer is used to quickly reproduce its input signal
on the sampl e capacitor and mini mize char ge sharin g error s. Durin g the
final sampling period the amplifier is bypassed, a nd the multiplexer input
charges the sample capacitor array directly for improved accur a cy.
During the resolution period, the voltage in the sample capacitor is
converted to a digital value and stored in the SAR.
Initial sample time is fixed at two QCLK cycles. Final sample time can be
2, 4, 8, or 16 QCLK cycles, depending on the value of the IST field in the
CCW. Resolution time is 10 QCLK cycles.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 447
Figure 18-19. QADC Analog Subsystem Block Diagram
Therefore, conversion time requires a minimum of 14 QCLK clocks (7 µs
with a 2.0-MHz QCLK). If the maximum final sample time period of 16
QCLKs is selected, the total conve rsion time is 28 QCLKs or 14 µs (with
a 2.0-MH z QCLK).
Figure 18-20. Conve r sion Timi ng
PQA4
PQA0
PQB3
PQB0
CHAN. DECODE & MUX
VDDA
VSSA
8: 1
VRH
VRL
QCLK
START CONV.
END OF CONV.
RST
STOP
SAR[9:0]
10-BIT A /D CONVE RTER INPUT
ANALOG
POWER
2IST
BYP
SAMPLE
COMPAR- SUCCESSIVE
ATOR
BIAS CI RCUIT
APPROXIMATION
REGISTER
BUFFER
STATE MACHINE & LOGIC
1010
CHAN[5:0]
4
POWER
DOWN
INTERNAL
CHANNEL
DECODE
SIGNALS FROM /TO QU EU E CO NTROL LOG IC
SAR TIM ING
10-BIT RC
DAC
CSAMP
SAM PLE TI M E SUCC ESSI VE APPRO XIMAT I ON RESO LUTION SEQU EN CE
QCLK
BUFFER
SAMPLE
TIME:
2 CYCLES
FINAL
SAMPLE
TIME:
N CYCLE S
(2,4,8,16)
RESOLUTION
TIME:
10 CYCLE S
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
448 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
If the amplifier bypass mode is enabled for a conversion by setting the
amplifier bypass (BYP) field in the CCW, the timing changes to that
shown in Figu re 18-2 1. See 18.8.7 Conversion Command Word
Table for more information on the BYP field. The initial sample time is
eliminated, reducing the potential conversion time by two QCLKs. When
using the bypass mode, the external circuit should be of low source
impedance (typically less than 10 k). Also, the loading effects to the
external circuitry by the QADC need to be considered, since the benefits
of the sample amplifier are not present.
NOTE: Because of internal RC time constants, it is not recommended to use a
sample time of two QCLKs in bypass mode f or high-frequency operation.
Figure 18-21. Bypass Mode Conversion Tim ing
18.9.3.3 Channel Decode and Multiplexer
The internal multiplexer selects one of the eight analog input pins for
conversion. The selected input is connected to the Sample Buffer
Amplifier or to the sample capacitor. The multiplexer also includes
positive and negative stress protection circuitry, which prevents
deselected channels from affecting the selected channel when current is
injected into the deselected channels.
18.9.3.4 Sample Buffer
The sample buffer is used to raise the effective input impedance of the
A/D con verte r, so that external co mponents (higher b andwidth or higher
impedance) are less critical to accuracy. The input voltage is buffered
onto the sample capacitor to reduce crosstalk between channels.
SAMPLE TIME SUCCESSIVE-APPROXIMATION RESOLUTION SEQUENCE
QCLK
SAMPLE
TIME:
N CYCLES
(2,4,8,16)
RESOLUTION
TIME:
10 CYCLE S
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 449
18.9.3.5 Digital-to-Analog Converter (DA C) Array
The digi tal-to-a nalog conv erter (DA C) array consists of bi nary-weig hted
capacitors and a resistor-divider chain. The reference voltages, VRH
and VRL, are used by the DAC to per for m ratiom etr ic conversi on s. The
DAC also converts the following three internal channels:
VRH reference voltage high
VRL reference voltage low
(VRH–VRL)/2 reference voltage
The DAC array serves to provide a mechanism for the successive
approximation A/D conversion.
Resolution begins with the most significant bit (MSB) and works down to
the least significant bit (LSB). The switching sequence is controlled by
the comparator and SAR logic. The sample capacitor samples and holds
the voltage to be converted.
18.9.3.6 Comparator
During the approximation process, the comparator senses whether the
digitally selected arrangement of the DAC array produces a voltage level
higher or lower than the sampled input. The comparator output feeds
into the SAR which accum ulates the A /D conversion re sult sequ entially,
beginning with the MSB.
18.9.3.7 Bias
The bias circuit is controlled by the STOP signal to power-up and
power-down all the analog circuits.
18.9.3.8 Successive-Approximation Register
The input of the SAR is connected to the comparator output. The SAR
sequentially receives the conversion value one bit at a time, starting with
the MSB. After accumulating the 10 bits of the conversion result, the
SAR data is transferred to the appropriate result location, where it may
be read from the IPbus by user software.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
450 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.9.3.9 State Machine
The state machine receives the QCLK, RST, STOP, IST[1:0], BYP,
CHAN[5:0], and START CONV. signals, from which it generates all
timing to perform an A/D conversion. The start-conversion signal
(ST ART C ONV.) indicates to t he A/D converte r t hat the d esired chann el
has been sent to the MUX. IST[1:0] indicates the desired sample time.
BYP indicates whether to bypass the sample amplifier. The
end-of-conversion (EOC) signal notifies the queue control logic that a
result is available for storage in the result RAM.
18.10 Digital Control
The digital contr ol subsystem includes the contr ol logic to sequence the
conversion activity, the clock and periodic/interval timer, control and
status registers, the conversion command word table RAM, and the
result word table RAM.
The ce ntral el ement for control of t he QADC conve rsions is the 6 4-entry
conversion command word (CCW) table. Each CCW specifies the
conversion of one input channel. Depending on the application, one or
two queues can be established in the CCW table. A queue is a scan
sequence of one or more inpu t channel s. By using a pause m echanism,
subqueues can be created in the two queues. Each queue can be
operated using one of several different scan modes. The scan modes for
queue 1 and queue 2 are programmed in the control registers QACR1
and QACR2. Once a queue has been started by a trigger event (any of
the ways to cause the QADC to begin executing the CCWs in a queue
or subqueue), the QADC performs a sequence of conversions and
places the results in the result word table.
18.10.1 Queue Priority Timing Examples
This subsection describes the QADC priority scheme when trigger
events on two queues overlap or conflict.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 451
18.10.1.1 Queue Priority
Queue 1 has priority over queue 2 execution. These cases show the
conditions under which queue 1 asserts its priority:
When a queue is not active, a trigger event for queue 1 or queue
2 causes the corresponding queue execution to begin.
When queue 1 is active and a trigger event occurs for queue 2,
queue 2 cannot begin execution until queue 1 reaches completion
or the paused state. The status register records the trigger event
by reporting the queue 2 status as trigger pending. Additional
trigger events for queue 2, which occur before execution can
begin, are captured as trigger overruns.
When queue 2 is ac tive and a trigger event occurs for queue 1, the
curren t queue 2 conversio n is aborted. The sta tus register reports
the queu e 2 status as suspended . Any trigge r events occurring f or
queue 2 while queue 2 is suspended are captured as trigger
overruns. Once queue 1 reaches the completion or the paused
state, queue 2 begins executing again. The programming of the
RESUME bit in QACR2 determines which CCW is executed in
queue 2.
When simultaneous trigger events occur for queue 1 and queue 2,
queue 1 begins execution and the queue 2 status is changed to
trigger pending.
Subqueues that are paused
The pause feature can be used to divide queue 1 and/or queue 2 into
multiple subqueues. A subqueue is defined by setting the pause bit in
the last CCW of the subqueue.
Figure 18-22 shows the CC W forma t and an exam ple of us ing pau se to
create subqueues. Queue 1 is shown with four CCWs in each subqueue
and queue 2 has two CCWs in each subqueue.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
452 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Figure 18-22. QADC Queue Operation with Pause
The queue operating mode selected for queue 1 determines what type
of trigger event causes the execution of each of the subqueues within
queue 1. Similarly, the queue operating mode for queue 2 determines
the type of trigger event required to execute each of the subqueues
within queue 2.
For example, when the external trigger rising edge continuous-scan
mode is selected for queue 1, and there are six subqueues within
queue 1, a separate rising edge is required on the external trigger pin
after every pause to begin the execution of each subqueue (refer to
Fi gu re 18-2 2).
The choice of single-scan or continuous-scan applies to the full queue,
and is not applied to each subqueue. Once a subqueue is initiated, each
BEGINNING OF QUEUE 1 00
CHANN EL SELECT,
SAMPL E, H OLD ,
A/D CONVERSION
CONVE RS IO N CO MMA ND RESU LT WOR D TABLE
0
PAUSE
WORD (CCW) TA BLE
0
0
1
0
0
0
1
0PAUSE
00 P
0
PAUSE
0
0
1
0
1
0
1
0PAUSE
P
END OF QU EU E 1
BEGINNING OF QUEUE 2
BQ2
PAUSE
PAUSE
END OF QU EU E 2
P
1
063 63
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 453
CCW is executed sequentially until the last CCW in the subqueue is
executed and the pause state is entered. Execution can only continue
with the next CCW, which is the beginning of the next subqueue. A
subqueue cannot be executed a second time before the overall queue
execution has been completed.
Trigger events which occur during the execution of a subqueue are
ignored, except that the trigger overrun flag is set. When a
continuous-scan mode is selected, a trigger event occurring after the
compl etion of the last subqueue (a fter the queu e compl etion flag is se t),
causes the execution to continue with the first subqueue, starting with
the first CCW in the queue.
When the QADC encounters a CCW with the pause bit set, the queue
enters the pa used state aft er completing the conve rsion specified in the
CCW with the pause bit. The pause flag is set and a pause software
interrupt may optionally be issued. The status of the queue is shown to
be paused , in dicating co mpl etion of a subqu eue. T he QAD C then waits
for another trigger ev ent to ag ain beg in executi on of the ne xt subque ue.
18.10.1.2 Queue Priority Schemes
Since there are two conversion command queues and only one A/D
conv erter, t here is a prio rity scheme to deter mine whic h conversio n is to
occur. Each queue has a variety of trigger events that are intended to
initiate conversions, and they can occur asynchronously in relation to
each other and other conversions in progress. For example, a queue can
be idle awaiting a trigger event, a trigger event can have occurred, but
the first conversion has not started, a conversion can be in progress, a
pause co ndi tion can exi st awa iti ng a nother tri gger even t to continu e th e
queue, and so on.
The following paragraphs and figures outline the prioritizing criteria used
to determine which conversion occurs in each overlap situation.
NOTE: Each situation in Figure 18-23 through Figure 18-33 are labeled S1
through S19. In each diagram, time is shown increasing from left to right.
The executio n of qu eue 1 and queu e 2 (Q 1 and Q 2) is shown a s a string
of rectangles representing the execution time of each CCW in the queue.
In mo st of the situa tions, ther e are four CC Ws (label ed C1 t o C4) in both
queue 1 and queue 2. In some of the situations, CCW C2 is presumed
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
454 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
to have the pause bit set, to show the similarities of pause and
end-of-queue as terminations of queue execution.
Trigger events are described in Table 18-13.
When a trigger event causes a CCW execution in progress to be
aborted, the aborted conversion is shown as a ragged end of a
shortened CCW rectangle.
The situation diagrams also show when key status bits are set.
Table 18-14 describes the status bits.
Below the qu eue execu tion flows are three sets of blocks that show the
status information that is made available to the software. The first two
rows of status blocks show the condition of each queue as:
Idle
Active
Pause
Suspended (queue 2 only)
Trigger pending
The third row of status blocks shows the 4-bit QS status register field that
encodes the condition of the two queues. Two transition status cases,
Table 18-13. Trigger Events
Trigger Events
T1 Events that trigger queue 1 execution (external trigger, software-initiated
single-scan enab le bit, or c om ple tion of the previous continuous loop)
T2 Events that trigger queue 2 execution (external trigger, software-initiated
single-scan enab le bit, timer period/interval expired, or completion of the
previous continuous loop)
Table 18-14. Status Bits
Bit Function
CF flag Set when the end of the queue is reached
PF flag Se t when a queue completes execution up through a pause bit
Trigger overrun
error (TOR) Set when a new trigger event occurs before the queue is finished
serving the previous trigger event
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 455
QS = 001 1 and QS = 01 11, are not shown because th ey exist on ly very
briefly between stable status conditions.
The first three examples i n Figure 18- 23 through Figure 18- 25 (S 1, S2,
and S3) show what happens when a new trigger event is recognized
before the queue has com pl eted servicing the previ ous trigge r eve nt o n
the same queue.
In situation S 1 (Figu r e 18- 23) , one trigger e vent is being recog ni zed o n
each queue while that queue is still working on the previously recognized
trigger event. The trigger overrun error status bit is set, and otherwise,
the premature trigger event is ignored. A trigger event which occurs
before the servicing of the previous trigger event is through does not
disturb the queue execution in progress.
Figure 18-23. CCW Priority Situation 1
Q1
Q2
QS
IDLE
IDLE ACTIVE IDLE
0000 1000 0000 0010 0000
TOR1
T1 T1
Q1: C1 C2 C3 C4
CF1 C1 C2 C3 C4
TOR2
T2
T2
Q2:
CF2
IDLE
ACTIVE
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
456 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
In situation S2 (Figure 18-24), more than one trigger event is recognized
before servicing of a previous trigger event is complete, the trigger
overrun bit is again set, but otherwise, the additional trigger events are
ignored. After the queue is complete, the first newly detected trigger
event causes queue execution to begin again. When the trigger event
rate i s high, a new trigger event can be seen very soo n after com pletion
of the previous queue, leaving software little time to retrieve the previous
results. Also, when trigger events are occurring at a high rate for
queue 1, the lower p riority que ue 2 cha nnel s may not get servic e d at all.
Figure 18-24. CCW Priority Situation 2
T1
ACTIV E IDLE
Q1
Q2
QS
IDLE ACTIVE
IDLE ACTIVE IDLE
1000 1000 0000 0010 0000
C1 C2 C3 C4
TOR2
T2 T2
Q2:
CF2
IDLE
C1 C2 C3 C4
T1
CF1
C1 C2 C3 C4
TOR1
T1
Q1:
CF1
TOR1
T1
TOR1
T1
TOR2
T2
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 457
Situation S3 (Figure 18-25) shows that when the pause feature is in use,
the trigger overrun error status bit is set the same way, and that queue
execution continues unchanged.
Figure 18-25. CCW Priority Situation 3
The next two situations consider tr igger events that occur for the lower
priority queue 2, while queue 1 is actively being serviced.
Situation S4 (Figu re 18-2 6) shows that a queue 2 trigger event that is
recognized while queue 1 i s active is saved, and as soon as queue 1 is
finished, queue 2 servicing begins.
Figure 18-26. CCW Priority Situation 4
PAUSE
Q1
Q2
QS
IDLE ACTIVE
IDLE ACTIV E IDLE
1000 0110 0001 0010
ACTI VE
0000
IDLE
C1 C2
T1 T1
Q1:
TOR1 PF1
C1 C2
0000
Q2:
0100
TOR2 PF2
T2 T2
0101
C3 C4
T1 T1
TOR1 CF1
ACTIVE
PAUSE
1001
C3 C4
CF2
T2
T2
TOR2
Q1
Q2
QS
IDLE
IDLE ACTIVE IDLE
0000 1000 0010
ACTIVE
0000
C1 C2 C3 C4
T1
Q1:
CF1
Q2: C1 C2 C3 C4
T2
CF2
IDLE
1011
TRIGGERED
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
458 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Situation S5 (Figu re 18-2 7) shows that when multiple queue 2 trigger
events are detected while queue 1 is busy, the trigger overrun error bit
is set, but queue 1 execution is not disturbed. Situation S5 also shows
that the effect of queu e 2 trigger ev ents d uring queue 1 executio n is th e
same when the pause feature is in use in either queue.
Figure 18-27. CCW Priority Situation 5
The remaining situations, S6 through S11, show the impact of a queue 1
trigger event occurring during queue 2 execution. Queue 1 is higher in
pri ority, the conversio n taking pl ace in queue 2 is abor ted, so that there
is not a variable latency time in respondi ng to queue 1 trigger events.
Q1
Q2
QS
IDLE
IDLE IDLE
0000 1000 0010
ACTIV E
0000
C1 C2
T1
Q1:
C1 C2
PF2
C3 C4
C3 C4
CF2
IDLE
1011
TRIG
Q2:
T2T2 PF1
PAUSE
ACTIV E PA U SE
TOR1
T2T2 CF1
TOR1
T1
ACTIVE
TRIG
0110
ACTI VE
ACTI VE
0101 1001 1011
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 459
In situation 6 (Figure 18-28), the conversion initiated by the second
CCW in queue 2 is aborted just before the conversion is complete, so
that queue 1 execution can begin. Queue 2 is considered suspended.
After queue 1 is finished, queue 2 starts over with the first CCW, when
the RES (resume) control bit is set to 0. Situation S7 (Figure 18-29)
shows that when pause operation is not in use with queue 2, queue 2
suspension works the same way.
Figure 18-28. CCW Priority Situation 6
Figure 18-29. CCW Priority Situation 7
IDLE
Q1
Q2
QS
IDLE
IDLE
0000 1000
ACTIV E
C1 C2
T1
Q1:
C1
C3 C4
IDLE
Q2:
PF1
PAUSE
ACTIV E
CF1
T1
ACTIV E
SUSPE ND
0100
ACTIVE
ACTIVE
0110 1010
C1 C2 C3 C4
CF2
T2
0010 0000
RESUME=0
C2
IDLE
Q1
Q2
QS
IDLE
IDLE
0000 1000
ACTIVE
C1 C2
T1
Q1:
C1
C3 C4
IDLE
Q2:
PF1
PAUSE
ACTIVE
CF1
T1
ACTIVE
SU SPEND
0100
ACTIVE
ACTIVE
0110 1010
C1 C2 C3 C4
CF2
T2
0010 0000
RESUME = 0
C2
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
460 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Situatio ns S8 a nd S9 (Figure 18-30 and Figur e 18-31 ) r epeat the same
two situa tions wi th the RE SUME bit set to a 1. When the RE S bit is set,
following suspension, queue 2 resumes execution with the aborted
CCW, not the first CCW in the queue.
Figure 18-30. CCW Priority Situation 8
Figure 18-31. CCW Priority Situation 9
IDLE
Q1
Q2
QS
IDLE
IDLE
0000 1000 0010
ACTIVE
C1 C2
T1
Q1:
C1
C3 C4
IDLE
Q2:
PF1
PAUSE
ACTIVE
CF1
T1
ACTIVE
SU SPEND
0100
ACTIVE
ACTIVE
0110 1010
C2 C3 C4
CF2
T2
0000
RESUME=1
C2
T1
PAUSE
Q1
Q2
QS
IDLE ACTIVE
IDLE ACT IDLE
0010 0110 1010 0010
ACTIVE
0000
IDLE
Q1:
PF1
C1 C2
0000 1010 0101
ACTIVE
PAUSE
0110
C1
Q2:
T2
C2
PF2
T1
C3 C4
CF1
C4
CF2
SUSPEND ACT ACTIVE SUSPEND
T2
C3C1 RESUME=1
C2 C4
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 461
Situations S10 and S11 (Figure 18-32 and Figure 18-33) show that
whe n an additional trigger event is detected for queu e 2 wh ile the q ueue
is suspend ed, the t ri gge r ove rru n er ror bit is set, the same as i f qu eue 2
were being executed when a new trigger event occurs. Trigger overrun
on queue 2 thus permits the software to know that queue 1 is taking up
so much QADC time that queue 2 trigger events are being lost.
Figure 18-32. CCW Priority Situation 10
Figure 18-33. CCW Priority Situation 11
T1 T1
PAUSE
Q1
Q2
QS
IDLE ACTIVE
IDLE A CTI VE IDLE
0010 0110 1010 0010
ACTIV E
0000
IDLE
Q1:
PF1
C1 C2
0000 1010 0101
ACTIVE
PAUSE
0110
Q2:
T2
PF2
C1 C2
C3 C4
CF1
C3 C4
CF2
T2
C3
SUSPEND ACTIV E
C1
ACT SUSPEND
T2
TOR2
T2
TOR2
RESUME = 0
C2
T1 T1
C3 C4
CF1
PAUSE
Q1
Q2
QS
IDLE ACTIVE
IDLE ACT IDLE
0010 0110 1010 0010
ACTIVE
0000
IDLE
Q1:
PF1
C1 C2
0000 1010 0101
ACTIVE
PAUSE
0110
Q2:
T2
SUSPEND ACT
C1
ACTIVE SU SPEN D
T2
TOR2
T2
TOR2
C2
PF2
C4
CF2
T2
C3
C2 C4 RESUME = 1
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
462 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
The previous situations cover normal overlap conditions that arise with
asynchron ous trigger events on the two queues. An additional conflict to
consider is that the freeze cond ition can arise while the QADC is actively
executing CCWs. The conventional use for the debug mode is for
software/hardware debugging. When the CPU background debug mode
is enabled and a breakpoint occurs, the freeze signal is issued, which
can cause peripheral modules to stop operation. When freeze is
detected, the QADC completes the conversion in progress, unlike queue
1 suspe nding queue 2. After the free ze condition is re moved, the QADC
continues queue execution with the next CCW in sequence.
Trigger events that occur during freeze are not captured. When a trigger
event is pending for queue 2 before freeze begins, that trigger event is
remembered when the freeze is passed. Similarly, when freeze occurs
while queue 2 is suspended, after freeze, queue 2 resumes execution as
soon as queue 1 is finished.
Situations 12 through 19 (Figure 18-34 to Figure 18-41) show examples
of all of the freeze situations.
Figure 18-34. CCW Freeze Situation 12
Figure 18-35. CCW Freeze Situation 13
C3 C4
CF1
C1 C2
T1
Q1:
FREEZE
C1 C2
T2
Q2:
CF2
C3 C4
FREEZE
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 463
Figure 18-36. CCW Freeze Situation 14
Figure 18-37. CCW Freeze Situation 15
Figure 18-38. CCW Freeze Situation 16
C1 C2
T1
Q1:
CF1
C3 C4
FREEZE
T1 T1
T2 T2
(TR IG GERS IGNORE D)
C1 C2
T2
Q2:
CF2
C3 C4
FREEZE
T2 T2
T1 T1
(TR IG G ER S IGNO RE D)
C1 C2
T1
Q1:
CF1
C3 C4
FREEZE
T1 T1
PF1
(TRI G G E RS IGNORED)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
464 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Figure 18-39. CCW Freeze Situation 17
Figure 18-40. CCW Freeze Situation 18
Figure 18-41. CCW Freeze Situation 19
C1 C2
T2
Q2:
CF2
C3 C4
FREEZE
T2 T2
PF2
(TR IG G ER S IGNO RE D)
C1 C2
T1
Q1:
CF1
C3 C4
FREEZE
T2
C1 C2
Q2: C3
CF2
C4
(TR I GGER CA PTUR ED , RESPONS E DEL AYED AF TER FREEZE )
C1 C2
T1
Q1:
CF1
C4
FREEZ E
CF2
C4
C1 C2
T2
Q2: C3
C3
C4
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 465
18.10.2 Boundary Conditions
The queue operation boundary conditions are:
The first CCW in a queue contains channel 63, the end-of-queue
(EOQ) code. The queue becom es active and the first CCW is
read. The end-of-queue is recognized, the completion flag is set,
and the queue becomes idle. A conversion is not performed.
BQ2 (beginning of queue 2) is set at the end of the CCW table (63)
and a trigger event occurs on queue 2. The end-of-queue
condition is recognized, a conversion is performed, the completion
flag is set, and the queue becomes idle.
BQ2 is set to C CW0 and a tr i gger event occur s on que ue 1. A fter
reading CCW0, the end-of-queue condition is recognized, the
completi on flag is set, and the queue b ecome s i dle. A conver sion
is not performed.
BQ2 (beginning of queue 2) is set beyond the end of the CCW
table (64127) and a trigger event occurs on queue 2. The
end-of-queue condition is recognized immediately, the completion
flag is set, and the queue becomes idle. A conversion is not
performed.
NOTE: Multiple end-of-queue conditions may be recognized simultaneously,
alth ough ther e is no chan ge in the QADC be havior. Fo r example, if BQ2
is set to CCW0, CCW0 contains the EOQ code, and a trigger event
occurs on queue 1, the QADC reads CCW0 and detects both
end-of-queue conditions. The completion flag is set and queue 1
becomes idle.
Boundary conditions also exist for combinations of pause and
end-of-queue. One case is when a pause bit is in one CCW and an
end-of -que ue condition is in t he next CCW . The conversion sp ecified by
the CCW with the pause bit set completes normally. The pause flag is
set. However, since the end-of-queue condition is recognized, the
completion flag is also set and the queue status becomes idle, not
paused. Examples of this situation include:
The pause bit is set in CCW5 and the channel 63 (EOQ) code is
in CCW6.
The pause is in CCW63.
During queue 1 operation, the pause bit is set in CCW20 and BQ2
points to CCW21.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
466 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Another pause and end-of-queue boundary condition occurs when the
pause and an end-of- queue condi tion occur in the same CC W. Both the
pause a nd end-of-queue conditions are recognized simu ltaneously. The
end-of-queue condition has precedence so a conversion is not
performed for the CCW and the pause flag is not set. The QADC sets the
completion flag and the queue status becomes idle. Examples of this
situation are:
The pause bit is set in CCW10 and EOQ is programmed into
CCW10.
During queue 1 operation, the pause bit set in CCW32, which is
also BQ2.
18.10.3 Scan Modes
The QADC queuing mechanism allows the application to utilize different
requirements for automatically scanning input channels.
In single-scan mode, a single pass through a sequence of conversions
defined by a queue is performed. In continuous-scan mode, multiple
passes through a sequence of conversions defined by a queue are
executed. The possible modes are:
Disabled mode and reserved mode
Software-initiated single-scan mode
External trigger single-scan mode
External gated single-scan mode
Interval timer single-scan mode
Software-initiated continuous-scan mode
External trigger continuous-scan mode
External gated continuous-scan mode
Periodic timer continuous-scan mode
These paragraphs describe single-scan and continuous-scan
operations.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 467
18.10.4 Disabled Mode
When the disabled mode is selected, the queue is not active. Trigger
events cannot initiate queue execution. When both queue 1 and queue 2
are di sab led, wait states are not encount ered for IP bus accesses of the
RAM. When both queues are disabled, it is safe to change the QCLK
prescaler values.
18.10.5 Reserved Mode
Reserved mode allows for future mode definitions. When the reserved
mode is selected, the queue is not active. It functions the same as
disabled mode.
18.10.6 Single-Scan Modes
When the application software wants to execute a single pass through a
sequence of conversions defined by a queue, a single-scan queue
operating mod e is selecte d. B y prog ramm ing th e MQ fi eld i n QACR1 or
QACR2, these modes can be selected:
Software-initiated single-scan mode
External trigger single-scan mode
External gated single-scan mode
Interval timer single-scan mode
NOTE: Queue 2 cannot be programmed for external gated single-scan mode.
In all single-scan queue operating modes, the software must also enable
the queu e to begin execution by writing the single-sca n enable bit to a 1
in the queues control register. The single-scan enable bits, SS E1 and
SSE2, are provided for queue 1 and queue 2 respectively.
Until the single-scan enable bit is set, any trigger events for that queue
are ignored. The single-scan enable bit may be set to a 1 during the write
cycle, which selects the single-scan queue operating mode. The
single-scan enable bit is set through software, but will always read as
a 0. Onc e set, writing the single-sca n ena ble b it to 0 has no e ffect. Only
the QADC can clear the single-scan enable bit. The completion flag,
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
468 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
completion interrupt, or queue status are used to determine when the
queue has completed.
After the single- scan enabl e bit is set, a trigger even t cau s es th e QADC
to begin execution with the first CCW in the queue. The single-scan
enable bit remains set until the queue is completed. After the queue
reaches co mpl et ion, the QADC r esets the single- scan ena bl e bit to 0. If
the single-scan enable bit is written to a 1 or a 0 by the software before
the queue scan is complete, the queue is not affected. However, if the
sof tware chan ges the que ue oper ating mode, the new queue oper ating
mode and the value of the single-scan enable bit are recognized
immedi at ely. The conversi o n in prog ress is abor ted an d the new qu eue
operating mode takes effect.
In the software-initiated single-scan mode, the writing of a 1 to the
single-scan enable bit causes the QADC to generate a trigger event
internally and the queue execution begins immediately. In the other
single-scan queue operating modes, once the single-scan enable bit is
written, the selected trigger event must occur before the queue can start.
The single-scan ena ble bi t allows the entir e qu eue t o be scanne d on ce.
A trigger overrun is captured if a trigger event occurs during queue
execution in an edge-sensitive external tr igger mode or a
periodic/interval timer mode.
In the i nte rval ti mer si ng le-scan m ode, the next exp ir ation of the timer is
the trigger event for the queue. After the queue execution is complete,
the que ue status is shown as idle. The software can restart the queue by
setting the single-scan enable bit to a 1. Queue execution begins with
the first CCW in the queue.
18.10.6.1 Software-Initiated Single-Scan Mode
Software can initiate the execution of a scan sequence for queues 1 or 2
by selecting the software-initiated single-scan mode, and writing the
single-scan enable bit in QACR1 or QACR2. A trigger event is generated
inte rnally and the Q ADC im med iatel y be gins e xecution of the fir st CCW
in the queue. If a pause occurs, another trigger event is generated
internally, and then execution continues w ithout pausing.
The QADC automatically performs the conversions in the queue until an
end-of -queue condition is encountered. The que ue remains idle until the
software again sets the single-scan enable bit. While the time to
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 469
inte rnally gener ate and act on a trigg er event is very s hort, softw are can
momentarily read the status conditions, indicating that the queue is
paused. The trigger overrun flag is never set while in the
software-initiated single-scan mode.
The software-initiated single-scan mode is useful in these applications:
Allows software complete control of the queue execution
Allows the software to easily alternate between several queue
sequences
18.10.6.2 External Trigger Single-Scan Mode
The exte rnal t rigger single- scan mo de i s ava ila ble on b oth qu eue 1 a nd
queue 2. Th e software programs the polarity of the external trigger edge
that is to be detected, either a rising or a falling edge. The software must
enable the scan to occur by setting the single-scan enable bit for the
queue.
The first external trigger edge causes the queue to be executed one
time. Each CCW is read and the indicated conversions are performed
until an end-of-queue condition is encountered. After the queue is
completed, the QADC clears the single-scan enable bit. Software may
set the single-scan enable bit again to allow another scan of the queue
to be initiated by the next external trigger edge.
The external trigger single-scan mode is useful when the input trigger
rate can exceed the queue execution rate. Analog samples can be taken
in sync with an external event, even though the software is not interested
in data taken from every edge. The software can start the external trigger
single-scan mode and get one set of data, and at a later time, start the
queue again for the next set of samples.
When a pause bit is encountered during external trigger single-scan
mode, another trigger event is required for queue execution to continue .
Software involvement is not needed to enable queue execution to
continue from the paused state.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
470 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.10.6.3 External Gated Single-Scan Mode
The QADC provides external gating for queue 1 only. When external
gated single-scan mode is selected, the input level on the associated
ext erna l trigger pin enables and disables queue exe c ution. Th e polari ty
of the external gated signal is fixed so only a high level opens the gate
and a low level closes the gate. Once the gate is open, each CCW is
read and the indicated conversions are performed until the gate is
closed. Software must enable the scan to occur by setting the
sing le-scan ena ble bit for queue 1. If a pa use in a CC W is e ncount ered ,
the pause flag does not become set, and execution continues without
pausing.
While the gate is open, queue 1 executes one time. Each CCW is read
and the indicated conversions are performed until an end-of-queue
condi tion is encounter ed. When queue 1 complete s, the QADC sets the
completion flag (CF1) and clears the single-scan enable bit. Software
may set th e single- scan enable bit a gain to al low another scan of queue
1 to be initiated during the next open gate.
If the ga te closes before queue 1 completes execution, the current CCW
completes, execution of queue 1 stops, the single-scan enable bit is
cleared, and the PF1 bit is set. Software can read the CWPQ1 to
determ i ne the last valid con v ersion in the queue . Sof tware m ust set the
single-scan enable bit again and should clear the PF1 bit before another
scan of qu eue 1 is initiated during the next open gate. The start of queue
1 is always the first CCW in the CCW table.
Since the condition of the gate is only sampled after each conversion
during queue execution, closing the gate for a period less than a
conversion time interval does not guarantee the closure will be captured.
18.10.6.4 Interval Timer Single-Scan Mode
Both queues can use the periodic/interval timer in a single-scan queue
operating mode. The timer interval can range from 128 to 128 KQCLK
cycles in binary multiples. When the interval timer single-scan mode is
sele cted and the softwar e sets the single-scan enabl e bit in QACR1( 2),
the timer begins counting. When the time interval elapses, an internal
trigger event is created to start the queue and the QADC begins
execution with the first CCW.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 471
The QADC automatically performs the conversions in the queue until a
pause or an end-of-queue condition is encountered. When a pause
occurs, queue execution stops until the timer interval elapses again, and
queue execution continues. When the queue execution reaches an
end-of-queue situation, the single-scan enable bit is cleared. Software
may set the single-scan enable bit again, allowing another scan of the
queue to be initiated by the interval timer.
The interval timer generates a trigger event whenever the time interval
elapses. The trigger event may cause the queue execution to continue
following a pause, or may be considered a trigger overrun. Once the
queue execution is completed, the single-scan enable bit must be set
again to enable the timer to count again.
Normally, only one queue will be enabled for interval timer single-scan
mode and the timer will reset at the end-of-queue. However, if both
queues are enabled for either single-scan or continuous interval timer
mode, the end-of -queue con dition will not reset the timer while the other
queue is a ctive. In this case, t he timer will reset when b oth queues h ave
reached end-of-queue. See 18.10.9 Periodic/Interval Timer for a
definition of interval timer reset conditions.
The interval timer single-scan mode can be used in applications which
need cohe rent results, for example:
When it is n ecessary that all sam ples ar e guar antee d to be taken
during the same scan of the analog pins.
When the interrupt rate in the periodic timer continuous-scan
mode would be too high.
In sensitive battery applications, where the single-scan mode uses
less power than the software-initiated continuous-scan mode.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
472 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.10.7 Continuous-Scan Modes
When the application software wants to execute multiple passes through
a sequence of conversions defined by a queue, a continuous-scan
queue operating mode is sele cted. By programming the MQ1(2) fi eld in
QACR1(2), these software-initiated modes can be selected:
Software-initiated continuous-scan mode
External trigger continuous-scan mode
External gated continuous-scan mode
Periodic timer continuous-scan mode
When a queue is programmed for a continuous-scan mode, the
single-scan enable bit in the queue control register does not have any
meaning or effect. As soon as the queue operating mode is
programmed, the selected trigger event can initiate queue execution.
In the case of the software-initiated continuous-scan mode, the trigger
event is generated internally and queue execution begins immediately.
In the other continuous-scan queue operating modes, the selected
tri gger event mu st occur be fore the queue can start. A trigger over run is
capt ured if a trigger event occu rs during queue e xecution in the e xternal
trigger continuous-scan mode and the periodic timer continuous-scan
mode.
After the queue execution is complete, the queue status is shown as idle.
Since the continuous-scan queue operating modes allow the entire
queue to be scanned multiple times, software involvement is not needed
to enable queue execution to continue from the idle state. The next
trigger event causes queue execution to begin again, starting with the
first CCW in the queue.
NOTE: Coherent samples are guaranteed. The time between consecutive
conv ersions has been designed to be con sistent. Howeve r, there is one
exception. For queues that end with a CCW containing EOQ code
(channel 63), the last queue conversion to the first queue conversion
requires one additional CCW fetch cycle. Therefore continuous samples
are not coherent at this boundary.
In addition, the time from trigger to first conversion can not be
guaranteed since it is a function of clock synchronization, programmable
trigger events, queue priorities, and so on.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 473
18.10.7.1 Software-Initiated Continuous-Scan Mode
When the softwar e-ini tia ted continuous-scan mode is progr amm ed, the
trigger event is generated automatically by the QADC. Queue execution
begins immediately. If a pause is encountered, another trigger event is
generated internally, and then execution continues without pausing.
When the end-of-queue is reached, another internal trigger event is
generated and queue execut ion begins aga in from the be ginning of the
queue.
While the time to internally generate and act on a trigger event is very
short, software can momentarily read the status conditions, indicating
that the queue is idle. The trigger overrun flag is never set while in the
software-initiated continuous-scan mode.
The softwar e-i n itiated cont in uous- scan mod e keeps the result re gisters
updated more fre quen tl y than any of the other queue operatin g modes.
The software can always read the result table to get the latest converted
value for each channel. The channels scanned are kept up to date by the
QADC without software involvement. Software can read a result value at
any time.
The software-initiated continuous-scan mode may be chosen for either
queue, but is normally used only with queue 2. When the
software-initiated continuous-scan mode is chosen for queue 1, that
queue o pera tes continuously and qu eue 2, being lower in priority, neve r
gets execute d. The shor t interv al of time betw een a queue 1 completion
and the subsequent trigger event is not sufficient to allow queue 2
execution to begin.
The software-initiated continuous-scan mode is a useful choice with
queue 2 for conver ti ng ch annels that d o not need to be synchr onized to
anything, or for the slow-to-change analog channels. Interrupts are
normally not used with the software-initiated continuous-scan mode.
Rather, the software reads the latest conversion result from the result
table at any time. Once initiated, software action is not needed to sustain
conversions of channel.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
474 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.10.7.2 External Trigger Continuous-Scan Mode
The QADC provides external trigger pins for both queues. When the
external trigger software-initiated continuous-scan mode is selected, a
transition on the associated external trigger pin initiates queue
execution. The polarity of the external trigger signal is programmable, so
that the software can select a mode which begins queue execution on
the rising or fal ling edge. Each CCW is read and the indicated
conversions are performed until an end-of-queue condition is
encountered. When the next external trigger edge is detected, the queue
execution begins again automatically. Software initialization is not
needed between trigger events.
When a pause bit is encountered in external trigger continuous-scan
mode, another trigger event is required for queue execution to continue .
Software involvement is not needed to enable queue execution to
continue from the paused state.
Some applications need to synchronize the sampling of analog channels
to external events. There are cases when it is not possible to use
software initiation of the queue scan sequence, since interrupt response
times vary.
18.10.7.3 External Gated Continuous-Scan Mode
The QADC provides external gating for queue 1 only. When external
gated continuous-scan mode is selected, the input level on the
associated external trigger pin enables and disables queue execution.
The polarity of the external gated signal is fixed so a high level opens the
gate an d a l o w level close s the gate. Once th e ga te i s op en, e ach CCW
is read and the indicated conversions are performed until the gate is
close d. When the gate opens again , the queue executi on au tomat ically
begins again from the beginning of the queue. So ftware initialization is
not need ed between trigger events. If a pause in a CCW is encou ntered,
the pause flag does not become set, and execution continues without
pausing.
The pu rpose of exte rnal gated co ntinuou s-scan mode is to conti nuously
collect digitized samples while the gate is open and to have the most
recent samples available. It is up to the programmer to ensure that the
queue is large enoug h so that a maximum gate open time will not reach
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 475
an end-of-queue. However it is useful to take advantage of a smaller
queue in the manner described in the next paragraph.
In the event that the queue completes before the gate closes, a
completion flag will be set and the queue will roll over to the beginning
and co ntinue conversions until the g ate clo ses. If the gate r emains ope n
and the completion flag is not cleared, when the queue completes a
second time the trigger overrun flag will be set and the queue will
roll -over agai n. T he que ue will con tinue to exe cute unt il the gate closes
or the mode is disabled.
If the ga te closes before queue 1 completes execution, the current CCW
completes execution of queue 1 stops and QADC sets the PF1 bit to
indicate an incomplete queue. Software can read the CWPQ1 to
determine the last valid con version in the queue. In this mode, if the gate
opens aga in, execut ion of que ue 1 begi ns again. The sta rt of queue 1 is
always the first CCW in the CCW table. Since the condition of the gate
is only sampled after each conversion during queue execution, closing
the gate for a period less than a conversion time interval does not
guarantee the closure will be captured.
18.10.7.4 Periodic Timer Continuous-Scan Mode
The QADC includes a dedicated periodic timer for initiating a scan
sequence on queue 1 and/or queue 2. Software selects a programmable
tim er interval ra nging f rom 128 to 128K times the QC LK period i n binary
multiples. The QCLK period is prescaled down from the IPbus MCU
clock.
When a periodic timer continuous-scan mode is selected for queue 1
and/or queue 2, the timer begins counting. After the programmed
inte rval elapse s, th e timer generate d trigger event starts the a ppropriate
queue. Meanwhile, the QADC automatically performs the conversions in
the queue until an end-of-queue condition or a pause is encountered.
When a pause occurs, t he QADC wa its for th e peri odic interva l to expire
again, then continues with the queue. Once end-of-queue has been
detected , t he next tri gger event cau ses queu e executio n to beg in again
with the first CCW in the queue.
The periodic timer generates a trigger event whenever the time interval
elapses. The trigger event may cause the queue execution to continue
follow ing a pause or queue completion, or may be considered a trigger
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
476 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
overrun. As with all continuous-scan queue operating modes, software
act ion is no t nee ded between trigger eve nts. Since both queue s may be
triggered by the periodic/interval timer, see 18.10.9 Periodic/Interval
Timer for a summary of periodic/interval timer reset conditions.
Software enables the completion interrupt when using the periodic timer
continuous-scan mode. When the interrupt occurs, the software knows
that the periodically collected analog results have just been taken. The
software can use the periodic interrupt to obtain nonanalog inputs as
well, such as contact closures, as part of a periodic look at all inputs.
18.10.8 QADC Clock (QCLK) Generation
Fi gu re 18-4 2 is a block diagram of the clock subsystem. The QCLK
provides the timing for the A/D converter state machine which controls
the timing of the conversion. The QCLK is also the input to a 17-stage
binary divider which implements the periodic/interval timer. To retain the
specified analog conversion accuracy, the QCLK frequency (fQCLK)
must be within the tolerance specified in Section 22. Electrical
Specifications.
Before using the QADC, the software must initialize the prescaler with
values that put the QCLK within the specified range. Though most
sof tware appli cat ions initiali ze the pre scaler once and do not change it,
write operations to the prescaler fields are permitted.
NOTE: For software compatibility with earlier versions of QADC, the definition of
PSL, P SH, and PSA ha ve been mai ntained. Howe ver, the requir ements
on minimum time and minimum low time no longer exist.
CAUTION: A change in the prescaler value while a conversion is in progress is likely
to corrupt the result from any conversion in progress. Therefore, any
prescal er wr ite oper ation sh oul d be do ne only when bo th queu es are i n
the disabled modes.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 477
Figure 18-42. QADC Clock Subsystem Functions
To accommodate wide variations of the main MCU clock frequency
(IPbus system clock fsys), QCLK is generated by a programmable
prescaler which divides the MCU system clock. To allow the A/D
conversion time to be maximized across the spectrum of system clock
frequencies, the QADC prescaler permits the frequency of QCLK to be
software select able. It also allows the duty cycle of the QCLK waveform
to be programmable.
The software establishes the basic high phase of the QCLK waveform
with the PSH (pr escaler clock high time) fi eld in QACR0 and sel ects the
basic low phase of QCLK with the PS L (prescaler clock low time) field.
The combination of the PSH and PSL parameters establishes the
frequency of the QCLK.
ATD CONV E RTE R
STATE MACHINE
27 28 29 210 211 212 213 214 215 216 217
PERIODIC TIMER/INTERVAL TIMER
SELECT
BINARY COUNTER
QUEUE1 AND QUEUE2 TIMER
MODE RATE SELECTION [8]
INPUT SAMPLE TIME
FRO M CCW [2 ] SAR [1 0]
SAR CONTROL
PERIODIC/INTERVAL TRIGGER
EVENT FO R Q1 AN D Q2 [2]
ONES COMPLEMENT
COMPARE
ZERO
DETECT
CLOCK
GENERATE
[5]
5-BIT
DO WN CO UNT E R
SYSTEM CLOCK (fsys)
HIGH-TIME
CYCLE S (P SH ) [5]
LOW-TIME
CYCLES (PSL) [3]
[3]
SET QCLK
QCLK
LOAD PSH
fsys/2 to fsys/40
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
478 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
NOTE: The guideline for selecting PSH and PSL is to maintain approximately
50 percent d uty cycle ; for pr escaler values less th an 1 6 or P SH ~=PSL.
For prescaler values greater than 16, keep PSL as large as possible.
Fi gu re 18-4 2 shows that the prescaler is essentially a variable pulse
width signal generator. A 5-bit down counter, clocked at the system clock
rate, is used to create both the high phase and the low phase of the
QCLK signal. At the beginning of the high phase, the 5-bit counter is
loa ded with the 5-bit PSH value. W hen the 0 detector finds that the high
phase is finished, the QCLK is reset. A 3-bit comparator looks for a ones
compl ement m atch w ith th e 3- bit P SL val ue, which i s the en d of t he low
phase of the QCLK.
These equations define QCLK frequency:
high QCLK time = (PS H + 1) ÷ fsys
low QCLK time = (PSL + 1) ÷ fsys
fQCLK = 1 ÷ (high QCLK time + low QCLK time)
Where:
PSH = 0 to 31, the prescaler QCLK high cycles in QACR0
PSL = 0 to 7, the prescaler QCLK low cycles in QACR0
fsys = system clock frequency
fQCLK = QCLK frequency
These are equations for calculating the QCLK high and low phases in
example 1:
high QCLK time = (11 + 1) ÷ 40 × 106 = 300 ns
low QCLK time = (7 + 1) ÷ 40 × 106 = 200 ns
fQCLK = 1/(300 + 200) = 2 MHz
These are equations for calculating the QCLK high and low phases in
example 2:
high QCLK time = (7 + 1) ÷ 32 × 106 = 250 ns
low QCLK time = (7 + 1) ÷ 32 × 106 = 250 ns
fQCLK = 1/(250 + 250) = 2 MHz
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 479
Fi gu re 18-4 3 and Table 18-15 show examples of QCLK
programmability. The examples include conversion times based on this
assumption:
Input sample time is as fast as possible (IST = 0, 2 QCLK cycles).
Figure 18-43 and Table 18-15 also show the conversion time calculated
for a single conversion in a queue. For other MCU system clock
freque ncies an d other input samp le times, the same calcu lations can be
made.
Figure 18-43. QADC Clock Programmability Examples
NOTE: PSA is maintained for software compatibility but has no functional
benefit to this version of the module.
The MCU system clock fr equen cy is the basis of the QADC timing . The
QADC requires that the system clock frequency be at least twice the
QCLK frequency. The QCLK frequency is establ ished by the
combi natio n o f the P SH and PSL par ame ters in QA CR 0. The 5- bit P SH
field selects the numb er of system clock cycles in the high phase of the
QCLK wave. The 3-bit PSL field selects the number of system clock
cycles in the low phase of the QCLK wave.
SYSTEM
CLOCK (fsys)
QCLK
EXAMP LE 1
QCLK
EXAMP LE 2 20 CYCLE S
Table 18-15. QADC Clock Programmability
Control Register 0 Information Input Sample Time
IST = Binary 00
Example Number Frequency PSH PSL QCLK
(MHz) Convers ion Time
(µs)
1 40 MHz 11 7 2.0 7.0
2 32 MHz 7 7 2.0 7.0
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
480 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Example 1 in Figure 18-43 shows that when PSH = 11, the QCLK
remains high for 12 cycles of the system clock. It also shows that when
PSL = 7, the QCLK remains low for eight system clock cycles. In
Examp le 2 , PSH = 7, and the QCLK rema ins h igh for eight cycles o f the
system clock. It also shows that when PSL = 7, the QCLK remains low
for eight system clock cycles.
18.10.9 Periodic/Interval Timer
The on-chip periodic/interval timer can be used to generate trigger
events at a programmable interval, initiating execution of queue 1 and/or
queue 2. The periodic/interval timer stays reset under these conditions:
Both queue 1 and queue 2 are programmed to any mode which
does not use the periodic/interval timer.
IPbus system reset is asserted.
Stop mode is selected.
Debug mode is selected.
NOTE: In terval time r singl e-sca n mode does not use the peri odic/inter val ti mer
until the single-scan enable bit is set.
These conditions will cause a pulsed reset of the periodic/interval timer
during use:
A queue 1 operating mode change to a mode which uses the
periodic/interval timer, even if queue 2 is already using the timer
A queue 2 operating mode change to a mode which uses the
periodic/interval timer, provided queue 1 is not in a mode which
uses the periodic/interval timer
Roll over of the timer
During the low-power stop mode, the periodic/interval timer is held in
reset. Since low-power stop mode causes QACR1 and QACR2 to be
reset to 0, a valid periodic or interval timer mode must be written after
stop mode is exited to release the timer from reset.
When the IPbus internal FREEZE line is asserted and a periodic or
interval timer mode is selected, the timer counter is reset after the
conversion in progress completes. When the periodic or interval timer
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 481
mode has been enabled (the timer is counting), but a trigger event has
not been issued, the debug mode takes effect immediately, and the timer
is held in reset. When the internal FREEZE line is negated, the timer
counter starts counting from the beginning. Refer to 18.5.1 Debug Mode
for more information.
18.10.10 Conversion Command Word Table
The conversion command word (CCW) table is a RA M, 64 words long
on 16-bit address boundaries where 10 bits of each entry are
imp lemen ted. A CCW can be prog ramm ed b y the soft wa re to requ est a
conversion of one analog input channel. The CCW table is written by
software and is not modified by the QADC. Each CCW requests the
conversion of an analog channel to a digital result. The CCW specifies
the analog channel number, the input sample time, and whether the
queue is to pause after the current CCW. The 10 implemented bits of the
CCW word are read/write data, where they may be written when the
software initializes the QADC. The remaining six bits are unimplemented
so these read as 0s, and write op erations have no effect. Each location
in the CCW table corresponds to a location in the result word table.
When a conversion is completed for a CCW entry, the 10-bit result is
written in the corresponding result word entry. The QADC provides 64
CCW table entries.
The begi nnin g of que ue 1 i s th e fir st l ocat ion in the CCW tabl e. Th e fir st
location of queue 2 is specified by the beginning of queue 2 po inter
(BQ2) in QACR2. To dedicate the entire CCW table to queue 1, queue
2 is programmed to be in the disabled mode, and BQ2 is progra mmed to
64 or greater. To dedicate the entire CCW table to queue 2, queue 1 is
programmed to be in the disabled mode, and BQ2 is specified as the first
location in the CCW table.
Fi gu re 18-4 4 illustrates the operation of the queue structure.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
482 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Figure 18-44 . QADC Conversion Qu eue Operation
To prepare the QADC for a scan sequence, the software writes to the
CCW table to specify the desired channel conversions. The software
also establishes the criteria for initiating the queue execution by
programming the queue operating mode. The queue operating mode
determ ines what typ e of trigger eve nt causes queue exe cution to begin.
A trigger event refers to any of the ways to cause the QADC to begin
exec uting the CCW s in a queue or subqueue. A n externa l trigger is only
one of the possible trigger events.
A scan sequence may be initiated by:
A software command
Expiration of the periodic/interval timer
External trigger signal
External gated signal (queue 1 only)
BEGINNI N G OF QUEUE 1 00
CHANN EL SELECT,
SAMPL E , HO LD ,
A /D CONVE RSION
CONVE RS IO N CO MMA ND RESULT WORD TABLE
WORD (CCW) T ABLE
00
END OF QUEUE 1
BEGINNI N G OF QUEUE 2
END OF QUEUE 263 63
BYP
PIST CHAN
89 [7:6] [5:0]
P PAUSE AF TER CONVER SI ON
UNTIL NEXT TRIGGER
BYP BYP ASS BU FFER AMPLI F IER
IST INPUT SAMPLE TIME
CHAN CHANNEL NUMBER AND
END-O F- Q UE UE CO DE
10-BIT CONVERSION COMMAND
WORD FORMA T
0RESULT
[9:0]
10-BIT RESU LT , READ ABLE IN
THREE 16-BIT FORM AT S
00000
15 14 13 12 11 10
0
RESULT 00000
RIGHT-JUST IFI ED, UNSIGNED RE SUL T
LEFT-JUSTIFIED, UNSIGNED RESULT
LEFT-JUSTIFIED, SIGNED RESULT
0
RESULT 0 0 0 0 0S
[5:0]
[5:0]
[15:6]
[15:6]
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 483
The software also specifies whether the QADC is to perform a single
pass through the queue or is to scan continuously. When a single-scan
mode is selected, the software selects the queue operating mode and
sets the single-scan enable bit. When a continuous-scan mode is
selected, the queue remains active in the selected queue operating
mode after the QADC completes each queue scan sequence.
During queue execution, the QADC reads each CCW from the active
queue and executes conversions in four stages:
Initial sample
Final sample
Resolution
Duri ng ini tial sample, a buffer ed version of the selected input channel i s
connected to the sample capacitor at the input of the sample buffer
amplifier.
Dur ing the final sampl e pe riod, the sam ple bu ffer amplifier is bypa ssed,
and the multiplexer input charges the sample capacitor directly. Each
CCW specifies a final input sample time of 2, 4, 8, or 16 QCLK cycles.
When an analog-to-digital conversion is complete, the result is written to
the corresponding location in the result word table. The QADC continues
to sequentially execute each CCW in the queue until the end of the
queue is detected or a pause bit is found in a CCW.
When the pause bit is set in the current CCW, the QADC stops execution
of the queue until a new trigger event occurs. The pause status flag bit
is set, which may cause an interrupt to notify the software that the queue
has re ached the pause state. After th e tr igger event occur s , the pause d
state end s and the QA DC continue s to execute each CCW in t he queue
until another pause is encountered or the end of the queue is detected.
The end-of-queue condition is indicated by:
The CCW channel field is programmed with 63 ($3F) to specify the
end of the queue.
The end -of-queu e 1 is implied by the beginn ing of que ue 2, which
is specified in the BQ2 field in QACR2.
The physical end of the queue RAM space defines the end of
either queue.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
484 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
When any of the end-of-queue conditions is recognized, a queue
completion flag is set, and if enabled, an interrupt is issued to the
software. These situations prematurely terminate queue execution:
Since queue 1 is higher in priority than queue 2, when a trigger
event occur s on queue 1 durin g queue 2 exe cution, the execu tion
of queu e 2 is suspe nded by a borti n g the execu tion o f the CCW in
progress, and the queue 1 execution begins. When queue 1
exec ution is comp l eted, qu eue 2 con version s restar t with the fi rst
CCW entry in queue 2 or the first CCW of the queue 2 subqueue
being executed when queue 2 was suspended. Alternately,
conv ersions can restart with the abor ted queu e 2 CCW entry. The
RESUME bit in QACR2 allows the software to select where
queue 2 begi ns after suspension. By ch oosing to r e-execute a ll of
the suspended queue 2 queue and subqueue CCWs, all of the
samples are guaranteed to have been taken during the same scan
pass. However, a high trigger event rate for queue 1 can prohibit
the completion of queue 2. If this occurs, the soft ware may choose
to begin execution of queue 2 with the aborted CCW entry.
Software can change the queue operating mode to disabled
mode. Any conversion in progress for that queue is aborted.
Putting a qu eue i n to the disabl ed mod e doe s not power down the
converter.
Software can change the queue operating mode to another valid
mode. Any conversion in progress for that queue is aborted. The
queue rest arts at the beginning of the queue, once an appropriate
trigger event occurs.
For low-power operation, software can set the stop mode bit to
prepare the module for a loss of clocks. The QADC aborts any
conversion in progress when the stop mode is entered.
When the freeze enable bit is set by software and the IPbus
inte rnal FREEZE line is assert ed, the QADC fre ezes at the end of
the conversion in progress. When internal FREEZE is negated,
the QADC resumes queue execution beginning with the next
CCW entry. Refer to 18.5.1 Debug Mode for more information.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Digital Control
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 485
18.10.11 Result Word Table
The result word ta ble is a RAM, 64 words long and 10 bits wide . An entry
is wr itten by th e QA DC aft er co mpletin g an ana l og co nversion specifi e d
by the corresponding CCW table entry. Software can read or write the
result word table, but in normal operation, the software reads the result
word table to obtain analog conversions from the QADC.
Unimplemented bits are read as 0s, and write operations do not have
any effect.
While there is only one result word table, the data can be accessed in
three different data formats:
Right justified in the 16-bit word, with 0s in the higher order unused
bits
Left justified, with the most significant bit inverted to form a sign bit,
and 0s in the unused lower order bits
Left justified, with 0s in the lower order unused bits
The left justified, signed format corresponds to a half-scale, offset binary,
two’s complement data format. The data is routed onto the IPbus
accordi ng to the selecte d form at. The addre ss used to acce ss the table
determines the data alignment format. All write operations to the result
word table are right justified.
The three result data formats are produced by routing the RAM bits onto
the data bus. The software chooses among the three formats by read ing
the result at the memory address which produces the desired data
alignment.
The result word table is read/write accessible by software. During normal
operation, applications software only needs to read the result table.
Write ope ration s to th e tab l e ma y occur dur ing te st or deb ug br eakpo int
operation. When locations in the CCW table are not used by an
appl ication, s oftware could us e the corres ponding locations in the result
word table as scratch pad RAM, remembering that only 10 bits are
implemented. The result alignment is only implemented for software
read operations. Since write operations are not the normal use for the
result registers, only one write data format is supported, which is right
justified data.
NOTE: Some write operations, like bit manipulation, may not operate as
expected because the hardware cannot access a true 16-bit value.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
486 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.11 Pin Connection C onsiderations
The QADC requires accurate, noise-free input signals for proper
operation. This section discusses the design of external circuitry to
maximize QADC performance.
18.11.1 Analog Reference Pins
No A/D converter can be more accurate than its analog reference. Any
noise in the reference can result in at least that much error in a
conversion. The reference for the QADC, supplied by pins VRH and VRL,
should be low-pass filtered from its source to obtain a noise-free, clean
signal. In many cases, simple capacitive bypassing may suffice. In
extr eme cases, inductors or ferrite beads may be necessary if noise or
RF energy is present. Series resistance is not advisable since there is
an effective dc current requirement from the reference voltage by the
internal resistor string in the RC DAC array. External resistance may
introduce error in this architecture under certain conditions. Any series
devices in the filter network should contain a minimum amount of DC
resistance.
For accur ate conversion results, the analo g refer ence voltages must be
within the limits defined by VDDA and VSSA, as explained in this
subsection.
18.11.2 Analog Power Pins
The analog supply pins (V DDA and VSSA) define the li mits of the analog
reference voltages (VRH and VRL) and of the analog multiplexer inputs.
Fi gu re 18-4 5 is a diagram of the analog input circuitry.
Since the sample amplifier is powered by VDDA and VSSA, it can
accurate ly transfe r input signal le vels up to but not exceedin g VDDA and
down to but not below VSSA. If the input signal is outside of this range,
the output from the sample amplifier is clipped.
In addi tio n, VRH an d V RL must be with in the rang e de fined b y VDDA and
VSSA. As long as VRH is less than or equal to VDDA and VRL is greater
than or equal to VSSA and the sample amplifier has accurately
transferred the input signal, resolution is ratiometric within the limits
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Pin Conne ction Considerations
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 487
Figure 18-45. Equivalent Analog Input Circuitry
defined by VRL and VRH. If VRH is greater than VDDA, the sample
amplifier can never transfer a full-scale value. If VRL is less than VSSA,
the sample amplifier can never transfer a 0 value.
In addi tio n, VRH an d V RL must be with in the rang e de fined b y VDDA and
VSSA. As long as VRH is less than or equal to VDDA and VRL is greater
than or equal to VSSA and the sample amplifier has accurately
transferred the input signal, resolution is ratiometric within the limits
defined by VRL and VRH. If VRH is greater than VDDA, the sample
amplifier can never transfer a full-scale value. If VRL is less than VSSA,
the sample amplifier can never transfer a 0 value.
Figu re 18-46 sh ow s the re sults of ref eren c e volta ges o utside the range
defi ned by VDDA an d VSSA. At the top of the i nput signa l range , VDDA is
10 mV lower than VRH. This results in a maximum obtainable 10-bit
conversion value of $3FE. A t the bottom of the si gnal range, VSSA is
15 mV higher than VRL, resulting in a minimum obtainable 10-bit
conversion value of three.
SAMPLE
AMP
16 CHANNELS TOTAL
VSSA VRL
VDDA VRH
S/H
RC DAC
COMPARATOR
CP
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
488 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Figure 18-46. Errors Resulting from Clipping
18.11.3 Conversion Timing Schemes
This secti on co ntains som e conve rsion tim ing exam ples. Fi gur e 18 -47
shows the timing for basic conversions where it is assumed that:
Q1 begins with CCW0 and ends with CCW3.
CCW0 has pause bit set.
CCW1 does not have pause bit set.
External trigger rise edge for Q1.
CCW4 = BQ2 and Q2 is disabled.
Q1 Res shows relative result register updates.
Recall that when QS = 0, both queues are disabled, when QS = 8,
queue 1 is active and queue 2 is idle, and when QS = 4, queue 1 is
paused and queue 2 is disabled.
0 .020 5.100 5.110
1
2
3
4
5
6
7
8
3FA
3FB
3FC
3FD
3FE
3FF
.010 .030 5.120 5.130
10-BIT RE SU LT (HEXADECIM AL)
INPUTS IN VOLTS (VRH = 5.120 V, VRL = 0 V)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Pin Conne ction Considerations
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 489
Figure 18-47. Ext ernal Pos itive E dge Trigger Mode Timing With Pa use
A time separator is provided between the triggers and the end of
conversion (EOC). The relationship to QCLK displayed is not
guaranteed.
CWP Q1 and CWPQ2 typi cally lag CWP and only ma tch CWP when the
associated queue is inactive. Another way to view CWPQ1(2) is that
these registers update when EOC triggers the result register to be
written.
In the case with the pause bit set (CCW0), CWP does not increment until
triggered. In the case with the pause bit clear (CCW1), the CWP
increments with the EOC.
The conversion results Q1 Res(x) show the result associated with
CCW(x). So that R0 represents the result associated with CCW0.
R1
LAST
R0
CCW0 CCW1
CCW2CCW1
CONVERSION TIME
TIME BETWEEN
QCLK
TRIG1
EOC
QS
CWP
CWPQ1
Q1 RES
0
LAST
84 8
CCW0
TRIGGERS
Š 14 QCLKS CONVERSION TIME
Š 14 QCLKS
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
490 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Fi gu re 18-4 8 shows the timing for conversions in gated mode single
scan with same assumptions in example 1 except:
No pause bits set in any CCW
External trigger gated mode single scan for Q1
Single scan bit is set.
When the gate closes and opens again, the conversions start with the
first CCW in Q1.
When the gate closes, the active conversion completes before the
queue goes idle.
When Q1 completes both the CF1 bit sets and the SSE bit clears.
A pr opose d am ende d de fini tion fo r th e P F bi t in this mo de, t o re flect th e
condition that a gate closing occurred before the queue completed, is
under consi der ation.
Fi gu re 18-4 9 shows the timing for conversions in gated mode
continuous scan with the same assumptions as in F igu re 18-4 8 .
At the en d of Q1,the co mpletion fla g CF1 sets and the que ue restarts. If
the queue starts a second time and completes, the trigger overrun flag
TOR1 sets.
18.11.4 Analog Sup ply Filtering and Groundin g
Two important factors influencing performance in analog integrated
circ uits ar e supp ly filteri ng and grou nding. Gener al ly, digi ta l circui ts use
bypass capacitors on every VDD/VSS pin pair. This applies to analog
subsystems or submodules also. Equally important as bypassing is the
distribution of power and ground.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Pin Conne ction Considerations
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 491
Figure 18-48. Gated Mode, Single Scan Timing
Figure 18-49. Gated Mode, Continuous Scan Timing
SOFTWARE MUST SET SSE.
08 0 8 0
CCW3CCW2CCW1CCW0LAST CCW0 CCW1
R3R2R1R0LAST R0 R1
TRIG 1 (GATE)
EOC
QS
CWP
CWPQ1
Q1 RES
SSE
CF1
PF1
LAST CCW0 CCW1 CCW1CCW0 CCW2 CCW3
SOFTWARE MUST CLEAR PF1.
TRIG1
EOC
QS
CWP
CSPQ1
Q1 RES
CF1
CCW0CCW3CCW0CCW3CCW2CCW1CCW0LAST
LAST
CCW0 CCW1 CCW2 CCW3
LAST
R0 R1 R2 R3 R2
CCW2
XX
(GATE)
08
QUEUE RESTART
QUEUE RESTART
TOR1
CCW3
R3
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
492 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Analog supplies should be isolated from digital supplies as much as
possible. This necessity stems from the higher performance
requirements often associated with analog circuits. Therefore, deriving
an analog supply from a local digital supply is not recommended.
However, if for economic reasons digital and analog power are derived
from a common r egulator, fi ltering of the anal og power is recommend ed
in addition to the bypassing of the supplies already mentioned. For
example, an RC low pass filter could be used to isolate the digital and
analog supplies when generated by a common regulator. If multiple high
precision analog circuits are locally employed (for example, two A/D
converters), the analog supplies should be isolated from each other as
sharing supplies introduces the potential for interference between
analog circuits.
Grounding is the most important factor influencing analog circuit
performance in mixed signal systems (or in standalone analog systems).
Close attention must be paid not to introduce additional sources of n oise
into the analog circuitry. Common sources of noise include ground
loops, inductive coupling, and combining digital and analog grounds
together inappropriately.
The problem of how and when to combine digital and analog grounds
arises from the large transients which the digital ground must handle. If
the digital ground is not able to handl e the large transients, the current
from the large transients can return to ground through the analog
ground. It is the excess current overflowing into the analog ground which
causes performance degradation by developing a differential voltage
between the true analog ground and the microcontrollers ground pin.
The end result is that the ground observed by the analog circuit is no
longer true ground and often ends in skewed results.
Two simi lar appr oache s designed to i mprove or elimin ate the pr oblem s
associated with grounding excess transient currents involve star-point
ground systems. One approach is to star-point the different grounds at
the power supply origin, thus keeping the ground isolated. Refer to
Fi gu re 18-5 0.
Another approach is to star-point the different grounds near the analog
ground pin on the microcontroller by using small traces for connecting
the non-analog grounds to the analog ground. The small traces are
meant only to accommodate dc differences, not ac transients.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Pin Conne ction Considerations
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 493
NOTE: This star-point scheme still requires adequate grounding for digital and
analog subsystems in addition to the star-point ground.
Figure 18-50. Star-Ground at the Point of Power Supply Origin
Other suggestions for PCB layout in which the QADC is employed
include:
Analog ground must be low impedance to all a nalog ground points
in the circuit.
Bypass capacitors should be as close to the power pins as
possible.
The analog ground should be isolated from the digital ground. This
can be done by cutting a separate ground plane for the analog
ground.
Non-minimum traces sho uld be utilized for connecting bypass
capacitors and filters to their corresponding ground/power points.
Minimum distance for trace runs when possible.
QADC
VRH
VRL
VSSA
VDDA
VDD
VSS
ANALOG POWER SUPPLY
+5 V
+5 V AGND
DIGITAL POWER SUPPLY
+5 V
PGND
PCB
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
494 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.11.5 Accommodating Positive/Negat ive Stress Conditions
Positive or negative stress refers to conditions which exceed nominally
defined operating limits. Examples include applying a voltage exceeding
the normal limit on an input (for example, voltages outside of the
suggested supply/reference ranges) or causing currents into or out of
the pin which exceed normal limits. QADC specific considerations are
volta ges gr eater than VDDA, V RH, or less than V SSA applied to an an alog
input which cause excessive currents into or out of the input. Refer to
Section 22. Electrical Specifications for more information on exact
magnitudes.
Either stress conditions can potentially disrupt conversion results on
neighboring inputs. Parasitic devices, associated with CMOS
processes, can cau se a n immedia te disrupti ve influ ence on neighb oring
pins. Common examples of parasitic devices are diodes to substrate and
bipolar devices with the base terminal tied to substrate (VSSI/VSSA
ground). Under stress conditions, current injected on an adjacent pin can
cause errors on the selected channel by developing a voltage drop
across the selected channels impedances.
Figure 18-51 shows an acti ve pa rasitic bi pola r NPN transi stor when an
input pin is subjected to negative stress conditions. Figure 18-52 show s
positive stress conditions can activate a similar PNP transistor.
Figure 18-51. Input Pin Subjected to Negative Stress
Figure 18-52. Input Pin Subjected to Positive Stress
RStress
RSelected
ADJACENT
10 K
PIN UNDER
PARASITIC
IINJN
IIn
+STRESS
VStress
DEVICE
PIN
VIn
ANn
ANn+1
RStress
RSelected
ADJACENT
10 K
PIN UN DER
PARASITIC
IINJP
IIn
+STRESS
VStress
DEVICE
PIN
VIn
VDDA
ANn
ANn+1
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Pin Conne ction Considerations
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 495
The cu rrent i nto the p in (IINJN or IINJP) unde r negati ve or p ositive stress is
determined by these equati ons:
where:
VStress = Adjustable voltage source
VEB = Parasitic P NP emitter/base voltage
VBE = Parasitic NPN base/emitter voltage
RStress = Source impedance (10 K resistor i n Figure 18-51 and
Fi gu re 18-5 2 on stressed channel)
RSelected = Source impedance on channel selected for conversion
The c urrent into (IIn) the neighboring pin is determined by the KN (current
coupl ing rat io) of the pa rasi tic bipol a r transi stor (KN ‹‹ 1) . The IIn can be
expressed by this equation:
IIn = KN * IINJ
where:
IINJ is either IINJN or IINJP.
A meth od for minimi zing the impact of str ess conditions on the QA DC is
to strategically allocate QADC inputs so that the lower accuracy inputs
are adjacent to the inputs most likely to see stress conditions.
Also, suitable source impedances should be selected to meet design
goals and minimize the effect of stress conditions.
18.11.6 Analog Input Considerations
The source impedance of the analog signal to be measured and any
intermediate filtering should be considered whether external
mult iplexing i s u sed or not. F igu re 18-5 3 shows th e conne ction of e ight
typical analog signal sources to one QADC analog input pin through a
separate multiplexer chip. Also, an example of an analog signal source
connected directly to a QADC analog input channel is displayed.
IINJN VStress VBE
()
RStress
-----------------------------------------------=
IINJP VStress VEB
VDDA
RStress
---------------------------------------------------------------=
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
496 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Figure 18-53. External Multiplexing of Analog Signal Sources
~
~
~
~
~
~
~
~
CPCSAMP
CPCSAMP
CIn = CP + CSAMP
RMUXOUT
RSource2
ANA LOG SIGNAL SOU R CE FILTERING AND
INTERCONNECT TYPICAL MUX CHIP INTERCONNECT QADC
~
CFilter
CSource
RFilter2
CMUXIN
0. 01 m F1
CMUXOUT
(MC54HC4051, MC74HC4051,
MC54HC4052, MC74HC4052,
MC54HC4053, ETC.)
RSource2
CFilter
CSource
RFilter2
CMUXIN
0. 01 m F1
RSource2
CFilter
CSource
RFilter2
CMUXIN
0. 01 m F1
RSource2
CFilter
CSource
RFilter2
CMUXIN
0. 01 m F1
RSource2
CFilter
CSource
RFilter2
CMUXIN
0. 01 m F1
RSource2
CFilter
CSource
RFilter2
CMUXIN
0. 01 m F1
RSource2
CFilter
CSource
RFilter2
CMUXIN
0. 01 m F1
RSource2
CFilter
CSource
RFilter2
CMUXIN
0.01 mF1
CFilter
RFilter2
0.01 mF1
1. Typical value
2. RFilter Typically 10 K20 K.
Notes:
RSource2
CSource
CPCB
CPCB
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Pin Conne ction Considerations
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 497
18.11.7 Analog Inpu t Pins
Analog inputs should have low ac impedance at the pins. Low ac
impedance can be realized by placing a capacitor with good high
frequency characteristics at the input pin of the part. Ideally, that
capacitor should be as large as possible (within the practical range of
capacitors that still have good high-frequency characteristics). This
capacitor has two effects:
It helps attenuate any noise that may exist on the input.
It sources charge during the sample period when the analog signal
source is a high-impedance source.
Series resistance can be used with the capacitor on an input pin to
imp lemen t a simpl e RC fi lter. Th e m axi mum level of fi lte ring at th e i npu t
pins is application dependent and is based on the bandpass
characteristics required to accurately track the dynamic characteristics
of an input. Simple RC filtering at the pin may be limited by the source
impedance of the tr ansduce r or ci rcuit supplyi ng the ana log si g nal t o be
measured. (See 18.11.7.2 Error Resulting from Leakage). In some
cases, the size of the capacitor at the pi n may be very small.
Fi gu re 18-5 4 is a simplified model of an input channel. Refer to this
model in the follow ing discussi on of the int eraction b etween the e xternal
circuitry and the circuitry inside the QADC.
Figure 18-54. Electrical Model of an A/D Input Pin
S1
AMP
RFS3
CSAMP
VICP
CF
VSRC
INTERNAL CIRCUIT MODELEXTERN AL FILT ER
= Source voltage = Internal parasitic c apacitance
VSRC
RF
CF
CP
CSAMP= Sample capacitor
VI
= Filter impedance
= Filter capacitor = I nternal voltage source during sample and hold
SOURCE
RSRC
RSRC = Source impedance
S2
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
498 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
In Figure 18-54, RF, RSRC and CF comprise the ext ernal filter circuit. C P
is the internal parasitic capacitor. CSamp is the capacitor array used to
sampl e a nd ho ld the input voltage. VI i s an intern al voltag e sou rce u sed
to provide charge to Csamp during sample phase.
The following paragraphs provide a simplified description of the
interaction between the QADC and the users external circuitry. This
circuitry is assumed to be a simple RC low-pass filter passing a signal
from a source to the QADC input pin. These simplifying assu mptions are
made:
The external capacitor is perfect (no leakage, no significant
dielectric absorption characteristics, etc.)
All parasitic capacitance associated with the input pin is included
in the value of the external capacitor.
Inductance is ignored.
The "on" resista nce of the internal switches is 0 ohms and the "off"
resistance is infinite.
18.11.7.1 Settling Time for the External Circuit
The values for RSRC, RF, and CF in the user's external circuitry
determ ine t he length of time r equired to charge CF to the so urce voltag e
level (VSRC). At time t = 0, Vsrc changes in Figure 18-54 while S1 is
open, disconnecting the internal circuitry from the external circuitry.
Assume that the initial voltage across CF is 0. As CF charges, the voltage
across it is determined by the equation, where t is the total charge time:
As t appr oaches infinity, VCF will equal VSRC. ( This assumes no inte rnal
leakage.) With 10-bit resolution, 1/2 of a count is equal to 1/2048
full-scale value. Assuming wor st case (VSRC = full scale), Table 18-16
shows the required time for CF to charge to within 1/2 of a count of the
actual source voltage during 10-bit conversions. Tabl e 18-16 is based
on the RC network in Figure 18-54.
NOTE: The following times are completely independent of the A/D converter
architecture (assuming the QADC is not affecting the charging).
VCF = VSRC (1 –et/(RF + RSRC) CF)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Pin Conne ction Considerations
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 499
The ext erna l circuit d escribed in Table 18- 16 i s a low-pass filt er. A use r
interested in measuring an ac component of the external signal must
take the characteristics of this filter into account.
18.11.7.2 Error Resulting from Leakage
A series resistor limits the current to a pin therefore, input leakage act ing
through a large source impedance can degrade A/D accuracy. The
maximum input leakage current is specified in Section 22. Electrical
Specifications. Input leakage is greater at higher operating
temperatures. In the temperature range from 125°C to 50°C, the leakage
current is halved for every 8°C to 12°C reduction in temperature.
Assuming VRH–VRL = 5.12 V, 1 count (with 10-bit resolution)
corresp onds to 5 mV of input voltag e. A typica l inpu t leakage of 200 nA
acting through 10 k of external series resistance results in an error of
0.4 count (2.0 mV). If the source impedance is 100 k and a typical
lea kage of 100 nA is presen t, an error of 2 count s (10 mV ) is in troduced.
In addi tion to internal junction l eakage, extern al le akage (for exampl e, if
external clamping diodes are used) and charge sharing effects with
internal capacitors also contribute to the total leakage current.
Table 18-17 illustrates the effect of different levels of total le akage on
accuracy for di ffere nt values of sou rce impe dance . The er ror is lis ted in
terms of 10-bit counts.
CAUTION: Leakage from the part below 200 nA is obtai nable only within a limited
temperature range.
Table 18-16. External Circuit Settling Tim e to 1/2 LSB
(10-Bit Conversions)
Filter Capacitor (CF)S ou rce Resistanc e (RF + RSRC)
100 1 k10 k100 k
1 µF 760 µs 7.6 ms 76 ms 760 ms
0.1 µF76 µs 760 µs 7.6 ms 76 ms
0.01 µF7.6 µs76 µs 760 µs7.6 ms
0.001 µF 760 ns 7.6 µs 76 µs 760 µs
100 pF 76 ns 76 0 ns 7.6 µs 76 µs
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
500 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
18.12 Interrupts
The f our in terrupt lines ar e outputs of the mo dule a nd have no priority o r
arbitration within the module.
18.12.1 Interrupt Operation
QADC inputs can be monitored by polling or by using interrupts. When
interrupts are not needed, software can disable the pause and
completion interrupts and monitor the completion flag and the pause flag
for each queue in the status register (QASR). In other words, flag bits
can be polled to determine when new results are available.
Table 18-18 shows the status flag and interrupt enable bits which
correspond to queue 1 and queue 2 activity.
If interrupts are enabled for an event, the QADC requests interrupt
service when the event occurs. Using interrupts does not require
continuously polling the status flags to see if an event has taken place.
Table 18-17. Error Resulting From Input Leakage (IOff)
Source Impedance Leakage Value (10-Bit Convers ions)
100 nA 200 nA 500 nA 1000 nA
1 k——0.1 counts 0.2 counts
10 k0.2 counts 0.4 cou nts 1 counts 2 counts
100 k2 counts 4 count 10 counts 20 counts
Table 18-18. QADC Status Flags and Interrupt Sources
Queu e Q ueue Activity Status
Flag Interrupt
Enable Bit
Queue 1 Result written to last CCW in queue 1 C F1 CIE1
Result written fo r a CCW with pause bit set in
queue 1 PF1 PIE1
Queue 2 Result written to last CCW in queue 2 C F2 CIE2
Result written fo r a CCW with pause bit set in
queue 2 PF2 PIE2
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Queued A nalog -to-Digital Converter (QADC)
Interrupts
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Qu eued A nalog-to-Digital Converter (QADC) 501
However, status flags must be cleared after an interrupt is serviced, in
to disable the interrupt request
In both polled and interrupt-driven operating modes, status flags must be
re-enabled after an event occurs. Flags are re-enabled by clearing
appropriate QASR bits in a particular sequence. The register must first
be read, then 0s must be written to the flags that are to be cleared. If a
new event occurs between the time that the register is read and the time
that it is written, the associated flag is not cleared.
18.12.2 Interrupt Sources
The QA DC incl udes f our so urces o f inter rupt r eque sts, each of which i s
separately enabled. Each time the result is written for the last conversion
command word (CCW) in a queue, the completion flag for the
corresponding queue is set, and when enabled, an interrupt request is
generated. In the same way, each time the result is written for a CCW
with the pause bit set, the queue pause flag is set, and when enabled,
an interrupt request is generated. Refer to Table 18-18.
The pause and complete interrupts for queue 1 and queue 2 have
separate interrupt vector levels, so that each source can be separately
serviced.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
502 Queued A nalog-to-Digital Converter (QADC) MOTOR OLA
Queued Analog-to-Digital Converter (QADC)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA External Bus Interface Module (EBI) 503
Technical Data MMC2107
Section 19. External Bus Interface Module (EBI)
19.1 Contents
19.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .504
19.3 Signal Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .505
19.3.1 Data Bus (D[31:0]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .506
19.3.2 Show Cycle Strobe (SHS) . . . . . . . . . . . . . . . . . . . . . . . . .506
19.3.3 Transfer Acknowledge (TA) . . . . . . . . . . . . . . . . . . . . . . . .506
19.3.4 Transfer Error Acknowledge (TEA) . . . . . . . . . . . . . . . . . .506
19.3.5 Emulation Mode Chip Selects (CSE[1:0]) . . . . . . . . . . . . .506
19.3.6 Transfer Code (TC[2:0]). . . . . . . . . . . . . . . . . . . . . . . . . . .506
19.3.7 Read/Write (R/W). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .507
19.3.8 Address Bus (A[22:0]) . . . . . . . . . . . . . . . . . . . . . . . . . . . .507
19.3.9 Enabl e Byte (EB[3:0]). . . . . . . . . . . . . . . . . . . . . . . . . . . . .507
19.3.10 Chip Sele cts (CS[3:0]) . . . . . . . . . . . . . . . . . . . . . . . . . . . .507
19.3.11 Output Enable (OE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .507
19.3.12 Transfer Size (TSIZ[1:0]) . . . . . . . . . . . . . . . . . . . . . . . . . .507
19.3.13 Processor Status (PSTAT[3:0]) . . . . . . . . . . . . . . . . . . . . .507
19.4 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .508
19.5 Operand Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .508
19.6 Enabl e Byte Pins (EB[3:0]). . . . . . . . . . . . . . . . . . . . . . . . . . .510
19.7 Bus Master Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .510
19.7.1 Read Cycles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .511
19.7.1.1 State 1 (X1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .512
19.7.1.2 Optional Wait States (X2W). . . . . . . . . . . . . . . . . . . . . .512
19.7.1.3 State 2 (X2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .512
19.7.2 Write Cycles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .513
19.7.2.1 State 1 (X1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .514
19.7.2.2 Optional Wait States (X2W). . . . . . . . . . . . . . . . . . . . . .514
19.7.2.3 State 2 (X2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .514
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
504 External Bus Interface Module (EB I) MO TOROLA
External Bus Interface Module (EBI)
19.8 Bus Exception Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .516
19.8.1 Transfer Error Termination. . . . . . . . . . . . . . . . . . . . . . . . .516
19.8.2 Transfer Abort Termination . . . . . . . . . . . . . . . . . . . . . . . .516
19.9 Emulation Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .516
19.9.1 Emulation Chip-Selects (CSE[1:0]) . . . . . . . . . . . . . . . . . .516
19.9.2 Internal Data Transfer Display (Show Cycles) . . . . . . . . . .517
19.9.3 Show Strobe (SHS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .518
19.10 Bus Monitor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .519
19.11 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .520
19.2 Introduction
The external bus interface (EBI) module is responsible for controlling the
transfer of information between the internal MCORE local bus and
external address space. The external bus has 23 address lines and 32
data lines.
In maste r mode and emulatio n mo de, the EBI functions as a bus maste r
and allows internal bus cycles to access external resources. In
single-chip mode, the EBI is active, but the external data bus is not
avai lable, and no exte rnal data or termin ation signal s are transferred to
the internal bus.
The EBI supports data transfers to both 32-bit and 16-bit ports.
Chip-select channels are programmed to define the port size for specific
address ranges. When no chip-select is active during an external data
transfer, the port size is assumed to be 32 bits.
The EBI supports a variable length external bus cycle to accommodate
the access speed of any device. During an external data transfer, the
EBI drives the address pins, byte enable pins, output enable pins, size
pins, and read/write pins. Wait states are inserted until the bus cycle is
terminated by the assertion of the internal transfer acknowledge signal
by a chip-select channel or by the assertion of the external TA or TEA
pins. The minimum external bus cycle is one clock.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
External Bus Interface Module (EBI)
Sig nal Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA External Bus Interface Module (EBI) 505
The EBI also drives the address, size, and read/write pins during internal
data transfers, but the output enable and byte enable pins are not
asserted . To see the interna l data bus on th e external pins, show cycles
must be enabled.
Only internal sources can terminate internal data transfers. Chip-select
channels, external TA assertion, and external TEA assertion cannot
terminate internal data transfers.
19.3 Signal Descriptions
Table 19-1 provides an overview of the signal properties which are
discussed in this subsection.
Table 19-1. Signal Properties
Name Port Function Pullup
D[31:0] PA, PB, PC, PD D ata bus
SHS PE7 Show cycle strobe Active
TA PE6 Trans fer acknowle dge Active
TEA PE 5 Trans fer error acknowledge Active
CSE[1:0] PE[4:3] Emulation chip selects Ac tive
TC[2 :0] P E [2:0] Tr ansfe r code A ctive
R/W PF7 Read/write Active
A[2 2 :0 ] PF[6:0 ], PG, PH Addr ess bus Active
EB[ 3:0] PI[7:4] Ena ble byte Active
CS[3:0] PI [3:0] Chip selects A ctive
OE Out put ena ble
TSIZ[1:0] Transfe r size
PSTAT[3:0] Processor status
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
506 External Bus Interface Module (EB I) MO TOROLA
External Bus Interface Module (EBI)
19.3.1 Data Bus (D[31:0])
The three-state bidirectional data bus (D[31:0]) signals are the
general-purpose dat a path betwe en the micr ocontr ol ler unit ( MCU ) and
all other devices.
19.3.2 Show Cycle Strobe (SHS)
In emulation mode, show cycle strobe (SHS) is the strobe for capturing
address, controls, and data during show cycles.
19.3.3 Transfer Acknowledge (TA)
The transfer acknowledge (TA) signal indicates that the external data
transfer is complete. During a read cycle, when the processor
recognizes TA, it latches the data and then terminates the bus cycle.
During a write cycle, when the processor recognizes TA, the bus cycle
is terminated. TA is an input in master and emulation modes.
19.3.4 Transf er Error Acknowled ge (TE A)
The transfer error acknowledge (TEA) indicates an error condition exists
for the bus transfer. T he bus cycle is terminated and the CPU begins
execution of the access error exception. TEA is an input in master and
emulation modes.
19.3.5 Emulation Mode Chip Selects (CSE[1:0])
The emulation mode chip selects (CSE[1:0]) output signals provide
information for development support.
19.3.6 Transfer Code (TC[2:0])
The transfer code (TC[2:0]) output signals indicate the data transfer
code for the current bus cycle.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
External Bus Interface Module (EBI)
Sig nal Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA External Bus Interface Module (EBI) 507
19.3.7 Read/Write (R/W)
The read/write (R/W) output signal indicates the direction of the data
transfer on the bus. A logic 1 indica tes a read fr om a slave device and a
logic 0 indicates a write to a slave device.
19.3.8 Address Bus (A[22:0])
The address bus (A[22:0]) output signals provide the address for the
current bus transfer.
19.3.9 Enable Byte (EB[3:0])
The enable byte (EB[3:0]) output signals indicate w hich byte of data is
valid during external cycles.
19.3.10 Chip Selects (CS[3:0])
The chip selects (CS[3:0]) output signals select external devices for
externa l bus transaction s.
19.3.11 Output Enable (OE)
The output enable (OE) signal indicates when an external device can
drive data during external read cycles.
19.3.12 Transfer Size (TSIZ[1:0])
TSIZ[1:0] provides an i ndication of the MCORE transfer size.
19.3.13 Processor Status (PSTAT[3:0])
PSTAT[3:0] provides an indication of the MCORE processor status.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
508 External Bus Interface Module (EB I) MO TOROLA
External Bus Interface Module (EBI)
19.4 Memory Map and R egisters
The EBI is not memory-mapped and has no software-accessible
registers.
19.5 Oper an d Tr an sf er
The possible operand accesses for the internal MCORE bus are:
Byte
Aligned upper half-word
Aligned lower half-word
Aligned word
No misaligned transfers are supported. The EBI controls the byte,
half-word, or word operand transfers between the MCORE bus and a
16-bit or 32-bit port. Port refers to the width of the data path that an
external device uses during a data transfer. Each port is assigned to
particular bits of the data bus. A 16-bit port is assigned to pins D[31:16]
and a 32-bit port is assigned to pins D[31:0].
In the case of a word (32-bit) access to a 16-bit port, the EBI runs two
external bus cycles to complete the transfer. During the first external bus
cycle, the A[1:0] pins are driven low, and the TSIZ[1:0] pins are driven to
indicate word size. During the second cycle, A1 is driven high to
increment the external addr ess by two bytes, A0 is still driven low, and
the TSIZ[1:0] pins are driven to indicate half-word size.
Dur ing any word-siz e transfer, the EBI alw ays drives the A[1:0 ] pins lo w
during a word transfer (except on the second cycle of a word to half-word
port transfer in which A1 is incremented).
Table 19-2 shows each possible transfer size, alignment, and port width.
The data bytes shown in the table represent external data pins. This data
is multiplexed and driven to the external data bus as shown. The bytes
labeled with a dash are not required; the MCORE will ignore them on
read transfers, and drive them with undefined data on write transfers.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
External Bus Interface Module (EBI)
Operand Transf er
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA External Bus Interface Module (EBI) 509
Table 19-2. Data Transfer Cases
Transfer
Size Port
Width
External Pins Data Bus Transfer
TSIZ1 TSIZ0 A1 A0
Byte
16
01
00
D[31:24] ———
32 D[31:24] ———
16 01 D[23:16] ——
32 D[23:16] ——
16 10 ——D[31:24]
32 ——D[15:8]
16 11 ———D[23:16]
32 ———D[7:0]
Half-word
16
10
00
D[31:24] D[23:16] ——
32 D[31:24] D[23:16] ——
16 10 ——D[31:24] D[23:16]
32 ——D[15:8] D[7:0]
Word 16(1)
1. The EBI ru ns two cycles for word accesses to 16- bit ports. The table shows the data
placement for both bus cycles.
0
0
0 0 D[31:24] D[23:16] ——
110——D[31:24] D[23:16]
32 0 0 0 D[31:24] D[23:16] D[15:8] D[7:0]
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
510 External Bus Interface Module (EB I) MO TOROLA
External Bus Interface Module (EBI)
19.6 Enable Byte Pins (EB[3:0])
The enable byte pins (EB[3:0]) are con figurable as byte enables for read
and write cycles, or as write enables for write cycles only. The defau lt
function is byte enable unless there is an active chip-select match with
the WE bit set. In all external cycles when one or more EB pins are
asserted , the enc oding correspon ds to the external data pi ns to be used
for the transfer as outlined in Table 19-3.
19.7 Bus Master Cycles
In this subsection, e ach EBI bus cycle type is defined in terms of actions
associated with a succession of internal states. These internal states are
only for reference and may not correspond to an y implemented machine
states.
Read or write operations may require multiple bus cycles to complete
based on the oper and si ze and targ et port size. Refer to 19.5 Operand
Transfer for more information. In the discussion that follows, it is
assumed that only a single bus cycle is required for a transfer.
In the waveform diagrams (Figure 19-3 through Figure 19-6), data
transfers are related to clock cycles, independent of the clock frequency.
The external bus states are also noted.
Table 19-3. EB[3:0] Assertion Encod ing
EB Pin External Data Pins
EB0 D[31:24]
EB1 D[23:16]
EB2 D[15:8]
EB3 D[7:0]
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
External Bus Interface Module (EBI)
Bus Master Cycles
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA External Bus Interface Module (EBI) 511
19.7.1 Read Cycles
During a read cycle, the EBI receives data from an external memory or
peripheral device. During external read cycles, the OE pin is asserted
regardless of operand size. See Figure 19-1.
Figure 19-1. Read Cycle Flowchart
1. SET R/W TO READ.
2. DRIVE ADD RE SS ON A[22:0] .
3. DRIVE TSIZ[ 1: 0] PINS FOR OPER AN D SIZE.
4. ASSERT C S IF USED.
1. RECE IV E CS.
2. DECO DE ADD RE S S.
3. ASSERT TA IF NECESSARY FROM SLAVE DEVIC E.
4. PUT DATA ON D[31:16] AND/OR D[15:0].
1. RECEIVE DATA FROM D[31:16 ] AND/OR D[15:0].
2. DRIVE DATA TO INTERNAL DA TA BUS.
3. N EGAT E OE AND EB.
1. REMOVE DATA FROM D[31: 16] AND/OR D[15: 0].
2. NEGATE TA.
1. NEGATE EB AND CS IF USED.
PRESENT DATA
ADDRESS DEVI CE
ACQUIR E DA TA
START N EXT CYCLE
TERM INA TE CY CL E
5. ASSERT OE AND EB IF USED.
MMC2107 EXTERNAL PERIPHERAL
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
512 External Bus Interface Module (EB I) MO TOROLA
External Bus Interface Module (EBI)
19.7.1.1 State 1 (X1)
The EBI drives the address bus. R/W is driven high to indicate a read
cycle. The TSIZ[1:0] pins are driven to indicate the number of bytes in
the transfer. TC[2:0] pins are driven to indicate the type of access. CS
may be asserted to dr ive a device.
Later in state 1, OE is asserted. If the EB pins are not configured as write
enables for this cycle, one or more EB pins are also asserted, depending
on the size and position of the data to be transferred.
If eithe r the external TA pin o r in tern al chi p -select tra nsfer ackn owl edge
sign al is asserte d befor e the e nd of state 1, the EBI proce eds to sta te 2.
19.7.1.2 Optional Wait States (X2W)
Wait states are inse rted until the slave assert s the TA pin or the intern al
chip-select transfer acknowledge signal is asserted. Wait states are
counted in full clocks.
19.7.1.3 State 2 (X2)
One-half clock later in state 2, the selected device puts its information on
D[31:16] and/or D[15: 0]. One or both half-words of the external data bus
are driven to the internal data bus.
The address bus, R/W, CS, OE, EB, TC, and TSIZ pins remain valid
through state 2 to allow for static memory operation and signal skew.
The slave device asserts data until it detects the negation of OE, after
which it and must remove its data within approximately one-half of a
state. Note that the data bus may not become free until state 1.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
External Bus Interface Module (EBI)
Bus Master Cycles
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA External Bus Interface Module (EBI) 513
19.7.2 Write Cycles
On a write cycle, the EBI transfers data to an external memory or
peripheral devi ce. See F igu re 19-2.
Figure 19-2. Write Cycle Flowchart
1. DRI VE AD DRESS ON A[22:0].
2. DRI VE TS IZ[1 :0] PINS F OR OPER AN D SIZE .
3. ASSERT CS IF USED.
4. CLEAR R/W TO WRITE.
1. RECEIVE CS.
2. D EC ODE ADDR ESS.
3. ASSERT TA IF NECESSARY FROM SLAVE DEVICE.
4. RECEIVE DATA FROM D[31:16 ] AND/OR D[15:0].
1. NEGATE E B.
1. NEGATE TA.
1. NEGATE CS IF USED.
ACCEPT DATA
ADDRESS DEVICE
TERMINATE OUTPUT TRANSFER
START N EXT CYCLE
TERMINATE CY CLE
5. ASSERT E B ( ONE O R MORE DEPENDING ON DATA SIZE AND POSITION.
6. DRI VE DA TA ON D[31: 16] AND/ OR D[15: 0].
2. REMOVE DATA FRO M D[3 1:1 6] AN D /OR D[15: 0] .
MMC2107 EXTERNA L PERIPHERAL
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
514 External Bus Interface Module (EB I) MO TOROLA
External Bus Interface Module (EBI)
19.7.2.1 State 1 (X1)
The EBI drives the address bus. The TSIZ[1:0] pins are driven to indicate
the number of bytes in the transfer. TC[2:0] pins are driven to indicate
the type of access. CS may be asserted to drive a device. OE is negated.
Later in state 1, R/W is driven low indicating a write cycle. One or more
EB pins are asser ted, dep ending on the size and posi tion of the data to
be transferred.
If eithe r the external TA pin o r in tern al chi p -select tra nsfer ackn owl edge
sign al is asserte d befor e the e nd of state 1, the EBI proce eds to sta te 2.
19.7.2.2 Optional Wait States (X2W)
Wait states are inse rted until the slave assert s the TA pin or the intern al
chip-select transfer acknowledge signal is asserted. The EBI drives its
data on to data bus lines D[31:16] and/or D[15:0] on the first optional wait
state. Wait states are counted in full clocks.
19.7.2.3 State 2 (X2)
If the data was not already driven during optional wait states, the EBI
drives its data onto D[31:16] and/or D[15:0] in state 2.
EB is negated by the end of state 2. The address bus, data bus, R/W,
CS, TC[2: 0], and TSIZ[1:0 ] pi ns remain valid thro ugh stat e 2 to allow for
static memory operation and signal skew.
Fi gu re 19-3 and Figure 19-4 illustrate external bus master cycles with
and without wait states and show MCORE bus activity.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
External Bus Interface Module (EBI)
Bus Master Cycles
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA External Bus Interface Module (EBI) 515
Figure 19-3. Master Mode 1-Clock Read and Write Cycle
Figure 19-4. Master Mode 2-Clock Read and Write Cycle
CLKOUT
CS
R/W
A[2 2:0], TSIZ [1 :0 ]
D[31:0] D1 D2
A2
TA, TEA
READ WRITE
A1
OE
EB[3:0]
X1 X2 X1 X2
EB[3:0] (EB SET
AS WRITE ENAB LE)
CLKOUT
CS
R/W
A[ 2 2 :0 ], TSIZ[1:0 ]
D[31:0] D1 D2
A2
TA, TEA
READ WRITE
A1
OE
EB[3:0] (EB SET
AS WRITE ENABLE)
X 1 X 2 X2W X2 X1 X2 X2W X2
EB[3:0]
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
516 External Bus Interface Module (EB I) MO TOROLA
External Bus Interface Module (EBI)
19.8 Bus Exception Operation
19.8.1 Transfer Error Termination
Normal bus cycle ter mination re quire s the asser tion of th e T A pin o r th e
internal transfer acknowledge signal. Minimal bus exception support is
provided by transfer error cycle termination. For transfer error cycle
termination, the external TEA pin or the internal transfer error
acknowledge signal is asserted. Transfer error cycle termination takes
precedence over normal cycle termination, provided TEA assertion
meets its timing constraints.
The internal bus monitor will assert the internal transfer error
acknowledge signal when TA response time is too long.
19.8.2 Transfer Abort Termination
External bus cycles which are aborted by the MCORE, still have the
address, R/W, TC[2:0], TSIZ[1:0], CS (if used), OE (reads only), and
SHS (if used) driven to the external pins.
19.9 Emulation Support
19.9.1 Emulation Chip-Selects (CSE[1:0])
While i n emulatio n mode or m aster mode, speci al emulato r chip-selects
(CSE[1:0]) are driven externally to allow internal/external accesses to be
tracked by external hardware See Table 19-4.
In emulation mode, all port registers are mapped externally.
CSE[1:0] = 10 whenever any emulated port registers are addressed.
The lower bits of the address bus indicate the register accessed within
the block.
Accesses to the address space which contains the registers for the
internal modules (except ports) are indicated by CSE[1:0] = 11.
Internal accesses, other than to the specific module control registers, are
indicated by CSE[1:0] = 01. To emulate internal FLASH, the external
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
External Bus Interface Module (EBI)
Em ulation Support
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA External Bus Interface Module (EBI) 517
D28 pin is driven low during reset configuration to disable the internal
FLASH so that no conflict exists with the external memory device. It
should be noted that at higher frequencies writes to external memories
emulating the internal memories may require one clock for read
accesses and two clocks for write accesses.
19.9.2 Internal Data Transfer Display (Show Cycles)
Internal data trans fers nor mall y occur wi thou t showing the i nternal data
bus activity on the external data bus. For debugging purposes, however,
it may be desirable to have internal cycle data appear on the external
bus. These external bus cycles are referred to as show cycles and are
distinguished from norm a l external cycles by the fact that OE and
EB[3:0] remain negated.
Regardless of whether show cycles are enabled, the EBI drives the
address bus, TC [2:0], TSIZ[ 1:0] and R/W signal s, indicating the intern al
cycle activity. When show cycles are disabled, D[31:0] remains in a high
impedance state. When show cycles are enabled, OE and EB[3:0]
remain negated while the internal data is presented on D[31:0] on the
first clock tick after the termination of the internal cycle.
Show cycles are always enabled in emulation mode. In master mode,
show cycles are disabled coming out of reset and must be enabled by
writing to the SHEN bit in the chip configuration register (CCR).
Table 19-4. Emulation Mode Chip-Select Summary(1)
1. CSE[1:0] is val id only for the dur ati on of valid bus cycles or reset. Undefi ned otherwise .
CSE1 CSE0 Indication in Emulation Mode
11
Internal access to any register space (excluding ports)
Reset state
(0x00c1_0000:0x00ff_ffff)
10
Internal access to ports regi ster space
(0x00c0_0000:0x00c0_ffff)
01
Internal access not covered by CSE encoding = 11, 10
(0x0000_ 0000: 0x00bf _ffff; 0 x0100_00 00:0x0 7ff_ffff)
00
Exte rn al acce ss
(0x8000_ 0000 to 0xffff_ffff)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
518 External Bus Interface Module (EB I) MO TOROLA
External Bus Interface Module (EBI)
NOTE: The PEPA and PCDPA bits in the ports must also be set to 1 to obtain
full visibility. T he waveforms shown in Figure 19-5 describe show
cycles.
19.9.3 Show Strobe (S HS)
The sho w strobe (S HS) pin pr ovides an indi cation to an e xterna l device
(emulator or logic analyzer) when to latch address, TC[2:0], TSIZ[1:0],
R/W, CSE, PSTAT, and data from the external pins. The SHS pin is
enabled coming out of reset in emulation mode. In master mode, the
SHS pin may be enabled b y writin g to the port E pin a ssignmen t regi ster
(PEPAR).
For any external cycle or show cycle, the SHS pin is driven low to
indica te valid addr ess, T C, T SIZ, R/W, C SE , and PST AT ar e pr esent at
the pins, and driven back high to indicate valid data. The SHS pin is
driven low and back high only once per external bus cycle. See
Fi gu re 19-5 and Figure 19-6.
Figure 19-5. Internal (Show) Cycle Followed by External 1-Clock Read
A2A1
SHOW DATA
INTERNAL CYC LE EXT ER NAL READ
TA, TEA
EB[3:0]
OE
CS
CLKOUT
R/W
A{22:0], TSIZ[1:0]
D[31:0]
SHS
CSE[1:0] 00
D1 D2
X1 X2
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
External Bus Interface Module (EBI)
Bus Monitor
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA External Bus Interface Module (EBI) 519
Figure 19-6. Internal (Show) Cycle Followed by External 1-Clock Write
19.10 Bus Monitor
The bus monitor can be set detects excessively long bus access
termination response times. Whenever an undecoded address is
accessed or a peripheral is inoperative, the access is not terminated and
the bus is potentially locked up wh ile it waits for the required response.
The b us monitor monitors the cycle termina tion response tim es during a
bus cycle. If the cycle termination response time exceeds a programmed
count, the bus monitor asserts an internal bus error.
The bus monitor monitors the cycle termination response time (in system
clock cycles) by using a programmable maximum allowable response
period. There are four selectable response time periods for the bus
monitor, selectable among 8, 16, 32, and 64 system clock cycles. The
periods are selectable with the BMT[1:0] field in the chip configuration
module CCR. The programmability of the timeout allows for varying
external peripheral response times. The monitor is cleared and restarted
A2A1
SHOW DATA
INTERNAL CYCLE EXTERNAL WRITE
TA, TEA
EB[3:0]
OE
CS
CLKOUT
R/W
A{22:0], TSIZ[1:0]
D[31:0]
SHS
CSE[1:0] 00
D1 D2
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
520 External Bus Interface Module (EB I) MO TOROLA
External Bus Interface Module (EBI)
on all bus accesses. If the cycle is not terminated within the selected
response time, a timeo ut occurs and the bus monitor termina tes the b us
cycle.
The bus monitor can be configured with the BME bit in the chip
configuration module CCR to monitor only internal bus accesses or both
internal and external bus accesses. Also, the bus monitor can be
disabled during debug mode for both internal and external accesses.
Two external bus cycles are required for a single 32-bit access to a 16-bit
port. If the bus monitor is enabled to monitor e xternal accesses, then the
bus monitor views the 32-bit access as two separate external bus cycles
and not as one internal bus cycle.
19.11 Interrupts
The EBI does not generate interrupt requests.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Chip Select Module 521
Technical Data MMC2107
Section 20. Chip Select Module
20.1 Contents
20.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .521
20.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .522
20.4 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .523
20.5 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .524
20.6 Memory Map and R egisters . . . . . . . . . . . . . . . . . . . . . . . . . .524
20.6.1 Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .524
20.6.2 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .525
20.7 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .530
20.8 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .531
20.2 Introduction
The chip select module provides chip enable signals for external
memory and peripheral devices. The chip selects can also be
programmed to ter minate bus cycles. Up to four asynchronous chip
select signals are available.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
522 Chip Select Module MOTOROLA
Chip Selec t Module
20.3 Features
Features of the chip select module include:
Reduced system complexity No e xtern al glue l ogic req uired for
typical systems i f chip selects are used.
Four prog ram mable asynchr onous active-l o w chip selects
(CS[3:0]) Chip select s can be i ndep ende ntly pr ogr amm ed with
various features.
Con trol for extern al b oot device CS0 can be enabled at reset to
select an external boot device.
Fixed base addresses with 8-Mbyte block sizes
Support for emulating internal memory space When the EMINT
bit is set in the chip configuration register (CCR), CS1 matches
only addresses in the internal memory space.
Support for 16-bit and 32-bit external devices The external port
size can be programmed to be 16 or 32 bits.
Programmable write protection Each chip select address range
can be designated for read access only.
Programmable access protection Each chip select address
range can be designated for supervisor access only.
Write-enable selection The enable byte pins (EB[3:0]) can be
configured as byte enables (assert on both external read and write
accesses) or write enables (only assert on external write
accesses).
Bus cycle termination This option allows the chip select logic to
terminate the bus cycle.
Programmable wait st ates To interface with various devices, up
to seven wait states can be programmed before the access is
terminated.
Programmable extra wait state for write accesses One wait
state can be adde d to write accesses to allow writing to m emories
that require additional data setup time.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Chip Select Module
Block Diagram
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Chi p Select Module 5 23
20.4 Blo ck Diag r am
Fi gu re 20-1 shows a programmable asynchronous chip select. All
asynchron ous chi p selects have the same structure. A ll signals used to
generate chip select signals are taken from the internal bus. Each chip
select has a chip select control register to individually program the chip
select characteristics.
All the chip selects share the same cycle termination generator. The
active chip select for a particular bus cycle determines the number of
wait states pro duced by the cycle termination generator before the cycle
is terminated.
Figure 20-1. Chip Select Block Diagram
DATA
MCORE LOCAL BUS
ADDRESS
OPT ION CO MPAR E
ACCESS
MATCH
MATCH
CSx
TO CYCLE TERMINATION GENERATOR
CHIP SELECT PAD
CONT ROL REGISTERS
ADDRESS COMP ARE
ATTRIBUTES
CONTROL
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
524 Chip Select Module MOTOROLA
Chip Selec t Module
20.5 Signals
Table 20-1 provides an overview of the signals described here.
CS[3:0] are chip-select outputs. CS[3:0] are available for
general-purpose input/output (I/O) when not configured for chip select
operation.
20.6 Memory Map and R egisters
Table 20-2 shows the chip select memory map. The registers are
described in 20.6.2 Registers.
20.6.1 Memory Map
Table 20-1. Signal Properties
Na m e Function Reset Sta t e Pu ll up
CS0 Chip se le c t 0 pin 1 Ac ti ve
CS1 Chip se le c t 1 pin 1 Ac ti ve
CS2 Chip se le c t 2 pin 1 Ac ti ve
CS3 Chip se le c t 3 pin 1 Ac ti ve
Table 20-2. Chip Select Memory Map
Address Bits 3116 Bits 15–0 Access(1), (2)
0x00c2_0000 CSCR0 chip select control register 0 CSCR1 ch ip select control register 1 S
0x00c2_0004 CSCR2 chip select control register 2 CSCR3 ch ip select control register 3 S
1. User mode ac cesses to supervisor-onl y address locat ions have no eff ect an d resul t in a cycle termination tran sfer error.
2. S = CPU supervisor mode access only.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Chip Select Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Chi p Select Module 5 25
20.6.2 Registers
The chip programming model consists of four chip select control
registers (CSCR0CSCR3), one for each chip select (CS[3:0]).
CSCR0CSCR3 are read/write always and define the conditions for
asserting the chip select signals.
All the chip select control registers are the same except for the reset
states of the CSEN a nd PS bits in CSCR0 a nd t he CS E N bit in C SC R1.
This allows CS0 to be enab led at r eset wi th e ither a 16-bit or 32 -bi t po rt
size for selecting an external boot device and allows CS1 to be used to
emul ate intern al memory.
Address: 0x00c2_0000 and 0x00c2_0001
Bit 15 14 13 12 11 10 9 Bit 8
Read: SO RO PS WWS WE WS2 WS1 WS0
Write:
Reset:00See note11111
Bit 7654321Bit 0
Read: 0 0 0000
TAEN CSEN
Write:
Reset:0000001See note
= Writes have no effect and the access terminates without a tr ansfer er ror exception.
Note: Reset state determined during reset configuration.
Figure 20-2. Chip Select Control Register 0 (CSCR0)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
526 Chip Select Module MOTOROLA
Chip Selec t Module
Address: 0x00c2_0002 and 0x00c2_0003
Bit 15 14 13 12 11 10 9 Bit 8
Read: SO RO PS WWS WE WS2 WS1 WS0
Write:
Reset:00111111
Bit 7654321Bit 0
Read: 0 0 0000
TAEN CSEN
Write:
Reset:0000001See note
= Writes have no effect and the access terminates without a tr ansfer er ror exception.
Note: Reset state determined during reset configuration.
Figure 20-3. Chip Select Control Register 1 (CSCR1)
Address: 0x00c2_0004 and 0x00c2_0005
Bit 15 14 13 12 11 10 9 Bit 8
Read: SO RO PS WWS WE WS2 WS1 WS0
Write:
Reset:00111111
Bit 7654321Bit 0
Read: 0 0 0000
TAEN CSEN
Write:
Reset:00000010
= Writes have no effect and the access terminates without a tr ansfer er ror exception.
Figure 20-4. Chip Select Control Register 2 (CSCR2)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Chip Select Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Chi p Select Module 5 27
SO Supervisor-Only Bit
The SO bit restricts user mode access to the address range defined
by the corresponding chip select. If the SO bit is 1, only supervisor
mode acce ss is perm itted. If the S O bit is 0, both sup ervisor and u ser
level accesses are permitted.
When an access is made to a memory space assigned to the chip
select, the chip select l ogic compares the SO bit with bit 2 of the
internal transfer code, which indicates whether the access is at the
supervisor or user level. If the chip select logic detects a protection
violation, the access is ignored.
1 = Only supervisor mod e accesses allowed; user mode acce sses
ignored by chip select logic
0 = Supervisor and user mode accesses allowed
RO — Read-Only Bit
The RO bit restricts write accesses to the address range defined by
the corresponding chip select. If the RO bit is 1, only read access is
permitted. If the RO bit is 0, both read and write accesses are
permitted.
When an access is made to a memory space assigned to the chip
select, the chip select logic compares the RO bit with the internal
Address: 0x00c2_00006 and 0x00c2_0007
Bit 15 14 13 12 11 10 9 Bit 8
Read: SO RO PS WWS WE WS2 WS1 WS0
Write:
Reset:00111111
Bit 7654321Bit 0
Read: 0 0 0000
TAEN CSEN
Write:
Reset:00000010
= Writes have no effect and the access terminates without a tr ansfer er ror exception.
Figure 20-5. Chip Select Control Register 3 (CSCR3)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
528 Chip Select Module MOTOROLA
Chip Selec t Module
read/write signal, which indicates whether the access is a read
(read/write = 1) or a write (read/write = 0). If the chip select logic
detects a violation (RO = 1 with read/write = 0), the access is ignored.
1 = Only read accesses allowed; write accesses ignored by the
chip select logi c
0 = Read and write accesses allowed
PS Port Size Bit
The PS bit defines the width of the external data port supported by the
chip select as either 16-bit or 32-bit. When a chip select is
progr amm ed as a 16 -bi t p ort, the extern al devi ce must be co nnecte d
to D[ 31:16 ]. For 32- bit accesses t o 16- bit por ts, the e xterna l mem ory
interface initiates two bus cycles and multiplexes data as needed to
complete the data transfer.
1 = 32 bit port
0 = 16 bit port
WWS Write Wait State Bit
The WWS bit determines if an additional wait state is required for write
cycles. WWS does not affect read cycles.
1 = One additional wait state added for write cycles
0 = No additional wait state added for write cycles
WE Write Enable Bit
The WE bit defines when the enable byte output pins (EB[3:0]) are
asserted . When WE is 0, E B[3:0] are configu red as byte enab les and
assert for both exter nal rea d and exter nal w rite acce sses. When W E
is 1, EB[3:0] are configured as write enables and assert only for
externa l write accesses.
1 = EB[3:0] configured as write enables
0 = EB[3:0] configured as byte enables
NOTE: The W E bit has no effect on the EB[3:0] pin function if the chi p select is
not a ctive. If the chip se lect is not active , th e E B[3:0] pin funct io n is byte
enable by default.
WS[2:0] Wait States Field
The W S fie ld determine s the num ber of w ait states for the chip sel ect
logic to insert before asserting the internal cycle termination signal.
One wait state is equ al to one system clock cycle. If WS is con figured
for zero wait states, then the internal cycle termination signal is
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Chip Select Module
Mem ory Map and Registers
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Chi p Select Module 5 29
asserted in the clock cycle following the start of the cycle access,
resulting in one-clock transfers. A WS configured for one wait state
means that the inter nal cycle termina tion signal is asserted two clo ck
cycles after the start of the cycle access.
Since the internal cycle termination signal is asserted internally after
the programmed number of wait states, software can adjust the bus
timing to accommodate the access speed of the externa l device. With
up to seven possible wait states, even slow devices can be interfaced
with the MCU.
TAEN Transfer Acknowledge Enable Bit
The TA EN bit determines whether the internal cycle termination
signal is asserted by the chip select logic when a ccesses occur to the
address range defined by the corresponding chip select. When TAEN
is 0, an external device is responsible for asserting the external TA pin
to terminate the bus access. When TAEN is 1, the chip select logic
asserts the internal cycle term ination signal after a time determined
by the pr ogramme d number of wait sta tes. When TAEN is 1 , external
logic can still terminate the access before the internal cycle
termination signal is asserted by asserting the external TA pin.
1 = Internal cycle termination signal asserted by chip select logic
0 = Internal cycle termination signal asserted by external logic
Table 20-3. Ch ip Select Wait States Encoding
WS[2:0]
Number of Wait States
WWS = 0 WWS = 1
Read Access Write Access Re ad Acces s Write Access
0000001
0011112
0102223
0113334
1004445
1015556
1106667
1117778
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
530 Chip Select Module MOTOROLA
Chip Selec t Module
CSEN Chip Select Enable Bit
The CSE N bit enables the chip select logic. When the chip select
function is disabled, the CSx signal is negated high.
1 = Chi p select function enabled
0 = Chip select function disabled
20 .7 Fun cti on al Descr ipti o n
Each chip se le ct can provide a chip ena ble signal for an exter nal device
and assert the internal bus cycle termination signal.
Setting the CSEN bit in CSCR enables the chip select to provide an
ext erna l chip enabl e.
Setting both the CS EN and TAEN bits in CSCR ena bl es the chip select
to generate the internal bus cycle termination signal.
Both the chip select pin assertion a nd the bus cycle termination fun ction
depend on an initial address/op tion match for activation. During the
matching process, the fixed base address of each chip select is
compared to the corresponding address for the bus cycle to determine
whe ther an ad dress m atch h as occur red . This m atch is f urthe r qu alif ied
by compar ing the int ernal read/wr ite indication and access type wi th the
programmed values in CSCR of each chip select. When the address and
option information match the current cycle, the chip select is activated. If
no chip select m atches the bus cycle inf ormation for the cur rent access,
the chip select logic does not respond in any way.
Only one chip select can be active for a given bus cycle. The
configuration of the active chip select, determined by the wait state
(WS/WWS) field, the port size (PS) field, and the write enable (WE) field,
is used for the access.
NOTE: WWS and WS are valid only if the TAEN bit is 1 for the active chip select.
When no chip select pin is available, the active chip select can still
terminate the bus cycle. If both the CSEN and TAEN bits are 1 and the
address/ options match the chip select configuration, then the chip sele ct
logic asser ts the inter nal termination signal; the bus cycle terminates
after the programmed number of wait states. If the external TA or TEA
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Chip Select Module
Interrupts
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Chi p Select Module 5 31
pin is asserted before the chip select logic asserts the internal cycle
termination signal, then the bus cycle is term inated early.
If internal address bit 31 is 0, then the access is internal. If internal
address bit 31 is 1, then the access is external.
NOTE: Chip select logic does not decode internal address bits A[30:25].
20.8 Interrupts
The chip select module does not generate interrupt requests.
Table 20-4. Chip Select Address Range Encoding
Chip Select Block Size Address Bits Compared
(A[31:23])(1)
1. The chip selects do not decode A[30:2 5]. Thus, the total 32-Mb yte block siz e is
repeated/mirrored in external memory space.
CS0 8 MB 1XXX_ XXX0 _0
CS1 8 MB 1XXX_XXX0_1(2)
2. If the EMINT bit i n the chi p configurati on module CCR is set, then CS1 ma tches only
internal accesses to the 8-MB bloc k starting at address 0 to support emulati on of inte rnal
memory. Thus, A[31:23] match 0xxx_xxx0_0.
CS2 8 MB 1XXX_ XXX1 _0
CS3 8 MB 1XXX_ XXX1 _1
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
532 Chip Select Module MOTOROLA
Chip Selec t Module
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 533
Technical Data MMC2107
Section 21. JTAG Test Access Port and OnCE
21.1 Contents
21.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .535
21.3 Top-Level Test Access Port (TAP). . . . . . . . . . . . . . . . . . . .537
21.3.1 Test Clock (TCLK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .538
21.3.2 Test Mode Select (TMS) . . . . . . . . . . . . . . . . . . . . . . . . .538
21.3.3 Test Data Input (TDI) . . . . . . . . . . . . . . . . . . . . . . . . . . . .538
21.3.4 Test Data Output (TDO). . . . . . . . . . . . . . . . . . . . . . . . . .538
21.3.5 Test Reset (TRST). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .538
21.3.6 Debug Event (DE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .538
21.4 Top-Level TAP Controller. . . . . . . . . . . . . . . . . . . . . . . . . . .540
21.5 Instruction Shift Register . . . . . . . . . . . . . . . . . . . . . . . . . . .541
21.5.1 EXTEST Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . .541
21.5.2 IDCODE Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . .542
21.5.3 SAMPLE/PRELOAD Instruction. . . . . . . . . . . . . . . . . . . .543
21.5.4 ENABLE_MCU_ONCE Instruction. . . . . . . . . . . . . . . . . .543
21.5.5 HIGHZ Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .544
21.5.6 CLAMP Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .544
21.5.7 BYPASS Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . .544
21.6 IDCODE Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .545
21.7 Bypass Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .546
21.8 Boundary SCAN Register. . . . . . . . . . . . . . . . . . . . . . . . . . .546
21.9 Restrictions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .546
21.10 Non-Scan Chain Operation . . . . . . . . . . . . . . . . . . . . . . . . .547
21.11 Boundary Scan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .547
21.12 Low-Level TAP (OnCE) Module. . . . . . . . . . . . . . . . . . . . . .553
21.13 Signal Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .555
21.13.1 Debug Serial Input (TDI) . . . . . . . . . . . . . . . . . . . . . . . . .555
21.13.2 Debug Serial Clock (TCLK) . . . . . . . . . . . . . . . . . . . . . . .555
21.13.3 Debug Serial Output (TDO) . . . . . . . . . . . . . . . . . . . . . . .555
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
534 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.13.4 Debug Mode Select (TMS). . . . . . . . . . . . . . . . . . . . . . . .556
21.13.5 Test Reset (TRST). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556
21.13.6 Debug Event (DE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556
21.14 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556
21.14.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .557
21.14.2 OnCE Controller and Serial Interface. . . . . . . . . . . . . . . .558
21.14.3 OnCE Interface Signals . . . . . . . . . . . . . . . . . . . . . . . . . .559
21.14.3 . 1 Interna l Debug Request Input (I DR) . . . . . . . . . . . . . .559
21.14.3.2 CPU Debug Request (DBGRQ). . . . . . . . . . . . . . . . . .560
21.14.3.3 CPU Debug Acknowledge (DBGACK). . . . . . . . . . . . .560
21.14.3.4 CPU Breakpoint Request (BRKRQ). . . . . . . . . . . . . . .560
21.14.3.5 CPU A ddress, Attributes (ADDR, ATTR). . . . . . . . . . .560
21.14.3.6 CPU Status (PSTAT). . . . . . . . . . . . . . . . . . . . . . . . . .560
21.14.3.7 OnCE Debug Output (DEBUG) . . . . . . . . . . . . . . . . . .560
21.14.4 OnCE Controller Registers. . . . . . . . . . . . . . . . . . . . . . . .561
21.14.4.1 OnCE Command Register. . . . . . . . . . . . . . . . . . . . . .561
21.14.4.2 OnCE Control Register . . . . . . . . . . . . . . . . . . . . . . . .564
21.14.4.3 OnCE Status Register . . . . . . . . . . . . . . . . . . . . . . . . .568
21.14.5 OnCE Decoder (ODEC). . . . . . . . . . . . . . . . . . . . . . . . . .570
21.14.6 Memory Breakpoint Logic . . . . . . . . . . . . . . . . . . . . . . . .570
21.14.6.1 Memory Address Latch (MAL). . . . . . . . . . . . . . . . . . .571
21.14.6.2 Breakpoint Address Base Registers . . . . . . . . . . . . . .571
21.14.7 Breakpoint Address Mask Registers . . . . . . . . . . . . . . . .571
21.14.7.1 Breakpoint Address Comparators . . . . . . . . . . . . . . . .572
21.14.7.2 Memory Breakpoint Counters . . . . . . . . . . . . . . . . . . .572
21.14.8 OnCE Trace Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .572
21.14.8.1 OnCE Trace Counter. . . . . . . . . . . . . . . . . . . . . . . . . .573
21.14.8.2 Trace Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .574
21.14.9 Methods of Entering Debug Mode . . . . . . . . . . . . . . . . . .574
21.14.9.1 Debug Request During RESET . . . . . . . . . . . . . . . . . .574
21.14.9.2 Debug Request During Normal Activity . . . . . . . . . . . .575
21.14.9.3 Debug Request During Stop, Doze, or Wait Mode . . .575
21.14.9.4 Software Request During Normal Activity . . . . . . . . . .575
21.14.10 Enabling OnCE Trace Mode . . . . . . . . . . . . . . . . . . . . . .575
21.14.11 Enabling OnCE Memory B reakpoints . . . . . . . . . . . . . . .576
21.14.12 Pipeline Information and Write-Back Bus Register . . . . .576
21.14.12.1 Program Counter Register. . . . . . . . . . . . . . . . . . . . . .577
21.14.12.2 Instruction Register . . . . . . . . . . . . . . . . . . . . . . . . . . .577
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Introduction
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 535
21.14.12.3 Control State Register . . . . . . . . . . . . . . . . . . . . . . . . .577
21.14.12.4 Writeback Bus Register . . . . . . . . . . . . . . . . . . . . . . . .579
21.14.12.5 Processor Status Register. . . . . . . . . . . . . . . . . . . . . .579
21.14.13 Instruction Address FIFO Buffer (PC FIFO). . . . . . . . . . .580
21.14.14 Reserved Test Control Registers. . . . . . . . . . . . . . . . . . .581
21.14.15 Serial Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .581
21.14.16 OnCE Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .582
21.14.17 Target Site Debug System Requirements . . . . . . . . . . . .582
21.14.18 Interface Connector for JTAG/OnCE Serial Port . . . . . . .582
21.2 Introduction
The MMC2107 has two JTAG (Joint Test Action Group) TAP (test
access port) controllers:
1. A top-level controller that allows access to the MMC2107’s
boundary scan (external pins) register, IDCODE register, and
bypass register
2. A low-level OnCE (on-chip emulation) controller that allows
access to MMC2107s central processor unit (CPU) and
debugger-related registers
At power-up, only the top-level TAP controller will be visible. If desired,
a user can then enable the low-level OnCE contro ller which will in turn
disable the top-level TAP controller. The top-level TAP controller will
remain disabled until either power is removed and reapplied to the
MMC2107 or until the test reset signal, TRST, is asserted (logic 0).
The OnCE TAP controller can be enabled in either of two ways:
1. With the top-level TAP controller in its test-logic-reset state:
a. Deassert TRST, test reset (logic1)
b. Assert DE , the debug event ( logic 0) for tw o TCLK, test clock,
cycles
2. Shift the ENABLE_MCU_ONCE instruction, 0x3, into the top-level
TAP controllers instruction register (IR) and pass through the TAP
controller state update-IR.
Refer to Figure 21-1.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Te ch n ic al D ata MMC2107 Rev. 2.0
536 JTAG Test Access Port and OnCE MOTO ROLA
JTAG Test Access Port and OnCE
Figure 21-1. Top-Level Tap Module and Low-Level (OnCE) TAP Module
TOP-LEVEL
TAP
TAP
CONTROLLER
TAP
INSTRUCTION
REGISTER
IDCODE
(SHIFT)
REGISTER
MUX
LOW-LEVEL TDO
BOUNDARY
SCAN
(SHIFT)
REGISTER
MSB
199
0
LSB
TDO
BYPASS
1 BIT
LOW-LEVEL
TAP (OnCE)
DE TCLK TMS TRST
MSB
31
0
LSB
MUX
MUX
OnCE
TAP
CONTROLLER
OnCE CMD
INSTRUCTION
REGISTER
OnCE
DATA
REGISTERS
MUX
TDI
MODULE MODULE
MSB
3
0
LSB
IR[3:0] = 0 x 3?
ENABLE_MCU_ONCE
CMD SELECT
IF YES, THE N B,
SELECT LOW-LEVEL
(OnCE) TDO;
IF NO, THAN A,
SELECT
AB
SELECT
TOP-LEV EL TDO
TOP-LEVEL TDO
TDO
SELECT
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Top-Le ve l Test Acce ss Po rt (T AP)
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 537
21.3 Top-Level Test Access Port (TAP)
The MMC2107 provides a dedicated user-accessible test access port
(TAP) that is fully compatible with the IEEE 1149.1 Standard Test
Access Port and Boundary-Scan Architecture. Problems associated with
testing high-density circuit boards have led to development of this
proposed standard under the sponsorship of the Test Technology
Committee of IEEE and the Joint Test Action Group (JTAG). The
MMC2107 implementation supports circuit-board test strategies based
on this standard.
The top -level TAP consists o f five dedica ted signal pi ns, a 16-state TA P
controller, an instruction register, and three data registers, a boundary
scan register for mon itori ng and contr olli ng t he d evices externa l pins, a
device identification register, and a 1-bit bypass (do nothing) register.
The top-level TAP provides the ability to:
1. Perform boundary scan (external pin) drive and monitor
operations to test circuitry external to the MMC2107
2. Disable the MMC2107s output pins
3. Read the MMC2107s IDCODE device identification register
CAUTION: Certain precautions must be observed to ensure that the top-level
TAP module does not interfere with non-test operation. See
21.10 Non-Scan Chain Operation for details.
The MMC2107s top-level TAP module includes a TAP controller, a 4-bit
instruction register, and three te st data registers (a 1-bit bypass register,
a 200-bit boundary scan register, and a 32-bit IDCODE register). The
top-level tap controller and the low-level (OnCE) TAP controller share
the external signals described here.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
538 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.3.1 Test Clock (TCLK)
TCLK is a test clock input to synchronize the test logic. TCLK is
independent of the MMC2107 processor clock. It includes an internal
pullup resistor.
21.3.2 Test Mode Select (TMS)
TMS is a test mode select input (with an inte rnal pullup resistor) that is
sampled on the rising edge of TCLK to sequence the TAP controller’s
state machine.
21.3.3 Test Data Input (TDI)
TDI is a serial test data input (with an internal pullup resistor) that is
sampled on the rising edge of TCLK.
21.3.4 Test Data Output (TDO)
TDO is a three-state test data output that is actively driven in the shift-IR
and shift-DR controller states. TDO changes on the falling edge of
TCLK.
21.3.5 Test Reset (TRST)
TRST is an active low asynchronous reset with an internal pullup resistor
that forces the TAP controller into the test-logic-reset state.
21.3.6 Debug Event (DE)
This is a bidirectional, active-low signal.
As an output, this signal will be asserted for three system clocks,
synchrono us to the rising CLK OUT ed ge, to acknowled ge that the CPU
has entered debu g m ode a s a result of a debug request or a br eakpo i nt
condition.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Top-Le ve l Test Acce ss Po rt (T AP)
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 539
As an i nput, this signal provides multiple functions such as:
The main function is a means of entering debug mode from an
ext ernal command control ler. This signal, when asserte d, caus es
the C PU to fin ish the curr ent in structio n bein g exe cuted, save the
instruction pipeline information, enter debug mode, and wait for
commands to be entered from the serial debug input line. This
input must be asserted for at least three system clocks, sampled
with the rising CLKOUT edge. This function is ignored during
reset. While the processor is in debug mode, this signal is still
sampled but has no effect until debug mode is exited.
Another input function is to enable OnCE. This is an alternate
method to the ENABLE_MCU_ONCE JTAG command to enable
the OnCE logic to be accessible via the JTAG interface. This input
signal must be asserted low (while in t he test-logic-reset sta te with
POR/TRST not asserted) for at least two TCLK rising edges. Once
enabled, the OnCE will remain enabled until the next POR or
TRST resets.
Another input function is as a wake-up event from a low-power
mode of operation. Asynchronously asserting this signal will cause
the clock controller to restart. This signal must be held asserted
unti l th e MCORE receives thr ee valid rising edges on th e system
clock. Then the processor will exit the low-power mode and go into
debug mode.
NOTE: If used to enter debug mode, DE must be pulled negated before the
processor exits debug mode to prevent a still low signal fr om being
unintentionally recognized as another debug request. Also, asserting
this sign al to enter debug mode m ay preve nt exter nal logi c from seeing
the proce ssor output acknowledgment since the external pullup may not
be able to pull the signal negated before the handshake is asserted.
Finally, if using this signal to enable OnCE outside of reset it may be
seen as a request to enter debug mode.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
540 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.4 Top-Level TAP Controller
The top-level TAP controller is responsible for interpreting the sequence
of logical values on the TMS signal. It is a synchronous state machine
that controls the ope ration of the JTAG logi c. Th e ma chines sta tes ar e
shown in Figure 21-2. The value shown adjacent to each arc represents
the value of the TMS signal sampled on the rising edge of the TCLK
signal.
The top-level TAP controller can be asynchronously reset to the test-
logic-reset state by asserting TRST, test reset. As Figure 21-2 shows,
holding TMS high (to logic 1) while clocking TCLK through at least five
rising edges will also cause the state machine to enter its te st-logic-reset
state.
Figure 21-2. Top-Level TAP Controller State Machine
TEST-LOGIC-
RESET
RUN-TEST/IDLE SELECT-DR_SCAN
CAPTURE-DR
SHIFT-DR
EXIT1-DR
PAUSE-DR
EXIT2-DR
UPDATE-DR
SELECT-IR_SCAN
CAPTURE-IR
SHIFT-IR
EXIT1-IR
PAUSE-IR
EXIT2-IR
UPDATE-IR
0
0
0
1
1
1
00
111
1
0
0
11
1
0
0
0
1
0
1
0
0
1
0
0
0
1
1
1
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Instruction Shift Register
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 541
21.5 Instruction Shift Register
The MMC2107 top-level TAP module uses a 4-bit instruction shift
register with no parity. This register transfers its value to a parallel hold
regi ster and applie s an i nstruction on the fa lling edge of TCLK when the
TAP state machine is in the update-IR state. To load the instructions into
the shi ft portio n of t he r egi ster , place the se rial d ata on the TDI p in prio r
to each ri sing edge of TCLK . The MSB of th e instru ction shi ft re gister is
the bit closest to the TDI pin and the LSB is the bit closest to the TDO pin.
Table 21-1 lists the instructions supported along with their opcodes,
IR3–IR0. The last three instructions in the table are reserved for
manufacturing purposes only.
Unused opcodes are currently decoded to perform the BYPASS
operation, but Motorola reserves the right to change their decodings in
the future.
21.5.1 EXTEST Instruction
The external test instruction (EXTEST) selects the boundary-scan
regi ster. The EX TEST inst ruction forces all outpu t pins and bidi rectional
pins configured as outputs to the preloaded fixed values (with the
SAMP LE/PRE LOAD instructio n) and hel d in the bou ndar y-scan up date
registers. The EXTEST instruction can also configure the direction of
bidirectional pins and establish high-impedance states on some pins.
EXTEST also asserts internal reset for the MMC2107 system logic to
force a predictable internal state while performing external boundary
scan operations.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
542 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.5.2 IDCODE Instruction
The IDCODE instruction selects the 32-bit IDCODE register for
connection as a shift path between the TDI pin and the TDO pin. This
instruction allows interrogation of the MMC2107 to determine its version
number and other part identification data. The IDCODE register has
been implemented in accordance with the IEEE 1149.1 standard so that
the least significant bit of the shift register stage is set to logic 1 on the
rising edge of TCLK following entry into the capture-DR state. Therefore,
the first bit to be shifted out after selecting the IDCODE register is always
Table 21-1. JTAG Instru ctions
Instruction IR3IR0 Inst r uc ti on Sum m ary
EXTEST 0000 Selects the boundary scan register while
applying fixed values to output pins and
asserting functional reset
IDCODE 0001 Selects IDCODE register for shift
SAMPLE/PRELOAD 0010 Selects the boundary scan register for
shifting, sampling, and preloading without
disturbing functional operation
ENABLE_MCU_ONCE 0011 Instruction to enable the MCO RE TAP
controller
HIGHZ 1001 Selects the bypass register while
three-stating all output pins and asserting
functional reset
CLAMP 1100 Selects bypass while applying fixed values to
output pins and asserting functional reset
BYPASS 1111 Sele ct s the bypass register for data
operations
Reserved 0100
0110 Instruction for ch ip man ufacturing purpo ses
only
Reserved 0101 Instruc tion for chip manufacturing purposes
only(1)
1. To exit this instruction, the TRST pin mu st be asserted or power-on reset.
Reserved 0111–1000
1101–1110
1010–1011 Dec oded t o select bypass register(2)
2. Motorol a reserves the right to change the decoding of the unus ed opcodes in the future.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Instruction Shift Register
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 543
a logic 1. Th e remaini ng 31 bits are also set to fixed valu es on the rising
edge of TCLK following entry into the capture-DR state.
IDCODE is the default instruction placed into the instruction register
when the top-level TAP resets. Thus, after a TAP reset, the IDCODE
(data) register will be selected automatically.
21.5.3 SAMPLE/PREL OAD Instruction
The SAMPLE/PRELOAD instruction provides two separate functions.
First, it obtains a sam ple of the syste m da ta and contr ol signa ls prese nt
at the MMC2107 input pin s and just prior to the boundary scan cell at the
output pins. This sampling occurs on the rising edge of TC LK in the
capture -DR state when an instruction encoding of hex 2 is resident in the
instruction register. The user can observe this sampled data by shifting
it through the boundary scan register to the output TDO by using the
shift-DR state. Both the data capture and the shift operation are
transparent to system operation.
NOTE: The user is responsible for providing some form of external
synchronization to achieve meaningful results because there is no
internal synchronization between TCLK and the system clock.
The second function of the SAMPLE/PRELOAD instruction is to initialize
the boundary scan register update cells before selecting EXTEST or
CLAMP. This is achieved by ignoring the data being shifted out of the
TDO pin while shifting in initialization data. The update-DR state in
conjunction with the falling edge of TCLK can then transfer this data to
the update cells. This data will be applied to the external output pins
when EXTEST or CLAMP instruction is applied.
21.5.4 ENABL E_MCU_ONCE Instruction
The ENABLE_MCU_ONCE is a public instruction to enable the
M•CORE OnCE TAP controller. When the OnCE TAP controller is
enabled, the top-level TAP controller connects the internal OnCE TDO
to the pin TDO and remains in t he run-test/idle state . It will remain in this
stat e until TRST is a sserted. Whi le the OnCE TAP contr oller is enabled,
the top-level JTAG remains transparent.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
544 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.5.5 HIGHZ Instruction
The HIGHZ instruction is provided as a manufacturers optional public
instruction to prevent having to backdrive the output pins during
circuit-board testing. When HIGHZ is invoked, all output drivers,
including the 2-state drivers, are turned off (for example, high
impedance). The instruction selects the bypass register. HIGHZ also
asserts internal reset for the MMC2107 system logic to force a
predictable internal state.
21.5.6 CLAMP Instruction
The CLA MP instru cti on selects th e bypass r egister and ass erts inte rnal
reset while simultaneously forcing all output pins and bidirectional pins
confi gure d as out puts to th e fixed va lu es that a re prel oad ed and held in
the boundary scan update register. This instruction enhances test
efficiency by reducing the overall shift path to a single bit (the bypass
register) while conducting an EXTEST type of instruction through the
boundary scan register.
21.5.7 BYPASS Instruction
The BYP ASS instructi o n selects the single- bit bypass register, creating
a single-bit shift register path from the TDI pin to the bypass register to
the TDO pin. This instruction enhances test efficiency by reducing the
overall shift path when a device other than the MMC2107 processor
becomes th e device und er test on a boar d design with mu ltiple chips on
the overall IEEE 1149.1 standard defined boundary scan chain. The
bypass re gister h as been implem ented in accor dance with IE EE 1149.1
standard so that the shift register state is set to logic 0 on the rising edge
of TCLK following entry into the capture-DR state. The refore, the first bit
to be shifted out after selecting the bypass register is always a logic 0 (to
differentiate a part that supports an IDCODE register from a part that
supports only the bypass register).
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
IDCODE Register
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 545
21.6 IDCODE Reg ister
An IEEE 1149.1 standard compliant JTAG identification register
(IDCODE) has been included on the MMC2107.
Bits 3128 Version Number (Part Revision Number)
This is equivalent to the lower four bits of the PRN of the chip
identification register located in the chip configuration module.
Bits 2722 Design Ce nter
Indicates the Motorola Microcontroller Division
Bits 2112 Device Number (Part Identification Number)
Bits 19-12 are equivalent to the PIN of the chip identification register
located in the chip configuration module.
Bits 111 JEDEC ID
Indicates the reduced JEDEC ID for Motorola. JEDEC refers to the
Joint Electron Device Engineering Council. Refer to JEDEC
publication 106-A and chapter 11 of the IEEE 1149.1 standard for
further information on this field.
Bit 0
Differentiates this register as the JTAG IDCODE register (as opposed
to the bypass register), according to the IEEE 1149.1 standard
Bit 31 30 29 28 27 26 25 B it 24
00000101
Bit 23 22 21 20 19 18 17 B it 16
11000001
Bit 15 14 13 12 11 10 9 Bi t 8
01110000
Bit 7654321Bit 0
00011101
Figure 21-3. IDCODE Register Bit Specification
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
546 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.7 Bypass Register
The MMC2107 includes an IEEE 1149.1 standard-compliant bypass
register, which creates a single bit shift register path from TDI to the
bypass register to TDO when the BYPASS instruction is selected.
21.8 Boundary SCAN Register
MMC210 7 includes an IEEE 11 49.1 standar d-compliant boundary -scan
register. The boundary-scan register is connected between TDI and
TDO when the EXTEST or SAMPLE/PRELOAD instructions are
sele cted. Thi s r egister capt ures signal p in data on the inp ut pi n s, for ces
fixed values on the output signal pins, and selects the direction and drive
characteristics (a logic value or high impedance) of the bidirectional and
three-state signal pins.
21.9 Restrictions
The test logic is implemented usin g static logic design, and TCLK can be
stopped in either a high or low state without loss of data. The system
logic, however, operates on a different system clock which is not
synchroni ze d to T CLK i nter nally. A ny mixed ope rati on r equirin g th e use
of the IEEE 1149.1 standard test logic, in conjunction with system
functional logic that uses both clocks, must have coordination and
synchronization of these clocks done externally.
The control afforded by the output enable signals using the boundary
scan register and the EXTEST instruct ion requ ires a compat ible
circuit-board test environment to avoid device-destructive
configurations. The user must avoid situations in which MMC2107
output drivers are enabled into actively driven networks.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Non-Scan Chain Op eration
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 547
MMC210 7 features a low-po wer stop mode. The interacti on of the scan
chain interface with low-power stop mode is:
1. The TAP controller must be in the test-logic-reset state to either
enter or remain in the low-power stop mode. Leaving the
test-logic-reset state negates the ability to achieve low- power, bu t
does not otherwise affect device functionality.
2. The TCLK input is not blocked in low-power stop mode. To
consume minimal power, the TCLK input should be externally
connected to VDD.
3. The TMS, TDI, TRST pins include on-chip pullup resistors. In
low-power stop mode, these three pins should remain either
unconnected or connected to VDD to achieve mi nimal pow er
consumption.
21.10 Non-Scan Chain Operation
Keeping the TAP controller in the test-logic-reset state will ensure that
the scan chain test logic is kept transparent to the system logic. It is
recommended that TMS, TDI, TCLK, and TRST be pulled up. TRST
could be connected to ground. However, since there is a pullup on
TRST, some amount of current will result. JTAG will be initialized to the
test-l ogic-reset state o n power- up w ithout T RST asserted low due to the
JTAG power-on-reset internal input. The low-level TAP module in the
M•CORE also has the power-on-reset input.
21.11 Boundary Scan
The MMC2107 boundary-scan register contains 200 bits. This register
can be connected between TDI and TDO when EXTEST or
SAMPLE /PRELOAD instructions are selected. This register is used for
capturing signal pin data on the input pins, forcing fixed values on the
output signal pins, and selecting the direction and drive characteristics
(a logic value or high impedance) of the bidirectional and three-state
signal pins.
This IEEE 1149.1 standard-compliant boundary-scan register contains
bits for bonded-out and non-bonded signals excluding JTAG signals,
analog signals, power supplies, compliance enable pins, and clock
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
548 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
signals.To maintain JTAG compliance, TEST should be held to logic 0
and D E shoul d be held to logic 1. T hese non- scanned pin s are shown in
Table 21-2.
Table 21-2. List of Pins Not Scanned in JTAG Mode
Pin Name Pin Type
EXTAL Clock/analog
XTAL Clock/analog
VDDSYN Supply
VSSSYN Supply
PQA4PQA3 and PQA1PQA0 Analog
PQB3PQB0 Analog
VRH Supply
VRL Supply
VDDA Supply
VSSA Supply
VDDH Supply
TRST JTAG
TCLK JTAG
TMS JTAG
TDI JTAG
TDO JTAG
DE JTAG compliance enable
TEST JTAG compliance enable
Vpp Supply
VDDF Supply
VSSF Supply
VSTBY Supply
VDD Supply
VSS Supply
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Bound ary Scan
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 549
Table 21-3 defines the boundary-scan register.
The first column shows bit numbers assigned to each of the
registers cells. The bit near est to TDO (th e first to be shifted in) is
defined as bit 0.
The second column lists the logical state bit for each MMC2107
pin alter nately w ith th e r ead/wr ite di r ection contr ol bit for that pi n.
The logic state bits are non-inverting with respect to their
associated pins, so that a 1 logical state bit equates to a logical
high voltage on its corresponding pin. A direction control bit value
of 1 causes a pins logical state to be expressed by its logic state
bit, a read of a pin. A directio n control bit value of 0 causes a pins
log ical vol tage to follow th e state of its l ogical state bit, a write t o a
pin.
Table 21-3. Boundary-Scan Register Definition (Sheet 1 of 4)
(Note: Shaded regions indicate option al pins)
Bit Log ical State and Direction
Control Bits for Each Pin Bit Logical State and Direction
Control Bits fo r Each Pin
0 D31 l ogical state 17 A18 direction control
1 D3 1 direction control 18 A 19 logical state
2A12 logical state 19 A19 direction control
3 A12 direction control 20 RSTOUT logical state
4A13 logical state 21 RSTOUT direction control
5 A13 direction control 22 A 20 logical state
6A14 logical state 23 A20 direction control
7 A14 direction control 24 RESET logica l state
8A15 logical state 25 RESET direction control
9 A15 direction control 26 A 21 logical state
10 A16 logical state 27 A21 direction control
11 A16 direction control 28 A 22 logical state
12 A17 logical state 29 A22 direction control
13 A17 direction control 30 TEA logical state
14 CLKOUT log ical state 31 TEA direction control
15 CLKO UT direction control 32 EB0 logical state
16 A18 logical state 33 EB0 direction control
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
550 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
34 EB1 logica l state 64 CS2 logical state
35 EB1 direction control 65 CS2 direction control
36 TA logical state 66 INT4 logical state
37 TA directi on control 67 INT4 direction control
38 EB2 logica l state 68 CS3 logical state
39 EB2 direction control 69 CS3 direction control
40 SHS logical state 70 TC0 logical state
41 SHS direction control 71 TC0 direction control
42 EB3 logica l state 72 INT3 logica l state
43 EB3 direction control 73 INT3 direction control
44 OE logical state 74 TC1 logical state
45 OE direction control 75 TC1 direction control
46 SS logical state 76 I NT2 logica l state
47 SS direction control 77 I NT2 direction control
48 S CK logical state 78 IN T1 logical state
49 S CK direction control 79 INT1 direction control
50 MISO logical state 80 INT0 logica l state
51 MISO direction control 81 INT0 direction control
52 MOSI logical state 82 RXD1 logical state
53 MOSI direction control 83 RXD1 direction control
54 INT7 logical state 84 TXD1 log ical state
55 INT7 direction control 85 TXD1 direction control
56 INT6 logical state 86 RXD2 logical state
57 INT6 direction control 87 RXD2 direction control
58 CS0 logic al st at e 88 TC2 logical state
59 CS0 direction control 89 TC2 direction control
60 CS1 logic al st at e 90 TX D 2 logic a l sta t e
61 CS1 direction control 91 TXD2 direct ion control
62 INT5 logical state 92 CSE0 logical state
63 INT5 direction control 93 CSE0 direction control
Table 21-3. Boundary-Scan Register Definition (Sheet 2 of 4)
(Note: Shaded regions indicate option al pins)
Bit Log ical State and Direction
Control Bits for Each Pin Bit Logical State and Direction
Control Bits fo r Each Pin
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Bound ary Scan
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 551
94 I COC1_0 logical state 124 D2 logica l state
95 I COC1_0 directi on co ntrol 125 D2 direction control
96 CSE1 logical state 126 D3 logical state
97 CSE1 direct ion control 127 D3 direction control
98 R/W logical state 128 D4 logi cal state
99 R/W direction control 129 D4 direction control
100 ICO C1_1 logical state 130 D5 logica l state
101 ICO C1_1 direction control 131 D5 direct ion control
102 ICO C1_2 logical state 132 D6 logica l state
103 ICO C1_2 direction control 133 D6 direct ion control
104 ICO C1_3 logical state 134 D7 logica l state
105 ICO C1_3 direction control 135 D7 direct ion control
106 ICO C2_0 logical state 136 D8 logica l state
107 ICO C2_0 direction control 137 D8 direct ion control
108 ICO C2_1 logical state 138 D9 logica l state
109 ICO C2_1 direction control 139 D9 direct ion control
110 I CO C2_2 logical st ate 140 D10 logic al state
111 ICOC2_2 direction control 141 D10 direction control
112 I CO C2_3 logical st ate 142 D11 logic al state
113 I CO C2_3 directi on co ntrol 143 D11 direction control
114 D0 l ogical state 144 D12 logic al state
115 D0 direction control 145 D12 direction control
116 A0 logical state 146 D13 logical state
117 A 0 direction cont rol 147 D13 direction cont rol
118 A1 logical state 148 D14 logical state
119 A 1 direction cont rol 149 D14 direction cont rol
120 D1 logical state 150 A3 logi ca l stat e
121 D1 direction control 151 A3 direction control
122 A2 logic a l sta t e 152 A4 logical stat e
123 A2 direction control 153 A4 d irection control
Table 21-3. Boundary-Scan Register Definition (Sheet 3 of 4)
(Note: Shaded regions indicate option al pins)
Bit Log ical State and Direction
Control Bits for Each Pin Bit Logical State and Direction
Control Bits fo r Each Pin
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
552 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
154 D15 logical state 177 A8 direction control
155 D15 direction control 178 A9 logical state
156 A5 logical state 179 A9 d irection con trol
157 A5 direction control 180 D23 logical state
158 D16 logical state 181 D23 direct ion control
159 D16 direction control 182 A10 logical state
160 A6 log ical state 183 A 10 direction control
161 A6 direction control 184 D24 logical state
162 A7 logical state 185 D24 direction control
163 A7 direction control 186 D25 logical state
164 D17 logical state 187 D25 direct ion control
165 D17 direction control 188 A11 logical state
166 D18 logical state 189 A11 direction control
167 D18 direction control 190 D26 logical state
168 D19 logical state 191 D16 direct ion control
169 D19 direction control 192 D27 logical state
170 D20 logical state 193 D27 direct ion control
171 D20 direction control 194 D28 logical state
172 D21 logical state 195 D28 direct ion control
173 D21 direction control 196 D29 logical state
174 D22 logical state 197 D29 direct ion control
175 D22 direction control 198 D30 logical state
176 A8 logical state 199 D30 direction control
Table 21-3. Boundary-Scan Register Definition (Sheet 4 of 4)
(Note: Shaded regions indicate option al pins)
Bit Log ical State and Direction
Control Bits for Each Pin Bit Logical State and Direction
Control Bits fo r Each Pin
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Low-Level TAP (OnCE) Modul e
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 553
21.12 Low-Level TAP (OnCE) Module
The low-level TAP (OnCE, on-chip emulation) circuitry provides a
simple, inexpensive debugging interface that allows external access to
the processors internal registers and to memory/peripherals. OnCE
capabilities are controlled through a ser ial interface, mapped onto a
JTAG test access port (TAP) protocol.
Refer to Figure 21-4 for a block diagram of the OnCE.
NOTE: The interface to the OnCE controller and its resources is based on the
TAP defined for JTAG in the IEEE 1149.1 standard.
Figure 21-4. OnCE Block Diagram
Fi gu re 21-5 shows the OnCE (low-level TAP module) data registers in
the MMC2107.
PIPELINE
INFO RMATION
OnCE
CONTROLLER
AND SERIAL
BREAKPOINT
REGISTERS
AND
PC
FIFO
BREAKPOINT
AND TRA CE
INTERFACE
LOGIC
COMPARATORS
TCLK
TDI
TMS
TDO
TRST
DE
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Te ch n ic al D ata MMC2107 Rev. 2.0
554 JTAG Test Access Port and OnCE MOTO ROLA
JTAG Test Access Port and OnCE
Figure 21-5. Low-Level (OnCE) Tap Module Data Registers (DRs)
CTL
IR
PC
PSR
WBBR
SQC
DR
IDRE
TME
FRZC
RCB
BCB
RCA
BCA
TDO
0
LSB 0
LSB
0
LSB 0
LSB 0
LSB
0
LSB
0
LSB 0
LSB
0
LSB 0
LSB
1 BIT
1 BIT
MSB
15
MSB
15
MSB
31
MSB
MSB
31
MSB
31
MSB
31 MSB
31
MSB
15
127
112
111
96
95
64
63
32
31
17
16
15
14
13
12
11
10
6
5
4
MEMORY
BKPT
COUNTER A
(SHIFT)
REGISTER,
MBCA
PROGRAM
COUNTER
FIFO A N D
INCREMENT
COUNTER
(SHIFT)
REGISTER,
PC FI FO
MSB
15
BKPT
ADDRESS
BASE
REGISTER B
(SHIFT)
REGISTER,
BABB
BKPT
ADDRESS
MASK
REGISTER B
(SHIFT)
REGISTER,
BAMB
(SHIFT)
REGISTER,
OSR
(SHIFT)
REGISTER,
BYPASS
(SHIFT)
REGISTER,
OTC (SHIFT)
REGISTER,
MBCB
(SHIFT)
REGISTER,
BABA
(SHIFT)
REGISTER,
BAMA
(SHIFT)
REGISTER,
OCR
(SHIFT)
REGISTER,
CPUSCR
BYPASS
REGISTER
PASS-
BYPASS
REGISTER
PASS- OnCE
STATUS
TRACE
COUNTER MEMORY
BKPT
COUNTER
B
BKPT
ADDRESS
BASE
REGISTER
A
BKPT
ADDRESS
MASK
REGISTER
A
CPU
SCAN
CHAIN
REGISTER
OnCE
CONTROL
REGISTER
THROUGH,
BYPASS
THROUGH
0
LSB
MSB
31
TDI
MUX
OCMR,
0x3
0x4
0x5 0x6 0x7
0x8 0x9 0xa
0xb
0xc
0xd
0xe 0x1f
RS[4:0] =
RS4RS0 FROM
ONCE CMD (I NS TR UCTION) RE G ISTER, OCMR
IN Figure 21-1 (TEST DATA IN)
(TE ST D ATA OUT)
DETAILED VIEW OF OnCE DATA REGISTERS BLOCK FOUND IN FIGURE 21-1
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Sig nal Descriptions
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 555
21.13 Signal Descriptions
The OnCE pin interface is used to transfer OnCE instructions and data
to the OnCE control block. Depending on the particular resource being
accessed, the CPU may need to be placed in debug mode. For
resources outside of the CPU block and contained in the OnCE block,
the processor is not disturbed and may continue execution. If a
processor resource is required, the OnCE controller may assert a debug
request (DBGRQ) to the CPU. This causes the CPU to finish the
instruction being executed, save the instruction pipeline information,
enter debug mode, and wait for further commands. Asserting DBGRQ
causes the device to exit stop, doze, or wait mode.
21.13.1 Debug Serial Input (TDI)
Data and commands are provided to the OnCE controller through the
TDI pin. Data is latched on the rising edge of the TCLK serial clock. Data
is shifted into the OnCE serial port least significant bit (LSB) first.
21.13.2 Debug Serial Clock (TCLK)
The TCLK pin supplies the serial clock to the OnCE control block. The
serial clock provides pulses required to shift data and commands into
and out of the OnCE serial port. (Data is clocked into the OnCE on the
rising edge and is clocked out of the OnCE serial port on the falling
edge.) The debug serial clock frequency must be no greater than
50 percent of the processor clock frequency.
21.13.3 Debug Serial Output (TDO)
Serial data is read from the OnCE block through the TDO pin. Data is
always sh ifted out the OnC E serial po rt LSB first. Data i s clocked out of
the OnCE serial port on the falling edge of TCLK. TDO is three-stateable
and is actively driven in the shift-IR and shift-DR controller states. TDO
changes on the falling edge of TCLK.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
556 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.13.4 Debug Mode Select (TMS)
The TMS input is used to cycle through states in the OnCE debug
controller. Toggling the TMS pin while clocking with TCLK controls the
transitions through the TAP state controller.
21.13.5 Test Reset (TRST )
The TRST input is used to reset the OnCE controller externally by
placing the OnCE control logic in a test logic reset state. OnCE operation
is disabled in the reset controller and reserved states.
21.13.6 Debug Event (DE)
The D E pin is a bidi rection al open dr ai n pin. A s an inpu t, D E provides a
fast mean s of entering debug mode from an external command
controller. As an output, this pin provides a fast means of acknowledging
debug mode entry to an external command controller.
The assertion of this pin by a command controller causes the CPU to
finish the current instruction being executed, save the instruction
pipeline information, enter debug mode, and wait for commands to be
entere d from the T DI line. If DE was used to ent er debug mode, then DE
must be negated after the OnCE responds with an acknowledgmen t and
before sending the first OnCE command.
The assertion of this pin by the CPU acknowledges that it has entered
debug mode and is waiting for commands to be entered from the TDI
line.
21.14 Functional Description
The on-chip emulation (OnCE) circuitry provides a simple, inexpensive
debugging interface that allows external access to the processor’s
internal registers and to memory/peripherals. OnCE capabilities are
controlled through a serial interface, mapped onto a JTAG test access
port (TAP) protocol. Figure 21-6 shows the components of the OnCE
circuitry.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 557
The inter face to the OnC E control ler and its reso urces are base d on the
TAP defined for JTAG in the IEEE 1149.1 standard.
21.14.1 Operation
An instruction is scanned into the OnCE module through the serial
interface and then decoded. Data may then be scanned in and used to
update a register or resource on a write to the resource, or data
associated with a resource may be scanned out for a read of the
resource.
Figure 21-6. OnCE Controller
CAPTURE DR
SHIFT DR
EXIT1 DR
PAUSE DR
EXIT2 DR
UPDATE DR
SEL ECT IR
SCAN
CAPTURE IR
SHIFT IR
EXIT1 IR
PAUSE IR
EXIT2 IR
UPDATE IR
SELECT DR-
SCAN
RUN-TEST/IDLE
TEST-LOGIC-RESET
1
0
1
11
1
1
1
1
1
1
1
1
1
1
1
1
00
0
0
00
0
0
00
0
0
0
0
0
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
558 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
For accesses to the CPU internal state, the OnCE controller requests the
CPU to enter debug mode via the CPU DBGRQ input. Once the CPU
enters debug mode, as indicated by the OnCE status register, the
processor state may be accessed through the CPU scan register.
The OnCE controll er is implem ente d as a 16-state fini te stat e machine,
with a one-to-one correspondence to the states defined for the JTAG
TAP controller.
CPU registers and the contents of memory locations are accessed by
scanning instructions and data into and out of the CPU scan chain.
Required data is accessed by executing the scanned instructions.
Memory locations may be read by scanning in a load instruction to the
CPU that references the desired memory location, executing the load
instruction, and then scanning out the result of the load. Other resources
are accessed in a similar manner.
Resources contained in the OnCE module that do not require the CPU
to be halted for access may be controlled while the CPU is executing and
do not interfere with normal processor execution. Accesses to certain
resources, such as the PC FIFO and the count registers, while not part
of the CPU , may requir e the CP U to be stopped to al low access to avoid
synchronization hazards. If it is known that the CPU clock is enabled and
running no slower than the TCLK input, there is sufficient
synchronization performed to allow reads b ut not writes of these specific
resources. Debug firmware may ensure that it is safe to access these
resources by readin g the OSR to determine the state of the CPU prior to
access. All other cases require the CPU to be in the debug state for
deterministic operation.
21.14.2 OnCE Controller and Serial Interface
Fi gu re 21-7 is a block diagram of the OnCE controller and serial
interface.
The OnCE comma nd regist er acts as the instruction re gister (I R) for the
TAP controller. All other OnCE resources are treated as data registers
(DR) by the TAP contro ller. The comm and registe r is loaded by seriall y
shifting in commands during the TAP controller shift-IR state, and is
loaded during the update-IR state. The command register selects a
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 559
OnCE resource to be accessed as a DR during the TAP controller
capture-DR, shift-DR and update-DR states.
Figure 21-7. OnCE Controller and Serial Interface
21.14.3 OnCE Interface Signals
The following paragraphs describe the OnCE interface signals to other
internal blocks associated with the OnCE contr o ller. These signals are
not available externally, and descriptions are provided to improve
understanding of OnCE operation.
21.14.3.1 Internal Debug Request Input (IDR)
The internal debug request input is a hardware signal which is used in
some implementations to force an immediate debug request to the CPU.
If present and enab le d, it functions i n an identical manner to the co ntro l
function provided by the DR control bit in the OCR. This input is
maskable by a control bit in the OCR.
OnCE CO MMAND REGISTE R
OnCE STATUS
AND CONTROL
REGISTERS
ISBKPT
ISTRACE
ISDR
OnCE
DECODER OnCE TAP
CONTROLLER
TDI
TCLK
TDO
TMS
REGISTER
READ CPU
CONTROL/
STATUS
REGISTER
WRITE
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
560 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.14.3.2 CPU Debug Request (DB GRQ)
The D BGR Q sig nal is a sserted by the OnCE contr ol logic to requ est the
CPU to enter the debug state. It may be asserted for a number of
different conditions. Assertion of this signal causes the CPU to finish the
current instruction being executed, save the instruction pipeline
information, enter debug mode, and wait for further commands.
Asserting DBGRQ causes the device to exit stop, doze, or wait mode.
21.14.3.3 CPU Debug A cknowledge (DBGACK)
The CPU asserts the DBGACK signal upon entering the debug state.
This signal is part of the handshake mechanism between the OnCE
control logic and the CPU.
21.14.3.4 CPU Breakpoint Request (BRKRQ)
The BRKRQ signal is asserted by the OnCE control logic to signal that
a breakpoint condition has occurred for the curr ent CPU bus access.
21.14.3.5 CPU Address, Attributes (ADDR, ATTR)
The CPU add ress and attri bute inform ation may be us ed in the memory
breakpoint logic to qualify memory breakpoints with access address and
cycle type information.
21.14.3.6 CPU Status (PSTAT)
The trace logic uses the PSTAT signals to qualify trace count
decrements with specific CPU activity.
21.14.3.7 OnCE Debug Output (DEBUG)
The DEBUG signal is used to indicate to on-chip re sources that a debug
session is in progress. Peripherals and othe r units may use this signal to
modify normal operation for the duration of a debug session. This may
involve the CPU executing a sequence of instructions solely for the
purpose of visibility/system control. These instructions are not part of the
normal instruction stream that the CPU would have executed had it not
been placed in debug mode.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 561
This signal is asser ted the f irst tim e the CP U enter s the deb ug state an d
remains asserted until the CPU is released by a write to the OnCE
comman d reg ist er with th e GO and EX bi ts set, a nd a re gister sp ecifi ed
as either no register selected or the CPUS CR. This signal remains
asserted even though the CPU may enter and exit the debug state for
each instruction executed under control of the OnCE controller.
21.14.4 OnCE Controller Register s
This section describes the OnCE controller registers:
OnCE command register (OCMR)
OnCE control register (OCR)
OnCE status register (OSR)
All OnCE registers are addressed by means of the RS field in the OCMR,
as shown in Table 21-4.
21.14.4.1 OnCE Command Register
The OnCE command register (OCMR) is an 8-bit shift register that
receives its serial data from the TDI pin. This register corresponds to the
JTAG IR and is loaded when the update-IR TAP controller state is
entered. It holds the 8-bit commands shifted in during the shift-IR
controller state to be used as input for the OnCE decoder. The OCMR
contains fields for controlling access to a OnCE resource, as well as
controlling single-step operation, and exit from OnCE mode.
Although the OCMR is updated during the update-IR TAP controller
state, the corresponding resource is accessed in the DR scan sequence
of the TAP controller, and as such, the update-DR state must be
transitioned through in order for an access to occur. In addition, the
update-DR state must also be transitioned through in order for the
single-step and/or exit functionality to be performed, even though the
command appears to have no data resource requirement associated
with it.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
562 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
R/W Read/Write Bit
1 = Read the data in the register specified by the RS field.
0 = Write the data associated with the command into the register
specified by the RS field.
GO Go Bit
When the GO bit is set, the device executes the instruction in the IR
register in the CPUSCR. To execute the instruction, the processor
leaves debug mode, executes the instruction, and if the EX bit is
cleared, returns to debug mode immediately after executing the
instruction. The processor resumes normal operation if the EX bit is
set. The GO command is executed only if the operation is a read/write
to eithe r the CPUSCR or to no re gister selected . Otherwise, the GO
bit has no effect. The processor leaves debug mode after the TAP
controller update-DR state is entered.
1 = Execute instruction in IR
0 = Inactive (no action taken)
EX Exit Bit
When the EX bit is set, the processor leaves debug mode and
resumes normal operation until another debug request is generated.
The exit command is executed only if the GO bit is set and the
operation is a read/write to the CPUSCR or a read/write to no register
selected. Otherwise, the EX bit has no effect. The processor exits
debug mode after the TAP controller update-DR state is entered.
1 = Leave debug mode
0 = Remain in debug mode
RS4RS0 Register Select Field
The RS field defines the source for the read operation or the
destination for the write operation. Table 21-4 shows OnCE register
addresses.
Bit 7654321Bit 0
R/W G EX RS4 RS3 RS2 RS1 RS0
Figure 21-8. OnCE Command Register (OCMR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 563
Table 21-4. OnCE Register Addressing
RS4RS0 R e gister Selected
00000 Reserved
00001 Reserved
00010 Reserved
00011 OTC OnCE trace counter
00100 MBCA mem ory breakpoint counter A
00101 MBCB mem ory breakpoint counter B
00110 PC FIFO program co unter FIFO and increme nt counter
00111 BABA break poin t address base register A
01000 BABB break poin t address base register B
01001 BAMA breakpoint address mask register A
01010 BAMB breakpoint address mask register B
01011 CP US CR CPU scan chain register
01100 Bypass no register selected
01101 OCR OnCE control register
01110 OSR OnC E status re gister
01111 Res erved (factory test control reg ister do not access)
10000 Res erved (MEM _B IST do not access)
10001–10110 Reserved (byp ass, do not access)
10111 Res erved (LSR L, do not access)
11000–11110 Reserved (byp ass, do not access)
11111 Bypass
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
564 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.14.4.2 OnCE Control Register
The 32-bit OnCE control register (OCR) selects the events that put the
device in debug mode and enables or disabl es sections of the OnCE
logic.
SQC1 and SQC0 Sequential Control Field
The S QC fie ld al lows memor y breakpoint B and tra ce occurrences to
be suspended until a qualifying even t occurs. Test logic reset clears
the SQC field. See Table 21-5.
Bit 31 30 29 28 27 26 25 Bit 24
Read: 0 0 000000
Write:
Reset:00000000
Bit 23 22 21 20 19 18 17 Bit 16
Read: 0 0 0000
SQC1 SQC0
Write:
Reset:00000000
Bit 15 14 13 12 11 10 9 Bit 8
Read: DR IDRE TME FRZC RCB BCB4 BCB3 BCB2
Write:
Reset:00000000
Bit 7654321Bit 0
Read: BCB1 BCB0 RCA BCA4 BCA3 BCA2 BCA1 BCA0
Write:
Reset:00000000
= Unim plemented or reser ved
Figure 21-9. OnCE Control Register (OCR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 565
DR Debug Request Bit
DR requests the CPU to enter debug mode unconditionally. The PM
bits in the OnCE status register indicate that the CPU is in debug
mode. Once the CPU enters debug mode, it returns there even with
a write to the OCMR with GO and EX set until the DR bit is cleared.
Test logic reset clears the DR bit.
IDRE Internal Debug Request Enable Bit
The internal debug request (IDR) input to the On CE control logic may
not be used in all implementations. In some implementations, the IDR
control input may be connected and used as an additional hardware
debug request. Test logic reset clears the IDRE bit.
1 = IDR input enabled
0 = IDR input disabled
T able 21-5. Sequent ial Contro l Field Settings
SQC1
and SQC0 Meaning
00 Disable sequential control operation. Memory breakpoints and trace
opera tion are unaffected by this field.
01
Suspend norm al trace counter operat ion until a breakpoint condition
occurs for memory breakpoint B. In this mode, memory breakpoint B
occurrences no longer cause breakpoint requests to be generated.
Instead, trace counter comparisons are suspended until the first
mem ory breakpoint B occurrence. After th e first mem ory breakpoint
B occurrence, trace counter control is released to perform normally,
assum ing TME is set. This allows a sequence of breakpoint
conditions to be specified prior to trace counting.
10
Qualify memory breakpoint B matches with a breakpoint occurrence
for memory breakpoint A. In this mode, memory breakpoint A
occurrences no longer cause breakpoint requests to be generated.
Instead, memory breakpoint B comparisons are suspended until the
first memory breakpoint A occurrence. After the first memory
breakpo int A occurrence, memory breakpoint B is enabled to
perform normally. This allows a sequence of breakpoint conditions
to be specified.
11
Combin e the 01 and 10 qualifications. In this mode, no breakpoint
requests are generated, and trace count operat ion is enabled once
a memo ry breakpoint B occurrence follows a memory breakpoint A
occurrence if TME is set.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
566 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
TME Trace Mode Enable Bit
TME enables trace operation. Test logic reset clears the TME bit.
Trace operation is also affected by the SQC field.
1 = Trace operation enabled
0 = Trace operation disabled
FRZC Freeze Control Bit
This control bit is used in conjunction with memory breakpoint B
registers to select between asserting a breakpoint condition when a
memory breakpoint B occurs or freezing the PC FIFO from further
updates when memory breakpoint B occurs while allowing the CPU to
continue execution. The PC FIFO remains frozen until the FRZO bit
in the OSR is cleared.
1 = Memory breakpoint B occurrence freezes PC FIFO and does
not assert breakpoint condition.
0 = M emory breakpoi nt B occurr ence asserts b reakpoint cond ition.
RCB and RCA Memory Breakpoint B and A Range Control Bits
RCB and RDA condition enabled memory breakpoint occurrences
happen when memory breakpoint matches are either within or outside
the range defined by memory base address and mask.
1 = Condition breakpoint on access outside of range
0 = Condition br eakpoint on access within range
BCB4BCB0 and BCA4BCA0 Memory Breakp oi nt B and A Contro l
Fields
The BCB and BCA field s enable mem ory breakpoi nts and qualify the
access attributes to select whether the breakpoint matches are
recognized for read, write, or instruction fetch (program space)
accesses. Test logic reset clears BCB4BCB0 and BCA4BCA0.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 567
Tabl e 21-6. Memory Breakpoint Contro l Fi el d Settings
BCB4BCB0
BCA4BCA0 Description
00000 B reakpoin t disable d
00001 Qualify match with any access
00010 Qu alify match with any instruction access
00011 Qualify match with any data access
00100 Qu alify match with any change of flow instruct ion acces s
00101 Qualify match with any data write
00110 Qualify match with any data read
00111 Reserved
01XXX Reserved
10000 Reserved
10001 Qualify match with any user access
10010 Qualify match with any user instruction access
10011 Qualify match with any user data access
10100 Qualify match with any user change of flow access
10101 Qualify match with any user data write
10110 Qualify match with any user data read
10111 Reserved
11000 Reserved
11001 Qualify match with any supervisor access
11010 Qualify match with any supervisor instruction access
11011 Qualify match with any supervisor data access
11100 Qualify match with any supervisor change of flow access
11101 Qualify match with any supervisor data write
11110 Qualify match with any supervisor data read
11111 Reserved
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
568 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.14.4.3 OnCE Status Register
The 16-bit OnCE status register (OSR) indicates the reason(s) that
debug mode was entered and the current operating mode of the CPU.
HDRO Hardware Debug Request Occurrence Flag
HDRO is set when the p roces sor en ters de bug m ode a s a resu lt of a
hardw are deb ug request fr om the IDR signal or the DE pin. T his bit is
clea red on test log ic reset o r when debug mode i s exited with th e GO
and EX bits set.
DRO Debug Request Occurrence Flag
DRO is set when the processor enters debug mode and the debug
request (D R) c ontro l bit in t he OnCE co ntrol registe r i s set . Th is bit is
clea red on test log ic reset o r when debug mode i s exited with th e GO
and EX bits set.
MBO Memory Breakpoint Occurrence Flag
MBO is set when a memory breakpoint request has been issued to
the CPU via the BRKRQ input and the CPU enters debug mode. In
some situations involving breakpoint requests on instructi on
prefetch es, the CPU may discard the r equest alon g with the prefetch .
In this case, this bit may become set due to the CPU entering debug
mode for another reason. This bit is cleared on test logic reset or
when debug mode is exited with the GO and EX bits set.
Bit 15 14 13 12 11 10 9 Bit 8
Read: 0 0 0000HDRODRO
Write:
Reset: 0 0
Bit 7654321Bit 0
Read: MBO SWO TO FRZO SQB SQA PM1 PM0
Write:
Reset:00000000
= Unim plemented or reser ved
Figure 21-10. On CE Status Register (OSR)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 569
SWO Software Debug Occurrence Flag
SWO bit is set when the processor enters debug mode of operation
as a result of the execution of the BKPT instruction. This bit is cleared
on test l ogic reset or whe n debug mode is exited w ith the GO and E X
bits set.
TO Trace Count Occurrence Flag
TO is set when the trace counter reaches zero with the trace mode
enabled and the CPU enters debug mode. This bit is cleared on test
logic reset or when deb ug mode is exited with the GO and EX bits set.
FRZO FIFO Freeze Occurrence Fl ag
FRZO is set when a FIFO freeze occurs. This bit is cleared on test
logic reset or when deb ug mode is exited with the GO and EX bits set.
SQB Sequential Breakpoint B Arm Occurrence Flag
SQB is set when sequential operation is enabled and a memory
breakpoint B event has occurred to enable tr ace counter operation.
This bit is cleared on test logic reset or when debug mode is exited
with the GO and EX bits set.
SQA Sequential Breakpoint A Arm Occurrence Flag
SQA is set when sequential operation is enabled and a memory
breakpoint A event has occurred to enable memory breakpoint B
operation. T his bi t is clear ed on test l og ic reset or w he n deb ug mo de
is exited with the GO and EX bits set.
PM1 and PM0 Processor Mode Field
These flags reflect the processor operating mode. They allow
coordina tion of the OnCE con troller wi th the CPU f or synchroniza tion.
Table 21-7. Processor Mode Field Settings
PM1
and PM0 Meaning
00 Proc esso r in normal mode
01 Proc esso r in stop, doze, or wait mode
10 Processor in debug mode
11 Reserved
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
570 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.14.5 OnCE Decoder (ODE C)
The ODEC receives as input the 8-bit command from the OCMR and
status signals from the processor. The ODEC generates all the strobes
required for read ing and writing the selected OnCE registers.
21.14.6 Memory Breakpoint Lo gic
Memory breakpoints can be set for a particular memory location or on
accesses within an address range. The breakpoint logic contains an
input latch for addresses, registers that store the base address and
address mask, comparators, attribute qualifiers, and a breakpoint
counter. Figure 21-11 illustrates the basic functionality of the OnCE
memory breakpoint logic. This logic is duplicated to provide two
independent breakpoint resources.
Figure 21-11. OnCE Memory Breakpoint Logic
ADDRESS COMPARATOR
DEC
ADDRESS MASK RE GI STE R X
BREAKPOINT COUNTER
MEMORY
BREAKPOINT
QUALIFICATION
MATCH
BC[4:0], RCx
BREAKPOINT
MATCH
OCCURRED
ISBKPTx
COUNT = 0
DSO DSI
DSCK
ADDR[31:0] ATTR
MEMORY ADDRESS LATCH
ADDRESS BAS E REG IS TER X
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 571
Address comparators can be used to determine where a program may
be getting lost or when data is be ing written to areas which should not
be written. They are also useful in halting a program at a specific point
to ex amine or change register s or mem ory. Using address com parators
to set breakpoints enables the user to set breakpoints in RAM or ROM
in any operating mode. Memory accesses are monitored according to
the contents of the OCR.
The address comparator generates a match signal when the address on
the bus matches the address stored in the breakpoint address base
register, as masked with individual bit masking capability provided by the
breakpoint address mask register. The address match signal and the
access attributes are further qualified with the RCx4RCx0 and
BCx4BCx0 control bits. This qualification is used to decrement the
breakpoint counter conditionally if its contents are non-zero. If the
contents are zero, the counter is not decremented and the breakpoint
event occurs (ISBKPTx asserted).
21.14.6.1 Memory Address Latch (MAL)
The MAL is a 32-bit register that latches the address bus on every
access.
21.14.6.2 Breakpoint Address Base Registers
The 32-bit br eakpoint address base registers (BABA and BABB) store
memory breakpoint base addresses. BABA and BABB can be read or
writ ten thro ugh the OnCE seria l inte rface . Befo re enab ling brea kpoi nts,
the external command controller should load these registers.
21.14.7 Breakpoint Address Mask Register s
The 32-bit breakpoint address mask registers (BAMA and BAMB)
registers store memory breakpoint base address masks. BAMA and
BA MB can be rea d or writte n through the OnCE serial interface . Bef ore
enabling breakpoints, the external command controller should load
these registers.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
572 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.14.7.1 Breakpoint Address Comparators
The breakpoint address comparators are not externally accessible. Each
compares the memory address stored in MAL with the contents of BABx,
as masked by BAMx, an d signal s the contro l lo gic when a m atch occurs.
21.14.7.2 Memory Breakpoint Counters
The 16-bit memory breakpoint counter registers (MBCA and MBCB) are
loaded with a value equal to the number of times, minus one, that a
memory access event should occur before a memory breakpoint is
declared. The memory access event is specified by the RCx4RCx0 and
BCx4BCx0 bits in the OCR and by the memory base and mask
registers. On each occurrence of the memory access event, the
breakpoint counter, if currently non-zero, is decremented. When the
counter has reached the value of zero and a new occurrence takes
place, the ISBKPTx signal is asserted and causes the CPUs BRKRQ
input to be asserted. The MBCx can be read or written through the OnCE
serial interface.
Anytime the breakpoint registers are changed, or a different breakpoint
event is selected in the OCR, the breakpoint counter must be written
af terward. Th is assures that the OnCE breakp oint logic is re set and that
no previous events will affect the new breakpoint event selected.
21.14.8 OnCE Trace Logic
The OnCE trace logic allows the user to execute instructions in single or
multiple steps before the device returns to debug mode and awaits
OnCE commands from the debug serial port. The OnCE trace logic is
independent of the MCORE trace facility, which is controlled through
the trace mode bits in the MCORE processor status register. The OnCE
trace logic block diagram is shown in Figure 21-12.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 573
21.14.8.1 OnCE Trace Counter
The OnCE trace counter register (OTC) is a 16-bit counter that allows
more than one instruction to be executed in real time before the device
returns to debug mo de. This feature helps th e software developer debug
sections of code that are time-critical. The trace counter also enables the
user to count the number of instructions executed in a code segment.
Figure 21-12. OnCE Trace Logic Block Diagram
The OTC register can be read, written, or cleared through the OnCE
serial interface. If N instructions are to be executed before entering
debug mod e, the trace counter sho uld be loaded with N 1. N must not
equal zero unless the sequential breakpoint control capability is being
used. In this case a value of zero (indicating a single instruction) is
allowed.
A hardware reset clears the OTC.
DEC
OnCE TRACE COUNTER
COUNT = 0
ISTRACE
DSO
DSI
DSCK
END
OF
INSTRUCTION
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
574 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.14.8.2 Trace Operation
To initiate trace mode operation:
1. Lo ad the OTC regi ster with a value. Th is value must be non-zero,
unless sequential breakpoint control operation is enabled in the
OCR register. In this case, a value of zero (indicating a single
instruction) is allowed.
2. Ini tialize the program counter and instruction register in the
CPUSCR with values corresponding to the start location of the
instruction(s) to be executed real-time.
3. Set the TME bit in the OCR.
4. Release the processor from debug mode by executing the
approp riate co mmand issued b y the external command contro ller.
When debug mode is exited, the counter is decremented after each
execution of an instruction. Interrupts can be serviced, and all
instructions executed (including interrupt services) will decrement the
trace counter.
When the trace counter decrements to zero, the OnCE control logic
requests that the processor re-enter debug mode, and the trace
occurrence bit TO in the OSR is set to indicate that debug mode has
been requested as a result of the trace count function. The trace counter
allows a minimum of two instructions to be specified for execution prior
to entering trace (specified by a count value of one), unless sequential
breakpo int control oper ation is e nabled in the O CR. In this case, a value
of zero (indicating a single instruction) is allowed.
21.14.9 Methods of Entering Debug Mode
The PM status field i n the OSR indicates that the CPU has entered
debug mode. The following paragraphs discuss conditions that invoke
debug mode.
21.14.9.1 Debug Request During RESET
When the DR bit in the OCR is set, assertion of RESET causes the
devi ce to en ter debu g m ode. In this ca se th e d evi ce m ay fetch the rese t
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 575
vector and the first instruction of the reset exception handler but does not
execute an instruction before entering debug mode.
21.14.9.2 Debug Request During Normal Activity
Setting the DR bit in the OCR during normal device activity causes the
device to finish the execution of the current instruction and then enter
debug mode. Note that in this case the device completes the execution
of the current instruction and stops after the newly fetched instruction
enters the CPU instructi on latch. T his process is the sam e for any newl y
fetched instruction, including instructions fetched by interrupt processing
or those that will be aborted by interrupt processing.
21.14.9.3 Debug Request During Stop, Doze, or Wait Mode
Setting the DR bit in the OCR when the device is in stop, doze, or wait
mode (for instance, after execution of a STOP, DOZE, or WAIT
instruction) causes the device to exit the low-power state and enter the
debug mo de. Note tha t in this case, the devi ce completes the executi on
of the STOP, DOZE, or WAIT instruction and halts after the next
instruction enters the instruction latch.
21.14.9.4 Software Request During Normal Activity
Executing the BKPT instruction when the FDB (force debug enable
mode) control bit in the control state register is set causes the CPU to
enter debug mode after the instruction following the BKPT instruction
has entered the instruction latch.
21.14.10 Enabling OnCE Trace Mode
When the OnC E trace mo de mechani sm is enable d and the tr ace count
is greater than zero, the trace counter is decremented for each
instruction executed. Completing execution of an instruction when the
trace counter is zero causes the CPU to enter debug mode.
NOTE: Only instructions actually executed cause the trace counter to
decrement. An aborted instruction does not decrement the trace counter
and does not invoke debug mode.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
576 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.14.11 Enabling OnCE Memory Breakpoints
When the OnCE memory breakpoint mechanism is enabled with a
breakpoint counter value of zero, the device enters debug mode after
completing the execution of the instruction that caused the memory
breakpoint to occur. In case of breakpoints on instruction fetches, the
breakpoint is acknowledged immediately after the execution of the
fetched instruction. In case of breakpoints on data memory addresses,
the brea kpoint is acknowledged after the completion of the memory
access instruction.
21.14.12 Pipeline Information and Write-Back Bus Register
A number of on-chip registers store the CPU pipeline status and are
confi gure d in the CPU scan chain register (CPUSCR ) for access by the
OnCE controller. The CPUSCR is used to restore the pipeline and
resume normal device activity upon return from debug mode. The
CPUSCR also provides a mechanism for the emulator software to
access pr ocessor an d m emo ry co ntents. F igure 21- 13 shows th e b lock
diagram of the pipeline information registers contained in the CPUSCR.
Figure 21-13. CPU Scan Chain Register (CPUSCR)
CTL
WBBR
31
0
0
PSR
31 0
PC
31 0
15
IR
015
TDO
TDI
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 577
21.14.12 .1 Program Counter Register
The p rogr am count er regi ste r (PC) i s a 32- bit latch that stores the val u e
in the CPU program counter when the device enters debug mode. The
CPU PC is affected by operations performed during debug mode and
must be restored by the external command controller when the CPU
returns to normal mode.
21.14.12.2 Instruction Register
The instruction register (IR) provides a mechanism for controlling the
debug session. The IR allows the debug control block to execute
selected instructions; the debug control module provides single-step
capability.
When scan-out begins, the IR contains the opcode of the next instruction
to be e x ecuted at th e time debu g mo de w as e nter ed. Thi s opco de m ust
be saved i n orde r to resu me nor mal execu ti on at the po int debug mode
was entered.
On scan-in, the IR can be filled with an opcode selected by debug control
software in preparation for exiting debug mode. Selecting appropriate
instructions allows a user to examine or change memory locations and
processor registers.
Once the debug session is complete and normal processing is to be
resumed, the IR can be loaded with the value originally scanned out.
21.14.12 .3 Control State Register
The control state register (CTL) is used to set control values when debug
mode is exited. On scan-in, this register is used to control specific
aspects of the CPU. Certain bits reflect internal processor status and
should be restored to their original values.
The CTL register is a 16-b it la tch that stores the val ue of certain inte rnal
CPU state variables before debug mode is entered. This register is
affected by the operations performed during the debug session and
should be restored by the external command controller when returning
to normal mode. In addition to saved interna l state variables, the bits are
used by emulation firmware to control the debug process.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
578 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
Rese rved bits represe nt the internal pr ocessor state. Restor e these bits
to their original value after a debug session is completed, for example,
when a OnCE command is issued with the GO and EX bits set and not
ignored. Set these bits to 1s while instructions are executed during a
debug session.
FFY Feed Forward Y Operand Bit
This control bit is used to force the content of the WBBR to be used
as the Y operand value of th e first instruction to be executed following
an update of the CPUSCR. This gives the debug firmware the
capability of updating processor registers by initializing the WBBR
with the desired value, setting the FFY bit, and executing a MOV
instruction to the desired register.
FDB Force Debug Enable Mode Bit
Setting this control bit p laces t he proce ssor in debug enable mode. In
debug enable mode, execution of the BKPT instruction as well as
recogniti on of the BRKRQ i nput causes t he processor to enter debug
mode, as if the DBGRQ input had been asserted.
SZ1 and SZ0 Prefetch Size Field
This control field is used to drive the CPU SIZ1 and SIZ0 outputs on
the first instruction pre-fetch caused by issuing a OnCE command
with the GO bit set and not ignored. It should be set to indicate a 16-bit
size, for example, 0b10. This field should be restored to its original
value after a debug session is completed, for example, when a OnCE
command is issued with the GO and EX bits set and not ignored.
Bit 15 14 13 12 11 10 9 Bit 8
Read: RSVD RSVD RSVD RSVD RSVD RSVD RSVD FFY
Write:
Reset: 0
Bit 7654321Bit 0
Read: FDB SZ1 SZ0 TC2 TC1 TC0 RSVD RSVD
Write:
Reset:000000
Figure 21-14. Control State Register (CTL)
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 579
TC Prefetch Transfer Code
This control field is used to drive the CPU TC2TC0 outputs on the
first instruction pre-fetch caused by issuing a OnCE command with
the GO bi t set and not ignored . It should typically be set to indi cate a
supervisor instruction access, for example, 0b110. This field should
be restored to its original value after a debug session is completed,
for example, when a OnCE command is issued with the GO and EX
bits set and not ignored.
21.14.12.4 Writeback Bus Register
The writeback bus register (WBBR) is a means of passing operand
information between the CPU and the external command controller.
Whenever the external command controller needs to read the contents
of a register or memory location, it forces the device to execute an
instruction that brings that information to WBBR.
For example, to read the content of processor register r0, a MOV r0,r0
instruction is exec uted, and the result value of the instruction i s latched
into th e WB BR. The contents of W BBR can then be delivered ser ial ly to
the external command controller.
To update a processor resource, this register is initialized with a data
value to be written, and a MOV instruction is executed which uses this
valu e as a write -back data val ue. The FF Y bi t in the CT L r egister for ces
the value of the WBBR to be substituted for the normal source value of
a MOV instruction, thus allowing updates to processor registers to be
performed.
21.14.12.5 Processor Status Register
The processor status register (PSR) is a 32-bit latch used to read or write
the MCORE processor status register. Whenever the external
command controller needs to save or modify the conten ts of the
M•CORE processor status register, the PSR is used. This register is
affected by the operations performed in debug mode and must be
restored by the external command controller when returning to normal
mode.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
580 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.14.13 Instruction Address FIFO Buffer (PC FIFO)
To ease debugging activity and keep track of program flow, a
first-in-first-out (FIFO) buffer stores the addresses of the last eight
instruction change-of-flow prefetches that were issued.
The FIFO is a circular buffer containing eight 32-bit registers and one
3-bit counter. All the registers have the same address, but any read
access to the FIFO address causes the counter to increment and point
to the ne xt FIFO register. The registers are serially available to the
external command controller through the common FIFO address.
Fi gu re 21-1 5 shows the structure of the PC FIFO.
Figure 21-15. OnCE PC FIFO
PC FIFO REGISTER 0
TDO
TCLK
INSTRUCTION FETCH ADDRES S
CIRCULAR
BUFFER
POINTER
PC FIFO REGISTER 1
PC FIFO REGISTER 2
PC FIFO REGISTER 3
PC FIFO REGISTER 4
PC FIFO REGISTER 5
PC FIFO REGISTER 6
PC FIFO REGISTER 7
PC FIFO SHIFT REGISTER
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 581
The FIFO is not affected by operations performed in debug mode,
except for incrementing the FIFO pointer when the FIFO is read. When
debug mode is entered, the FIFO counter points to the FIFO register
containing the address of the oldest of the eight change-of-flow
pre-fetches. The first FIFO read obtains the oldest address, and the
following FIFO reads return the other addresses from the oldest to the
newest, in order of execution.
To ensure FIFO coherence, a complete set of eight read s of the FIFO
must be performed. Each read increments the FIFO pointer, causing it
to point to the next location. After eight reads, the pointer points to the
same location as before the start of the read procedure.
21.14.14 Reserved Test Control Registers
The reserved test control registers (MEM_BIST, FT CR, and LSRL) are
reserved for factory testing.
CAUTION: To prevent damage to the device or system, do not access these
registers during normal operation.
21.14.15 Serial Pr otocol
The serial protocol permits an efficient means of communication
between the OnCE external command controller and the MCU. Before
starting an y debugging activity, the external command controller must
wait for an acknowledgment that the device has entered debug mode.
The external command controller communicates with the device by
sending 8-bit commands to the OnCE command register and 16 to 128
bits of data to one of the other OnCE registers. Both commands and data
are sent or received LSB first. After sending a command, the external
command controller must wait for the processor to acknowledge
execution of certain commands before it can properly access another
OnCE register.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
582 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
21.14.16 OnCE Commands
The OnC E commands can be classified as:
Read commands (the device delivers the required data)
Write comma nds (the device recei ve s data and writes the data in
one of the OnCE registers)
Commands with no associated data transfers
21.14.17 Target Site Debug System Requirements
A typical debug environment consists of a target system in which the
MCU resides in the user-defined hardware.
The external command controller acts as the medium between the MCU
target system and a host computer. The external comm and controller
circuit acts as a serial debug port driver and host computer command
interpreter. The controller issues commands based on the host
computer inputs from a user interface program which communicates
with the user.
21.14.18 Interface Connector for JTAG/OnCE Serial Port
Fi gu re 21-1 6 shows the recommended connector pinout and interface
requirements for debug controllers that access the JTAG/OnCE port.
The connector has two rows of seven pins with 0.1-inch center-to-center
spacing between pins in each row and each column.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
JTAG Test Acce ss Port and OnCE
Functional Description
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA JTAG Test Access Port and OnCE 583
Figure 21-16. Recommended Connector Interface to JTAG/OnCE Port
TDI
TDO
TCLK
GPIO/SI
TARGET_RESET
KEY (N o Conn ect )
GND
12
34
56
78
910
10 k
10 k
TOP VIEW
11 12
13 14
TARGE T VDD
GPIO/SO
DE
(0.1 INCH CENTE R-TO- CENTER)
10 k
10 k
TARGET VDD
TARGE T VDD
TRST 10 k
TMS 10 k
Note: GPIO/SI and GPIO/SO are not required for OnCE operation at this time.
These pins can be used for high- speed downloads with a recomm ended interf ace.
10 k
WIRED OR WITH TA RG ET RESE T
CIRCUIT. THIS SIGNAL MUST BE
ABLE TO ASSERT/MON ITOR SYST EM
RESET.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
584 JTAG Test Access Port and OnCE MO TOR OLA
JTAG Test Access Port and OnCE
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Electrical Specificatio ns 585
Technical Data MMC2107
Section 22. Electrical Specifications
22.1 Contents
22.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .585
22.3 Absolute Maximum Ratings . . . . . . . . . . . . . . . . . . . . . . . . . .586
22.4 Thermal Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . .587
22.5 Power Dissipation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .587
22.6 Electrostatic Discharge (ESD) Protection. . . . . . . . . . . . . . . .587
22.7 DC Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . .588
22.8 PLL Electrical Specifications. . . . . . . . . . . . . . . . . . . . . . . . . .590
22.9 QADC Electrical Characteristics. . . . . . . . . . . . . . . . . . . . . . .591
22.10 FLASH Memory Characteristics . . . . . . . . . . . . . . . . . . . . . . .594
22.11 External Interface T iming Characteristics. . . . . . . . . . . . . . . .596
22.12 Reset and Configuration Override Timing . . . . . . . . . . . . . . .601
22.13 SPI Timi ng Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . .602
22.14 OnCE, JTAG, and Boundary Scan Timing . . . . . . . . . . . . . . .605
22.2 Introduction
This section contains electrical and timing specifications.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
586 Electrical Sp ecifications MOTOR OLA
Electrical Specifications
22.3 Absolute Maximum Ratings
Maximum ratings are the extreme limits to which the MCU can be
exposed without permanently damaging it. See Table 22-1.
The MCU contains circuitry to protect the inputs against damage from
high static voltages; however, do not apply voltages higher than those
shown in the table. Keep VIn and VOut within the range
VSS (VIn or VOut) VDD. Connect unused inputs to the appropriate
voltage level, either VSS or VDD. This device is not guaranteed to operate
properly at the maximum ratings. Refer to 22.7 DC Electrical
Specifications for guaranteed operating conditions.
Table 22-1. Absolute Maximum Ratings
Parameter Symbol Value Unit
Supply voltage VDD 0.3 to +4.0 V
Clock synthesizer supply voltage VDDSYN 0.3 to +4.0 V
RAM m em ory standby supply voltage VSTBY 0. 3 to + 4.0 V
FLA SH memory supply voltage VDDF 0.3 to +4.0 V
FLASH memory program/erase supply voltage VPP 0.3 to + 6.0 V
Anal og supply voltag e VDDA 0.3 to +6.0 V
Anal og reference suppl y voltage VRH 0.3 to +6.0 V
Anal og ESD protection voltage VDDH 0.3 to +6.0 V
Digital input voltage(1)
1. I nput m ust be cur rent li mited t o t he val ue sp ecified. To determi ne the val ue of t he requi red
current-lim iting resistor, calculate resistance values for positive and negative clamp
voltages, then use the larger of the two val ues.
VIN 0.3 to + 4.0 V
Anal og input voltage VAIN 0. 3 to + 6.0 V
Instantan eous m ax imum curren t single pin li mit
(applies to all pins)(2), (3)
2. All functiona l non- supply pins are in ternally cla mp ed to VSS and VDD.
3. Power supply must maintain regulation within operat ing VDD range during instantaneous
and oper ating maximum current conditions. If positive injection current (Vin > VDD) is
greater than I DD, the injection current may flow out of VDD and coul d result in exter nal
power supply goi ng out of re gulation. Ensure exte rnal V DD load wi ll shunt current greater
than maximum inject ion curr ent. This will be the greatest ri sk when the MCU is not
consum ing power (ex; no clock).
ID25 mA
Operat ing temperature range (pack aged) TA
(TL to TH)40 to 85 °C
Storage temperat ure range TSTG 65 to 150 °C
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ele ctrical Specifications
Thermal Characteristics
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Electrical Specificatio ns 587
22.4 Therm al Cha ract er ist ics
22.5 Power Dissipation
22.6 Electrostatic Discharge (ESD) Protection
Table 22-2. Thermal Characteristics
Parameter Symbol Value Unit
Therm al Resistance
Plastic 100-pin LQFP surface mount
Plastic 144-pin LQFP surface mount θJA 43.5
46.1 °C/W
The average chip-junction temperature (TJ) in °C can be obtained from:
TJ = TA + PD x θJA (1)
where:
TA= Ambient temperature, °C
θJA = Package thermal resistance, junction-to-ambient, °C/W
PD= PINT + PI/O
PINT = IDD × VDD, watts chip in ternal power
PI/O = Power dissipation on input and output pins user determined
For most applications, PI/O < PINT and can be neglected. An approximate relationship between
PD and TJ (if PI/O is neglected) is:
PD = K ÷ (TJ + 273°C) (2)
Solving equations 1 and 2 for K gives:
K = PD × (TA + 273°C) + θJA × PD 2 (3)
whe re K i s a con stant p erta in ing to t he pa rti cular part . K can be deter mi ned from equa tion ( 3)
by measuri ng PD (at equilibrium) for a known TA. Using this value of K, the values of PD and
TJ can be obtained by solving equations (1) and (2) iterativel y for any value of TA.
Table 22-3. ESD Protection Characteristics
Parameter(1)
1. All ESD testing is in conformity with CDF-AEC-Q100 Stress Test Q ualifi cati on for
Automotive Grade Integrated Circu it s.
Symbol Value Units
ESD target for human body mode l HB M 20 00 V
ESD t arget for machine model MM 200 V
HBM c ircui t description RSeries 1500 W
C 100 pF
MM circuit description RSeries 0W
C 200 pF
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
588 Electrical Sp ecifications MOTOR OLA
Electrical Specifications
22.7 DC Electrical Specifications
Table 22-4. D C Electr ical Specifi catio ns
(VSS = VSSYN = VSSF = VSSA = 0 V, TA = TL to TH)
Parameter Symbol Min Max Unit
Input high voltage VIH 0.7 x VDD VDD +0.3 V
Input l ow voltage VIL VSS 0.3 0. 35 x VDD V
Input hysteresis VHYS 0.06 x VDD V
Input leakage current, V in = VDD or VSS, input-only pins IIn 1.0 1.0 µA
High impedanc e (off-state) leakage current
Vin = VDD or VSS, all input/output and output pins IOZ 1.0 1.0 µA
Outp ut high voltage
IOH = 2.0 mA, all i nput /ou tput and all output pins VOH VDD 0.5 V
Outp ut low voltage
IOL = 2 .0 mA, all input/output and all output pins VOL 0.5 V
Weak internal pullup device current, tested at VIL maxi mu m IAPU 10 130 µA
Input capacitance
All input-only pins
All input/output (three-state) pins CIn
7
7pF
Load Capacitance
50% partial drive
100% f ull drive CL
25
50 pF
Supp ly voltage, include s core modules and pads VDD 2.7 3.6 V
Clock sy nthesizer supply voltage VDDSYN 2.7 3.6 V
RAM m em ory standby supply voltage
Normal operation: VDD > VSTBY 0.3 V
Standby mode : VDD < VSTBY 0.3 V
VSTBY 0.0
2.7 3.6
3.6 V
FLASH memory su pply voltage(1)
Read
Program or erase VDDF 2.7
3.135 3.6
3.465 V
FLASH m em ory program/erase sup ply voltage
Read
Program or erase VPP VDDF0.35
4.75 5.25
5.25 V
Operating supply current(2), (4)
Master mode
Sing le-chip mode
Wait mode
Doze mode
Stop mod e
IDD
200
175
75
75
100
mA
mA
mA
mA
µA
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ele ctrical Specifications
DC Electrical Specifications
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Electrical Specificatio ns 589
Clock synthesizer supply current(3)
Normal operation 8-MHz crystal, VCO on, Max fsys
Stop (OSC and PLL enabled)
Stop (OSC enable, PLL disabled)
Stop (OSC and PLL disabled)
IDDSYN
4
2
1
10
mA
mA
mA
µA
RAM memory standby supply current(4)
Normal opera tion: VDD > VSTBY 0.3 V
Transient condition: VSTBY 0. 3 V > VDD > VSS + 0.5 V
Standby operation: VDD < VSS + 0.5 V
ISTBY
10
7
20
µA
mA
µA
FLASH memory su pply current(4)
Read
Program or erase
Disabled
Stop
IDDF
50
50
20
10
mA
mA
mA
µA
Flash memory program / erase supply current(4)
Read
Program or erase
Disabled and stop
IPP
100
100
10
µA
mA
µA
Anal og supply current(4)
Normal opera tion
Low-power stop IDDA
15.0
10.0 mA
µA
DC injection current(4), (5), (6)
VNEGCLAMP = VSS 0.3 V, VPOSCLAMP = VDD + 0.3
Sin gle p in limit
Total MCU limit, includes sum of all stre ssed pin s
IIC 1.0
10 1.0
10 mA
1. A voltage o f at least VDDF0.35 V m ust be applied at all times to t he VPP pin or damage to the F LASH m odule can occur
The FLASH can be damaged by power on and power off VPP transients. VPP must not rise to program ming level while
VDDF is below the specifi ed m inimum value, and mus t not fall below the minim um specified value whil e VDDF is applied.
2. Current mea sured at maxi m um system clock fr equency, all modules active, and def ault drive strength with m atching load.
3. Total device curr ent consumption = IDD + IDDSYN + ISTBY + IDDF + I PP + IDDA
4. All functiona l non- supply pins are in ternally cla mp ed to VSS and their respective VDD.
5. Input must be current li m it ed to the value spec if ied. To determine the value of the required current-limiting resi stor,
calculate resistance values for posi ti ve and negative cl am p voltages, then use the larger of the two values.
6. Power suppl y must maintain regulation wit hin operat ing VDD range dur ing insta ntaneous and operating maxi mum current
conditions. If positi ve injection current (Vin > VDD) is greate r than IDD, the injection current may flow out of VDD a nd could
resul t in ext ernal power suppl y going out of regul ation. Ensure ext ernal VDD load will shunt cur rent gr eater th an maximu m
inj ecti on curren t. Thi s will be th e greates t ris k when the MCU is not consum ing power . Exampl es are: i f no syst em cl ock is
prese nt, or i f clock r ate is very lo w which would red uce ove rall power con sumpt ion. Al so, at power-up, sys tem clock i s not
present during the power-up sequence until the PLL has attained lock.
Table 22-4. DC Electrical Specifications (Continued)
(VSS = VSSYN = VSSF = VSSA = 0 V, TA = TL to TH)
Parameter Symbol Min Max Unit
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
590 Electrical Sp ecifications MOTOR OLA
Electrical Specifications
22.8 PLL Electrical Specifications
Table 22-5. PLL Electrical Specifications
(VDD and VDDSYN = 2.7 to 3.6 V, VSS = VSSSYN = 0 V, TA = TL to TH)
Parameter Symbol Min Max Unit
PLL referenc e frequency range
Crystal refe ren ce
E xtern al refere nce
1:1 mode
fref 2
2
10
10.0
33.0
33.0
MHz
System frequenc y(1)
E xtern al refere nce
On-c hip PLL fr equen cy fsys 0
fref/64 33.0
33.0 MHz
Loss of reference frequ ency (2) fLOR 100 250 kHz
Self-clocked mod e frequen cy(3) fSCM 0.5 15 MHz
EXTA L input high voltage
Crystal mode
All other modes (1:1, bypass, external) VIHEXT VDDSYN1.0
2.0 VDDSYN
VDDSYN
V
EXTAL input low voltage
Crystal mode
All other modes (1:1, bypass, external) VILEXT VSSSYN
VSSSYN
1.0
0.8 V
PLL lock time(4 ), ( 5) tLPLL 200 µs
Powerup-to-lock Tim e(4), (5)
W ithout c rystal reference tLPLK 200 µs
1:1 clock skew (between CLKOUT and EX TAL)(6) tSkew 22ns
Duty cycle of reference (4) tdc 40 60 % fsys
Frequenc y un-LOCK range fUL 1.5 1.5 % fsys
Frequenc y LOCK range fLCK 0.75 0.75 % fsys
CLKO UT period jitter(7)
Measured at fsys maximum
Peak-to-peak jitter (cl oc k edge to clock edge)
Long-term jitter (averaged over 2-ms interval)
CJitter
5
0.01 % fsys
1. All internal regi sters retain data at 0 Hz.
2. Loss of reference frequency is the reference frequency detected internally, which transitions the PLL into self-clocked
mode.
3. Self-c locked mode freque ncy i s the frequ ency that the PLL operate s a t when the refere nce freque ncy fa lls below fLOR with
default MFD/RFD settings.
4. This specification applies to the p eri od required for the PLL to relock after changing the MFD frequ ency co ntr ol bit s in t he
synthesizer control register (SYNCR).
5. Assuming a re ference is avai labl e at p ower-up, lo ck t ime is meas ured fr om the ti me VDD a nd VDDSYN are valid to RSTOUT
negating. If the cry stal osci ll ator is being used as the refe rence for the PLL, t hen the crystal startup time m ust be added to
the PLL lock time to deter mine the total star tup time.
6. PLL is operating in 1:1 PLL mode.
7. Jitter is the average deviation from the programmed frequency measured over the specified interval at maximum fsys.
Meas urements are made with the device powered by filte red supplies and clocked by a stabl e external clock s ignal. No ise
inj e cted into the PLL cir cuitry via VDDSYN and VSSSYN and vari ation in crystal oscill a tor frequency increase t he CJitter
percentage for a given interval.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ele ctrical Specifications
QADC Electrical Charac teristics
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Electrical Specificatio ns 591
22.9 QADC Electrical Characteristics
The QADC electrical characteristics are shown in Table 22-6,
Table 22-7, and Table 22-8.
Table 22-6. QADC Absolute Maximum Ratings
Parameter Symbol Min Max Unit
Analog supply, with reference to VSSA VDDA 0.3 6.0 V
Internal digital supply with reference to VSS VDD 0.3 4.0 V
Maximum analog reference voltage with respect
to V RL VRH 0.3 6.0 V
VSS differential voltage VSS VSSA 0.1 0.1 V
VDD differential vol tage(1) VDD VDDA 6.0 4.0 V
VREF differential volta ge V RH VRL 0.3 6.0 V
VRH to VDDA differential voltage(2) VRH VDDA 6.0 6.0 V
VRL to V SSA differential voltage VRL VSSA 0.3 0.3 V
VDDH to V DDA differential voltage VDDH VDDA 1.0 1.0 V
Maximum input current(2), (3), (4) IMA 25 25 mA
1. Refers to all owed random sequencing of power suppli es
2. Transitions wi thi n the limit do not affe ct device reliability or cause permanent damage. Exceeding limit may cause
perm anent convers ion e rr or on stressed channels and on unstressed channels.
3. Input must be current li m it ed to the value spec if ied. To determine the value of the required current-limiting resi stor,
calculate resistance values using VPOSCLAMP = VDDA + 0.3 V and VNEGCLAMP = 0.3 V, then use the lar ger of the
calculated val ues.
4. Condition appli es to one pin at a time.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
592 Electrical Sp ecifications MOTOR OLA
Electrical Specifications
Table 22-7. QADC Electrical Specifications
(VDDH = VDDA = 5.0 V ± 0.5 V, VDD = 2.7 to 3.6 V, V SS an d VSSA = 0 Vdc,
fQCLK = 2.0 MHz, TA = TL to T H)
Parameter(1) Symbol Min Max Unit
Analog supply VDDA 4.5 5.5 V
VSS differential voltage VSS VSSA 100 100 mV
Reference voltage low(2) VRL VSSA VSSA + 0.1 V
Reference voltage high(3) VRH VDDA 0.1 VDDA V
VREF differential voltage VRH VRL 4.5 5.5 V
Input v oltage VINDC VSSA 0.3 VDDA + 0.3 V
Input high voltage, PQA and PQB VIH 0.7 x VDDH VDDH + 0 . 3 V
Input low voltage, PQA and PQB VIL VSSA 0.3 0. 35 x VDDH V
Input hysteresis, PQA and PQB(3) VHYS 0.6 x VDDH V
Outp ut low voltage, PQA(4)
IOL = 5.3 mA
IOL = 10.0 µAVOL
0.4
0.2 V
Outp ut high voltage, PQA (5)
IOH = 2.0 mA
IOH = 10.0 µAVOH VDD0.4
VDD0.2
V
Anal og supply current
Normal opera tion (5)
Low-power stop IDDA
15.0
10.0 mA
µA
Reference supply current, DC
Reference s upply current, transient IRef
250
2.0 µA
mA
Load capacitance, PQA CL50 pF
Input current , channel off (6)
PQA,
PQB IOff 200
150 200
150 nA
Total input capacitance
PQA not sampling
PQB not sampling
Increm enta l capacitance added during sam pling
CIn
15
10
5
pF
1. QADC convert er speci ficat ions are only guar anteed fo r VDDH and VDDA = 5.0 V ± 0.5 V. VDDH and VDDA may be powere d
down to 2.7 V with only GPIO functions supported.
2. To obtain full- scale, full -range resul ts, VSSA VRL VINDC VRH VDDA
3. Parameter applies to the follow ing pins: Port A: PQA[7:0]/AN[59: 58]/ETRIG[2:1]
Port B: PQB[7:0]/AN[3:0]/AN[51:48]/AN[ Z:W]
4. Full driver (push-pull)
5. Curr ent meas ured a t maximum system clock frequency with QADC active
6. Maxi mum leakag e occurs at maximum oper ating t emper ature. Curr ent decre ases by approximat ely one- half f or each 8 °C
to 12°C, in the ambient temperature range of 40°C to +8 5 °C.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ele ctrical Specifications
QADC Electrical Charac teristics
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Electrical Specificatio ns 593
Table 22-8. QADC Conversion Specifications
(VDDH and VDDA = 5.0 Vdc ± 0.5 V, VDD = 2.7 to 3.6 V, VSS = VSSA = 0 Vdc,
VRH VRL = 5 V ± 0.5 V, TA = TL to TH)
No. Parameter Symbol Min Max Unit
1QADC clock (QCLK) frequency(1) fQCLK 0.5 2.1 MHz
2 Conversion cycles CC 14 28 QCLK
cycles
3Conv ersion time, fQCLK = 2.0 MHz
Mi nimum = C C W / IS T =%00
Maximum = CCW/IST =%11 tCONV 7.0 14.0 µs
4 Stop mode recovery time tSR 10 µs
5Resolution(2) 5 mV
6Absolute (total unadjusted) error(3), (4), (5)
fQCLK = 2.0 MHz(2), two clock input samp le time AE 22Counts
7Di sru ptiv e in put injec tion curre nt (6), (7), (8) IINJ(9) 11mA
8Current coupling ratio(10)
PQA
PQB K
8x10 –5
8x10 –5 m
9
Increm enta l error due to injection current
All channels have same 10 k < RS <100 k
Channel unde r test has RS = 10 k,
IINJ = I INJMAX, I INJMIN
EINJ
+1.0
+1.0
+1.0
Counts
Counts
Counts
10 Source impedance at input(11) RS100 k
11 Incremental capacitance during sampling(12) CSAMP 5pF
1. Conversion characteristics vary wi th fQCLK rate. Re duced conversion accuracy occurs a t max fQCLK rate. Using the QADC
pins as GPIO functions during conversions may result in degraded results.
2. At VRH VRL = 5.12 V, one count = 5 mV
3. Accuracy teste d and guaranteed at VRH VRL = 5.0 V ± 0.5 V
4. Absolute error incl udes 1/ 2 c ount (~ 2.5 m V) of inheren t quanti zation error and ci rcui t (di ffer entia l, i ntegr al, an d offs et) error.
Specificati on assum es that adequate low-pass fi ltering is present on analog input pins capacitive filter with 0.01 µF to
0.1 µF capaci tor between analog input and anal og ground, typical source isolation impedance o f 10 k.
5. Input signals with large sle w rates or hi gh frequency noise com ponents cannot be conve rted accu rately. These signals may
affect the conver sion accuracy of ot her channels
6. Below di sruptive current conditi ons, the channel being stres sed has conversion values of $3FF for anal og inputs greater
than VRH an d $000 for values less than VRL. This assumes that VRH < VDDA and VRL > VSSA due to the pre sence of the
samp le amplifier. Other channels are not aff ected by non-di sruptiv e conditions.
7. Exceeding l imit may cau se conve rsion error on stress ed chann els and on unst res sed channel s. Trans itio ns withi n the limit
do not aff ect device reliability or cause permanent damage.
8. I nput m ust be c urrent limi ted to the value sp ecifi ed. To dete rmine t he va lue of the req uired c urrent -li mitin g resi stor, calculate
resi stance valu es using VPOSCLAMP = VDDA + 0.5 V and VNEGCLAMP = 0.3 V, the n use the lar ger of t he calcul ated val ues.
9. Condition appli es to two adjacent pins.
10. Curr ent coupli ng rati o, K, is def ined as the ratio of the output current, IOut, measured on the pin under test to the injection
current, IINJ, when both adjacent pins are ov erstressed with the specified injection current. K = IOut/ IINJ The input volt age
error on the channel under test is calculated as VERR = IINJ x K x RS. Continu ed
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
594 Electrical Sp ecifications MOTOR OLA
Electrical Specifications
22.10 FLASH Memory Characteristics
The FLASH memory characteristics are shown in Table 22-9,
Table 22-10, F igu re 22-2 , and Figure 22-1.
1. Maximum pulses vary with VPP.
11. Maximum source impedance is applicat ion-dependent. Error resulting from pin leakage depends on junction leakage into
the pi n and on leakage due to charge-sharin g with internal capaci tance. Error from junction leakage is a functio n of exter nal
source impedance and input leak age current. In th e following expression, expected error in result value due to jun ction
leakage is expressed in voltag e (VERRJ):
VERRJ = RS x IOff
where:
IOff is a funct ion of operating temperature.
Charge-shari ng leakage is a functi on of input source imp edance, conversion rate, ch ange in volt age be tween su ccessive
conver sions, and t he size of the filteri ng capacit or used. Error lev els are best det ermined empir ically. In general , cont inuous
conversion of the same channel may not be compatible with high-source i mp edance.
12. For a maximum sampling error of the i nput voltage 1 LSB, t hen the exte rnal filte r capacitor, Cf 10 24 x C SAMP. The value
of CSAMP in the new design may be reduced.
Table 22-9. FLASH Program and Erase Characteristics
(VDDF = 3.135 to 3.465 V, VPP = 4.75 to 5.25 V, TA = TL to T H)
Parameter Symbol Min Typ Max Unit
Number of erase pulses EPulse 8820
Eras e pul se ti m e tErase See Table 9-11. Requ ired Erase Algorithm
on page 219.
Eras e rec overy time tE_Off 4.0 4.8 6.0 µs
Number of program pulses PPulse 500 Note 1
Program pulse time tPROG See Tab le 9-9. R equired Progr amm ing
Algorithm on page 213.
Program recovery time tP_Off 4.0 4.8 6.0 µs
Table 22-10. FLASH EEPROM Module Life Characteristics
(VDDF = 2.7 to 3.6 V, VPP = 4.75 to 5.25 V, TA = TL to TH)
Parameter Symbol Value Unit
Maximum num ber of guaranteed program/ erase cycles(1) P/E 100(2) Cycles
Data retention at average operating temperature of 85°C Retention 10 Years
1. A progr am /eras e cycle is defined as swi tching the bits fr om 1 0 1.
2. Reprogramming of a FLASH array block prior to erase is not requi red.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ele ctrical Specifications
FLASH Memory Characteristics
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Electrical Specificatio ns 595
Figure 22-1. V PP versus Programming Time
Figure 22-2. VPP versus Programming Pulses
700
600
500
400
300
200
100
04.75 4.85 4.95 5.05 5.15 5.25 5.35
VPP (V)
TIME (SE CO NDS)
Notes:
1. Data taken with VDD = 3.6 V at 25°C
2. One page at a time progra mming of full 128-K array
3. Total number of pulses increases with lower VPP. See Figure 22-2.
MINIMUM PULSE S
MAXIMU M PUL SES
AVERA GE PULSES/PAGE
7000
6000
5000
4000
3000
2000
1000
0
PULSES
4.75 4.95 5.15 5.35
VPP
Note:
This is an example of a fairly
wo rs t-c ase pa rt. N umbe r of
pulses required varies
from part to part even at the
sam e VPP.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
596 Electrical Sp ecifications MOTOR OLA
Electrical Specifications
22.11 External Interface Timing Characteristics
Table 22-11. External Interface Timing Characteristics
(VDD = 2.7 V to 3.6 V, VSS = 0 V, TA = TL to T H)
No. Characteristic(1), (2) Symbol Min Max Unit
1 CLK OUT period tcyc 30 ns
2 CLK OUT low pulse width tCLW 0. 5 tcyc 1 ns
3 CLKOUT high pulse width tCHW 0.5 tcyc 1 ns
4 All rise times tCR 3ns
5 All fall times tCF 3ns
6CLKOUT high to A[22:0], TSIZ[1:0] valid(3) tCHAV 10 ns
7 CLK OUT hig h to A[22:0], TSIZ[1:0] invalid tCHAI 0 ns
8CLKOUT high to CS[3:0] a sse rted tCHCA 10 ns
9 CLKOUT high to CS[3:0] negated tCHCN 0 ns
10 CLK OUT high to CSE[1:0] valid tCHCEV 10 ns
11 CLK OUT high to CSE[1:0] invali d tCHCEI 0 ns
12 CLKOUT hi gh to TC[2:0], PST AT[ 3 :0 ] va lid tCHTV 15 ns
13 CLKOUT high to TC[2 :0], PSTAT[ 3 :0 ] invalid tCHTI 0 ns
14 CLKOUT high to R/W high hold time tCHRWH 010ns
15 CLKOUT high to R/W valid write tCHRWV 0.25 tcyc 0.25 tcyc + 9 ns
16 CLKOUT high to OE, E B asserted(4), (5) tCHOEA 0.25 tcyc 0.25 tcyc + 9 ns
17 CLKOUT high to OE, EB read negated tCHOEN 09ns
17A CLKOUT low to EB write negated tCLEN 0.25 tcyc 0.25 tcyc + 10 ns
18 CLKOUT low to SHS low tCLSL 010ns
19 CLKOUT High to SHS high(6) tCHSH 08ns
20 CLK OUT low to d ata-out low impedance write/show tCHDOD 0 ns
21 CLKOUT high to data-out high impedance
write/show(7) tCHDOZ 210ns
22 CLKOUT low to d ata-out valid write tCLDOVW 12 ns
22A CLKOUT low to data-out valid show tCLDOVS 12 ns
23 CLKOUT high to data-out invalid write /show tCHDOIW 10 ns
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ele ctrical Specifications
External Interface Timing Characteristics
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Electrical Specificatio ns 597
Figure 22-3. CLKOUT Timing
24 Data-in val id to CLKOUT hi gh read tDIVCH 22 ns
25 CLK OUT hig h to data-in invalid read tCHDII 0 ns
26 TA, TE A asserted to CLKOU T high tTACH 0.25 tcyc + 14 ns
27 CLKOUT high to TA, TEA negat ed tCHTN 0 ns
1. All AC timing is shown with respect to 20% VDD and 80% VDD level s, unless otherwise noted .
2. Ti ming is n ot guarant eed during the clock cycle of mode and/ or setup change s (for ex ample, changing pi n functi on between
GPI O and primary function, changing GPIO between input/output functions, changing control registers that af fect pin
functions).
3. A[22: 0] , TS I Z[1 :0] , CS[ 3:0 ] valid to R/W (write), OE, EB assert ed (minimum) spec is 0 ns. This parameter i s char act erized
before qualifi cation rather than 100% te sted.
4. Writ e/show data high-Z to OE ass ert ed (minimum) or from EB negated (write m aximum) spec is 0 ns. This par am eter
is characterized before qua li fication rather than 100% test ed.
5. To prevent an unintentional assertion glitch of t he EB pi ns during a synchr onous reset (and before the reset overrides
confi gure the chip in a stable mode), leave the port out put data r egister bits associ ated with the EB GP O default of 1 and
do not pul l the pins d own wit h a curr ent load.
6. SHS high to show data or write data invalid (minimum ) spec is 0 ns. This parameter is charact erized bef ore qualific ation
rather than 100% tested.
7. Writ e/show data hi gh-Z and write/show data in valid is 0 n s for synchronous res et conditions.
Table 22-11. External Interface Timing Characteristics (Continued)
(VDD = 2.7 V to 3.6 V, VSS = 0 V, TA = TL to T H)
No. Characteristic(1), (2) Symbol Min Max Unit
CLKOUT
4
2
5
3
1
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
598 Electrical Sp ecifications MOTOR OLA
Electrical Specifications
Figure 22-4. Clock Read/Write Cycle Timing
CLKOUT
A[22:0]
CSE[1:0]
7
R/W (WRITE)
OE
EB[3:0] (WR ITE)
SHS
CS3CS0
D[31:0] (READ)
TA/TEA
TC[2:0],
16 17
89
18 19
24 25
26 27
13
6
D[31:0] (WRITE)
22 23
EB[3:0] (READ)
17A
R/W (READ)
15
14
TSIZ[1:0]
11
10
PSTAT[3:0]
20 21
12
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ele ctrical Specifications
External Interface Timing Characteristics
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Electrical Specificatio ns 599
Figure 22-5. Read/Write Cycle Timing with Wait States
CLKOUT
A[22:0]
CSE[1:0]
7
R/W (WRI TE)
OE
EB[3:0] (WRI TE)
SHS
CS3CS0
D[31:0] (READ)
TA/TEA
TC[2:0],
16 17
89
18 19
24
25
26 27
13
6
D[31:0] (W R ITE)
22 23
EB[3:0] (READ)
17A
R/W (READ)
15
14
TSIZ[1:0]
11
10
PSTAT[3:0]
20 21
12
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
600 Electrical Sp ecifications MOTOR OLA
Electrical Specifications
Figure 22-6. Show Cycle Timing
CLKOUT
A[22:0]
CSE[1:0]
7
R/W (WRITE )
OE
EB[3:0]
SHS
CS3CS0
TA/TEA
TC[2:0],
18 19
13
6
D[31:0] (WRITE)
22A 23
R/W (READ)
15
14
TSIZ[1:0]
11
10
PSTAT[3:0]
20 21
12
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ele ctrical Specifications
Reset and Configuration Override Timing
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Electrical Specificatio ns 601
22.12 Res et and Configuration Override Timing
Figure 22-7. RESET and Configuration Overrid e Timing
Table 22-12. Reset and Configuration Override Timing
(VDD = 2.7 to 3.6 V, VSS = 0 V, TA = TL to TH)
No. Parameter(1) Symbol Min Max Unit
R1 RESET input asserted to CLK OUT high tRACH 10 ns
R2 CLKOUT high to RESET input negated tCHRN 2 ns
R3 RESET i nput assertion time(2) tRIAT 5 tcyc
R4 CLKOUT h igh to RSTOUT valid(3) tCHROV 20 ns
R5 RSTOUT asserted to config. overrides asserted tROACA 0 ns
R6 Configuration override setup time to RSTOUT negated tCOS 20 tcyc
R7 Configuration override hold time after RSTOUT negat ed tCOH 0 ns
R8 RSTOUT negated to configuration override high
impedance tRONCZ 1 tcyc
1. All AC timing is shown with respect to 20% VDD and 80% VDD level s, unless otherwise noted .
2. During l ow-power STOP, the synchr onizer s for the RESET inp ut are bypa ssed an d RESET is assert ed as ynchrono usly to
the system. Thus, RESET must be held a minimum of 100 ns.
3. This parameter al so covers the timing of the show interrupt function.
R1 R2
CLKOUT
RESET
RSTOUT
R3
R4
R8
R7R6
R5
CONFIGURATION OVE RRIDES
R4
(RCON, D[28, 26, 23:21 , 19: 16] )
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
602 Electrical Sp ecifications MOTOR OLA
Electrical Specifications
22.13 S PI Ti ming Characteristics
Table 22-13. SPI Timing Characteristics
(VDD = 2.7 to 3.6 V, VSS = 0 V, TA = TL to TH)
No. Function Symbol Min Max Unit
1Operat ing frequenc y
Master
Slave fop DC
DC 1/2 x fsys
1/2 x fsys
System
frequency
2SCK period
Master
Slave tSCK 2
22048
tcyc
tcyc
3Enable lead time
Master
Slave tLead 1/2
1
tsck
tcyc
4Enab le l ag time
Master
Slave tLag 1/2
1
tsck
tcyc
5Clock (SCK) high or low time
Master
Slave tWSCK tcyc 30
tcyc 30 1024 tcyc
ns
6Da ta s e tup time , i n pu ts
Master
Slave tSU 25
25
ns
7Data hold time, inputs
Master
Slave tHigh 0
25
ns
8 Slave access time tA 1 tcyc
9 Slave MISO disable time tDIS 1 tcyc
10 Data valid af ter SCK edg e
Master
Slave tV
25
25 ns
11 Data hold time, outputs
Master
Slave tHold 0
0
ns
12 Rise time
Input
Output tRI
tRO
tcyc 25
25 ns
13 F all t ime
Input
Output tFI
tFO
tcyc 25
25 ns
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ele ctrical Specifications
SPI Timing Charac teristics
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Electrical Specificatio ns 603
A) SPI Master Timing (CPHA = 0)
B) SPI Master Timing (CPHA = 1)
Figure 22-8. SPI Timing Diagram (Sheet 1 of 2)
SCK
OUTPUT
SCK
OUTPUT
MISO
INPUT
MOSI
OUTPUT
SS1
OUTPUT
1
9
5 6
MSB IN2
BIT 6 . . . 1
LSB IN
MSB OUT 2LSB OUT
BIT 6 . . . 1
10
4
4
2
9
CPOL = 0
CPOL = 1
311
12
1. SS output mode (DDS7 = 1, SSOE = 1)
2. LSBF = 0. For LSBF = 1, bit order is LSB, bit 1, ..., bit 6, MSB.
Notes:
SCK
OUTPUT
SCK
OUTPUT
MISO
INPUT
MOSI
OUTPUT
1
5 6
MSB IN2
BIT 6 . . . 1
LSB IN
MASTER MSB OUT2MASTER LSB OUT
BIT 6 . . . 1
4
4
9
11 12
10
PORT DA TA
CPOL = 0
CPOL = 1
PORT DATA
SS1
OUTPUT
212 11 3
1. SS output mode (DDS7 = 1, SSOE = 1)
2. LSBF = 0. For LSBF = 1, bit order is LSB, bit 1, ..., bi t 6, MSB.
Notes:
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
604 Electrical Sp ecifications MOTOR OLA
Electrical Specifications
A) SPI S lave Timi ng (CPHA = 0)
B) SPI S lave Timi ng (CPHA = 1)
Figure 24-7. SPI Timing Diagram (Sheet 2 of 2)
SCK
INPUT
SCK
INPUT
MOSI
INPUT
MISO
OUTPUT
SS
INPUT
1
9
5 6
MSB IN
BIT 6 . . . 1
LSB IN
MS B O UT SLA VE LSB OUT
BIT 6 . . . 1
10
4
4
2
7
CPOL = 0
CPOL = 1
3
12
Note: Not def ined, but normall y MSB of character just received
SLAVE
12
11
10
SEE
11
NOTE
8
SCK
INPUT
SCK
INPUT
MOSI
INPUT
MISO
OUTPUT
1
5 6
MSB IN
BIT 6 . . . 1
LSB IN
MSB OUT SLAVE LSB OUT
BIT 6 . . . 1
4
4
9
11 12
10
SEE
CPOL = 0
CPOL = 1
SS
INPUT
212 11
3
Note: Not defined, but normally LSB of character just received
SLAVE
NOTE
7
8
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ele ctrical Specifications
OnCE , JTAG, and Boundary Scan Timing
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Electrical Specificatio ns 605
22.14 OnCE, JTAG, and Boundary Scan Timing
Figure 22-9. Test Clock Input Timing
Table 22-14. OnCE, JTAG, and Boundary Scan Timing
(VDD = 2.7 to 3.6 V, VSS = 0 V, TA = TL to TH)
No. Characteristics Symbol Min Max Unit
1 TCLK frequency of operation fJCYC dc 1/2 x f sys MHz
2 TCLK cycle peri o d tJCYC 2 tcyc
3 TCLK clock pulse widt h tJCW 25 ns
4 TCLK ris e and fal l tim e s tJCRF 03ns
5 Bou ndary scan input data setup time to TCLK rise tBSDST 5 ns
6 Bou ndary scan input dat a hold time after TCLK rise tBSDHT 24 ns
7 TCLK low-to-boundary scan output data valid tBSDV 040ns
8 TCLK low-to-boundary scan output high Z tBSDZ 040ns
9TMS, TDI, and DE input data setup time t o TCLK rise(1) tTAPDST 7 ns
10 TMS, TDI, and DE input data hold time after TCLK rise(1) tTAPDHT 15 ns
11 TCLK low to TDO data valid tTDODV 025ns
12 TCLK low to TDO high Z tTDODZ 09ns
13 TRST assert time tTRSTAT 100 ns
14 TRST setup time (negation) to TCLK high tTRSTST 10 ns
15 DE input data setup time to CL KOUT rise(1) tDEDST 10 ns
16 DE input data hold tim e after CLKOUT rise(1) tDEDHT 2 ns
17 CLKOUT high to DE data valid tDEDV 020ns
18 CLKOUT high to DE high Z tDEDZ 010ns
1. Parameters 9 and 10 appl y to the DE pin when used to enabl e OnCE. Parameters 15 and 16 apply to the DE pin w h en
used to request the processor to enter debug mode.
TCLK INP U T VIL
VIH
44
2
33
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
606 Electrical Sp ecifications MOTOR OLA
Electrical Specifications
Figure 22-10. Boundary Scan (JTAG) Timing
Figure 22-11. Test Access Port Timing
Figure 22-12. TRST Timing
INPUT DATA VALID
OUTPUT DATA VALID
OUTPUT DATA V ALID
TCLK
DATA INP UTS
DATA OUTPUTS
DATA OUTPUTS
DATA OUTPUTS
VIL VIH
7
8
7
56
INPUT DATA VALID
OU TPUT DATA VAL ID
OUTPUT DATA V ALID
TCLK
TDI
TDO
TDO
TDO
TMS
VIL VIH
DE 11
12
11
910
TCLK
TRST
14
13
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Ele ctrical Specifications
OnCE , JTAG, and Boundary Scan Timing
MMC21 07 Rev. 2.0 Technical Data
MOTO ROLA Electrical Specificatio ns 607
Figure 22-13. Debug Event Pin Timing
INPUT DA TA VALID
OUTP UT DA TA VA L ID
OUTP UT DA TA VA L ID
VIL VIH
CLKOUT
DE
DE
DE
DE
INPUT 17
18
17
15 16
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
608 Electrical Sp ecifications MOTOR OLA
Electrical Specifications
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Mechanical Specifications 609
Technical Data MMC2107
Section 23. Mechanical Specifications
23.1 Contents
23.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .609
23.3 Bond Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .610
23.4 Package Information for the 144-Pin LQFP . . . . . . . . . . . . . .611
23.5 Package Information for the 100-Pin LQFP . . . . . . . . . . . . . .611
23.6 144-Pin LQFP Mechanical Drawing . . . . . . . . . . . . . . . . . . . .612
23.7 100-Pin LQFP Mechanical Drawing . . . . . . . . . . . . . . . . . . . .613
23.2 Introduction
The MMC2107 is available in two types of packages:
1. 100-pin low-profile quad flat pack (LQFP) version supporting
single-chip mode of operation
2. 144-pin LQFP version supporting:
Single-chip operation with extra general-purpose input/output
Expanded master mode for interfacing to external memories
Emulation mode for development and debug
This section shows the latest package specifications available at the
time of this publication. To make sure that you have the latest
information, contact one of the following:
Local Motorola Sales Office
World Wide Web at http://www.mcu.motsps.com
Follow the World Wide Web on-line instructions to retrieve the current
mechanica l specification s.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
610 Mechanical Specifications MOTOROLA
Mechanical Specifications
23. 3 Bond Pins
The MM C2107 di e has a total of 14 4 bond pads. O f these, the pad s that
are not bonded out in the 100-pin package are distributed around the
circumference of the die. This optional group of pins includes:
A[22:0]
R/W
EB[3:0]
CSE[1:0]
TC[2:0]
OE
CS[3:0]
3 x VDD
3 x VSS
For more detailed information, see Section 4. Signal Description.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Mechanical S pecifications
Package Informa tion for the 144-Pin LQFP
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Mechanical Specifications 611
23.4 Package Information for the 144-Pin LQFP
The production 144-pin package characteristics are:
Joint-Electron Device Engineering Council (JEDEC) standard
Low-profile quad flat pack (LQFP)
Dimension: 20 x 20 mm
Lead pitch: 0.5 mm
Thin: 1.4 mm
Case number: 918-03
Clam shell socket: Yamaichi part #IC51-1444-1354
Open face socket: Yamaichi part #IC201-1444-034
23.5 Package Information for the 100-Pin LQFP
The production 100-pin package characteristics are:
JEDEC standar d
Low-profile quad flat pack (LQFP)
Dimension: 14 x 14 mm
Lead pitch: 0.5 mm
Thin: 1.4 mm
Case number: 983-02
Clam shell socket: Yamaichi part #IC51-1004-809
Open face socket: Yamaichi part #IC201-1004-008
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
612 Mechanical Specifications MOTOROLA
Mechanical Specifications
23.6 144-Pin LQFP Mechanical Drawing
N0.20 T L-M
144
GAGE PLANE
73
109
37
SEATING
108
1
36
72
PLANE
4X 4X 36 TIPS
PIN 1
IDENT
VIEW Y
B
B1 V1
A1
S1
V
P
G
A
S
0.1
C2
θ
VIEW A B
J1
J1
140X
4X
VIEW Y
PLATING
FAA
J
DBASE
METAL
SECTION J1-J1
(ROTATED 90 )
144 PL °
N0.08 MTL-M
θ
DIM
AMIN MAX
20.00 BSC
MILLIMETERS
A1 10.00 BSC
B20.00 BSC
B1 10.00 BSC
C1.40 1.60
C1 0.05 0.15
C2 1.35 1.45
D0.17 0.27
E0.45 0.75
F0.17 0.23
G0.50 BSC
J0.09 0.20
K0.50 REF
P0.25 BSC
R1 0.13 0.20
R2 0.13 0.20
S22.00 BSC
S1 11.00 BSC
V22.00 BSC
V1 11.00 BSC
Y0.25 REF
Z1.00 REF
AA 0.09 0.16
θ0
θ 0 7
θ 11 13
1
2
NOTES:
1. DIMENSIONS AND TOLERANCING PER
ASME Y14.5M, 1994.
2. DIMENSIONS IN MILLIMETERS.
3. DATUMS L, M, N TO BE DETERMINED A T THE
SEATING PLA NE, DATUM T.
4. DIMENSIONS S AND V TO BE DETERMINED
AT SEATIN G P LANE, DATUM T.
5. DIMENSIONS A AND B DO NOT INCLUDE
MOLD PROTRUSION. ALLOWABLE
PROTRUSION IS 0.25 PE R SIDE.
DIMENSIONS A AND B DO INCLUDE MOLD
MISMATCH AND ARE DETERMINED AT
DATUM PLANE H.
6. DIMENSION D DOES NOT INCLUDE DAMBAR
PROTRUSION. ALLOWABLE DAMBAR
PROTRUSION SHALL NOT CAUSE THE D
DIMENSION TO EXCEED 0.35.
°
°
°°
°
0.05
C
L
(Z)
R2
E
C2
(Y)
R1
(K)
C1 1θ
0.25
VI EW AB
N
0.20 T L-M
M
L
N
2θ
T
T144X
X
X=L, M OR N
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Mechanical S pecifications
100-Pin LQFP Mechanical Drawing
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Mechanical Specifications 613
23.7 100-Pin LQFP Mechanical Drawing
DIM
AMIN MAX
14.00 BSC
MILLIMETERS
A1
7.00 B SC
B
14.00 BSC
B1
7.00 B SC
C
1.70
C1
0.05 0.20
C2
1.30 1.50
D
0.10 0.30
E
0.45 0.75
F
0.15 0.23
G
0.50 B SC
J
0.07 0.20
K
0.50 REF
R1
0.08 0.20
S
16.00 BSC
S1
8.00 B SC
U
0.09 0.16
V
16.00 BSC
V1
8.00 B SC
W
0.20 REF
Z
1.00 REF
θ
0 7
θ
0
θ
12 REF
θ
NOTES:
1. DIMENSIONS AND TOLERANCES PER
ASME Y14.5M, 1994.
2. DIMENSIONS IN MILLIMETERS.
3. DATUMS L, M AND N TO BE DETERMINED
AT THE SEATING PLANE, DATUM T.
4. DIMENSIONS S AND V TO BE DETERMINED
AT SEATING PLANE, DATUM T.
5. DIMENSIONS A AND B DO NOT INCLUDE
MOLD PROTRUSION. ALLOWABLE
PROTRUSION IS 0.25 PER SIDE.
DIMENSIONS A AND B INCLUDE MOLD
MISMATCH.
6. DIMENSION D DOES NOT INCLUDE
DAMBAR PROTRUSION. DAMBAR
PROTRUSION SHALL NOT CAUSE THE
LEAD WIDTH TO EXCEED 0.35. MINIMUM
SPACE BETWEEN PROTRUSION AND
ADJACENT LEAD OR PROTRUSION 0.07.
1
2
3
°
°°
°
VIEW Y
4X 25 TIPS
4X
25
100 76
75
51
26 50
1
VIEW AA
C
N0.2 T L-M
0.08 T
C2
C1 (K)
(Z)
(W)
GAGE PLANE
VIEW AA
VIEW Y
AB
PLATING
U
J
D
F
ROT ATED 90 CLOCKWISE
BASE METAL
SECTION AB-AB
0.05
E
0.25
C
L
L-M
M
0.08 NT
3X
3
θ
4X
1
θ
2X R
R1
θ
X = L, M OR N
G
°
A
S
A1
S1
B1 V1
BV
---
---
N0.2 T L-M
M
N
T
SEATING
2
θ
4X 100X
PLANE
X
AB
L
12 REF
°
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
614 Mechanical Specifications MOTOROLA
Mechanical Specifications
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC21 07 Rev. 2.0 Technical Data
MOTOROLA Ordering Information 615
Technical Data MMC2107
Section 24. Ordering Information
24.1 Contents
24.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .615
24.3 MC Order Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .615
24.2 Introduction
This section contains instructions for ordering the MMC2107.
24.3 MC Orde r Num b ers
Ta ble 24-1. MC Order Numbers
MC Or de r Number(1)
1. PU = 100-pi n 14 x 14 mm low-pr ofile quad flat pack (LQF P)
PV = 144-pin 20 x 20 mm LQFP
Operating
Temperatu re Rang e
MMC2107PU –40°C to +85 °C
MMC2107PV 40 °C to +85 °C
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Technical Data MMC2107 Rev. 2.0
616 Ordering Information MOTOROLA
Ordering Information
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
blank
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MMC2107/D
REV 2
MMC2107 Technical Data
How to Reach Us:
USA/EUROPE/LOCATIONS NOT LISTED:
Motorola Literature Distribution
P.O. Box 5405
Denver, Colorado 80217
1-303-675-2140
1-800-441-2447
TECHNICAL INFORMATION CENTER:
1-800-521-6274
JAPAN:
Motorola Japan Ltd.
SPS, Technical Information Center
3-20-1, Minami-Azabu, Minato-ku
Tokyo 106-8573 Japan
81-3-3440-3569
ASIA/PACIFIC:
Motorola Semiconductors H.K. Ltd.
Silicon Harbour Centre
2 Dai King Street
Tai Po Industrial Estate
Tai Po, N.T., Hong Kong
852-26668334
HOME PAGE:
http://www.motorola.com/semiconductors/
Q4/00
REV 1
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...