3.3Low voltage detect (LVD) system..................................................................................................................................40
3.5Power management control bits and registers................................................................................................................ 42
3.5.1System Power Management Status and Control 1 Register (PMC_SPMSC1)................................................42
3.5.2System Power Management Status and Control 2 Register (PMC_SPMSC2)................................................44
4.2Reset and interrupt vector assignments...........................................................................................................................46
4.3Register addresses and bit assignments.......................................................................................................................... 47
4.5Flash and EEPROM........................................................................................................................................................56
4.5.2.8Flash and EEPROM commands.......................................................................................................70
4.5.2.9Flash and EEPROM command summary........................................................................................ 72
4.6Flash and EEPROM registers descriptions.....................................................................................................................86
5.1.2Interrupt vectors, sources, and local masks......................................................................................................99
5.3.1Interrupt Pin Request Status and Control Register (IRQ_SC).........................................................................108
5.4Interrupt priority control register.................................................................................................................................... 109
5.4.1IPC Status and Control Register (IPC_SC)......................................................................................................110
6.3Reset and system initialization........................................................................................................................................113
6.6System Control Registers................................................................................................................................................118
6.6.1System Reset Status Register (SYS_SRS).......................................................................................................119
6.6.2System Background Debug Force Reset Register (SYS_SBDFR)..................................................................121
6.6.3System Device Identification Register: High (SYS_SDIDH)......................................................................... 121
7.2Port data and data direction.............................................................................................................................................133
7.5High current drive...........................................................................................................................................................134
7.6Pin behavior in stop mode...............................................................................................................................................134
7.7Port data registers............................................................................................................................................................134
7.7.1Port A Data Register (PORT_PTAD)..............................................................................................................135
7.7.2Port B Data Register (PORT_PTBD).............................................................................................................. 136
7.7.3Port C Data Register (PORT_PTCD).............................................................................................................. 136
7.7.4Port High Drive Enable Register (PORT_HDRVE)........................................................................................137
7.7.5Port A Output Enable Register (PORT_PTAOE)............................................................................................137
7.7.6Port B Output Enable Register (PORT_PTBOE)............................................................................................ 138
7.7.7Port C Output Enable Register (PORT_PTCOE)............................................................................................ 139
7.7.8Port A Input Enable Register (PORT_PTAIE)................................................................................................140
7.7.9Port B Input Enable Register (PORT_PTBIE)................................................................................................ 141
7.7.10Port C Input Enable Register (PORT_PTCIE)................................................................................................ 142
8.2.2Modes of operation.......................................................................................................................................... 156
8.2.3FLL lock and clock monitor.............................................................................................................................161
8.6ICS control registers....................................................................................................................................................... 166
8.6.1ICS Control Register 1 (ICS_C1).................................................................................................................... 167
8.6.2ICS Control Register 2 (ICS_C2).................................................................................................................... 168
8.6.3ICS Control Register 3 (ICS_C3).................................................................................................................... 169
8.6.4ICS Control Register 4 (ICS_C4).................................................................................................................... 169
8.6.5ICS Status Register (ICS_S)............................................................................................................................ 170
8.6.6OSC Status and Control Register (ICS_OSCSC)............................................................................................ 171
8.7System clock gating control registers............................................................................................................................. 172
8.7.1System Clock Gating Control 1 Register (SCG_C1).......................................................................................173
8.7.2System Clock Gating Control 2 Register (SCG_C2).......................................................................................174
8.7.3System Clock Gating Control 3 Register (SCG_C3).......................................................................................175
8.7.4System Clock Gating Control 4 Register (SCG_C4).......................................................................................175
9.2.1Central processor unit (CPU)...........................................................................................................................177
10.2 Programmer's Model and CPU Registers....................................................................................................................... 198
10.3.7Memory to memory Addressing Mode............................................................................................................ 206
10.3.7.1 Direct to Direct.................................................................................................................................206
10.3.7.2 Immediate to Direct......................................................................................................................... 206
10.3.7.3 Indexed to Direct, Post Increment....................................................................................................206
10.3.7.4 Direct to Indexed, Post-Increment................................................................................................... 207
10.6 Special Operations.......................................................................................................................................................... 211
10.7 Instruction Set Summary.................................................................................................................................................212
11.1.2Modes of Operation......................................................................................................................................... 225
11.1.2.1 KBI in Wait mode............................................................................................................................225
11.1.2.2 KBI in Stop modes...........................................................................................................................226
11.1.2.3 KBI in Active Background mode.....................................................................................................226
11.4 Memory Map and Registers............................................................................................................................................227
11.5.2Edge and level sensitivity................................................................................................................................ 230
12.1.3Modes of operation.......................................................................................................................................... 234
12.2 Signal description............................................................................................................................................................235
Status and Control (FTMx_SC)....................................................................................................................... 238
Counter High (FTMx_CNTH)......................................................................................................................... 239
12.4.3.1 Up counting......................................................................................................................................246
12.4.8Update of the registers with write buffers........................................................................................................254
13.2.1Modes of operation.......................................................................................................................................... 259
14.1.2Modes of operation.......................................................................................................................................... 269
14.2 SCI signal descriptions................................................................................................................................................... 272
14.2.1Detailed signal descriptions............................................................................................................................. 272
SCI Control Register 1 (SCIx_C1)...................................................................................................................274
SCI Control Register 2 (SCIx_C2)...................................................................................................................276
SCI Status Register 1 (SCIx_S1)..................................................................................................................... 277
SCI Status Register 2 (SCIx_S2)..................................................................................................................... 279
SCI Control Register 3 (SCIx_C3)...................................................................................................................280
SCI Data Register (SCIx_D)............................................................................................................................282
14.4.2.1 Send break and queued idle............................................................................................................. 284
14.4.3.1 Data sampling technique..................................................................................................................286
14.4.4Interrupts and status flags................................................................................................................................ 288
14.4.5.1 Slow data tolerance.......................................................................................................................... 289
14.4.5.2 Fast data tolerance............................................................................................................................291
14.4.6.1 8- and 9-bit data modes....................................................................................................................292
15.2 External Signal Description............................................................................................................................................ 296
15.2.1Analog Power (VDDA)................................................................................................................................... 297
15.2.3Voltage Reference High (VREFH).................................................................................................................. 297
15.3 ADC Control Registers...................................................................................................................................................298
15.3.1Status and Control Register 1 (ADC_SC1)......................................................................................................298
15.3.2Status and Control Register 2 (ADC_SC2)......................................................................................................300
15.3.3Status and Control Register 3 (ADC_SC3)......................................................................................................301
15.3.4Status and Control Register 4 (ADC_SC4)......................................................................................................302
15.3.5Conversion Result High Register (ADC_RH)................................................................................................. 303
15.3.6Conversion Result Low Register (ADC_RL).................................................................................................. 304
15.3.7Compare Value High Register (ADC_CVH)...................................................................................................305
15.3.8Compare Value Low Register (ADC_CVL)....................................................................................................305
15.3.9Pin Control 1 Register (ADC_APCTL1)......................................................................................................... 306
15.4.4.4 Power control................................................................................................................................... 311
15.4.4.5 Sample time and total conversion time............................................................................................311
15.6.1External pins and routing................................................................................................................................. 321
15.6.1.1 Analog supply pins...........................................................................................................................321
15.6.1.2 Analog reference pins...................................................................................................................... 321
15.6.1.3 Analog input pins.............................................................................................................................322
15.6.2Sources of error................................................................................................................................................ 323
16.1.2Modes of operation.......................................................................................................................................... 327
16.1.2.1 Operation in Wait mode...................................................................................................................328
16.1.2.2 Operation in Stop3 mode................................................................................................................. 328
16.1.2.3 Operation in Debug mode................................................................................................................328
16.2 External signal description..............................................................................................................................................329
16.3 Memory map and register definition...............................................................................................................................329
16.3.1ACMP Control and Status Register (ACMP_CS)........................................................................................... 330
16.3.2ACMP Control Register 0 (ACMP_C0).......................................................................................................... 331
16.3.3ACMP Control Register 1 (ACMP_C1).......................................................................................................... 331
16.3.4ACMP Control Register 2 (ACMP_C2).......................................................................................................... 332
16.5 Setup and operation of ACMP........................................................................................................................................333
17.3.1.2 Refreshing the Watchdog.................................................................................................................344
17.3.1.3 Example code: Refreshing the Watchdog........................................................................................345
17.3.2Configuring the Watchdog...............................................................................................................................345
17.3.2.1 Reconfiguring the Watchdog........................................................................................................... 345
17.3.2.2 Unlocking the Watchdog................................................................................................................. 346
17.3.2.3 Example code: Reconfiguring the Watchdog.................................................................................. 346
17.3.6Functionality in debug and low-power modes................................................................................................. 348
17.3.7Fast testing of the watchdog.............................................................................................................................349
17.3.7.1 Testing each byte of the counter...................................................................................................... 349
17.3.7.2 Entering user mode.......................................................................................................................... 350
18.1.1Forcing active background...............................................................................................................................351
18.3 On-chip debug system (DBG)........................................................................................................................................ 359
18.3.1Comparators A and B.......................................................................................................................................360
18.3.2Bus capture information and FIFO operation.................................................................................................. 360
18.3.4Tag vs. force breakpoints and triggers............................................................................................................. 362
19.1.2Modes of operation.......................................................................................................................................... 372
19.2 Signal description............................................................................................................................................................373
19.3 Memory map and registers..............................................................................................................................................373
19.3.1Debug Comparator A High Register (DBG_CAH)......................................................................................... 374
19.3.2Debug Comparator A Low Register (DBG_CAL).......................................................................................... 375
19.3.3Debug Comparator B High Register (DBG_CBH)..........................................................................................376
19.3.4Debug Comparator B Low Register (DBG_CBL)...........................................................................................376
19.3.5Debug Comparator C High Register (DBG_CCH)..........................................................................................377
19.3.6Debug Comparator C Low Register (DBG_CCL)...........................................................................................378
19.3.7Debug FIFO High Register (DBG_FH)...........................................................................................................378
19.3.9Debug Comparator A Extension Register (DBG_CAX)................................................................................. 380
19.3.10 Debug Comparator B Extension Register (DBG_CBX)..................................................................................381
19.3.11 Debug Comparator C Extension Register (DBG_CCX)..................................................................................382
19.3.12 Debug FIFO Extended Information Register (DBG_FX)................................................................................383
19.3.13 Debug Control Register (DBG_C)...................................................................................................................383
19.3.15 Debug Status Register (DBG_S)......................................................................................................................386
19.3.16 Debug Count Status Register (DBG_CNT)..................................................................................................... 387
19.4.4Trigger break control (TBC)............................................................................................................................ 390
19.4.4.1 Begin- and end-trigger..................................................................................................................... 391
19.4.4.2 Arming the DBG module.................................................................................................................391
19.4.5.1 Storing data in FIFO........................................................................................................................ 395
19.4.5.2 Storing with begin-trigger................................................................................................................395
19.4.5.3 Storing with end-trigger...................................................................................................................395
19.4.5.4 Reading data from FIFO.................................................................................................................. 395
These devices are members of the low-cost, high-performance HCS08 family of 8-bit
microcontroller units (MCUs). All MCUs in the family use the enhanced HCS08 central
processor unit and are available with a variety of modules, memory sizes and types, and
package types. The following table summarizes the peripheral availability per package
type for the devices available.
1. PTA4/ACMPO/BKGD/MS is an output-only pin when used as port pin.
1
2
3. PTB4 and PTB5 can provide high sink/source current drive.
2-CH FLEX TIMER
MODULE (FTM2 )
Chapter 1 Device Overview
Figure 1-1. MCU block diagram
1.3
These series contain three on-chip clock sources:
NXP Semiconductors25
System clock distribution
• Internal clock source (ICS) module — The main clock source generator providing
bus clock and other reference clocks to peripherals
MC9S08PA4 Reference Manual, Rev. 5, 08/2017
ICSLCLK
ICSFFCLK
XTAL
EXTAL
WDG
RTC
FTM0
FTM1
ADC
SCI0
CPUBDCFLASH
ACMP
RAM
LPOCLK
ICS
OSC
OSCOUT
1-kHz
LPO
ICSIRCLK
IPCDBG
KBI0
TCLK1
TCLK0
ICSCLK (~8 MHz after reset)
1/2
FTM2
System clock distribution
• External oscillator (XOSC) module — The external oscillator providing reference
clock to internal clock source (ICS), the real-time clock counter clock module (RTC)
and other MCU sub-systems.
• Low-power oscillator (LPO) module — The on-chip low-power oscillator providing
1 kHz reference clock to RTC and watchdog (WDOG).
NOTE
For this device, the system clock is the bus clock.
The following figure shows a simplified clock connection diagram.
Figure 1-2. System clock distribution diagram
The clock system supplies:
• ICSCLK(BUS) — This up to 20 MHz clock source is used as the bus clock that is
the reference to CPU and all peripherals. Control bits in the ICS control registers
determine which of the clock sources is connected:
• Internal reference clock
• External reference clock
• Frequency-locked loop (FLL) output
• ICSLCLK — This clock source is derived from the digitally controlled oscillator
(DCO) of the ICS when the ICS is configured to run off of the internal or external
reference clock. Development tools can select this internal self-clocked source (8
MHz) to speed up BDC communications in systems where the bus clock is slow.
26NXP Semiconductors
MC9S08PA4 Reference Manual, Rev. 5, 08/2017
Chapter 1 Device Overview
• ICSIRCLK — This is the internal reference clock and can be selected as the clock
source to the WDOG module.
• ICSFFCLK — This generates the fixed frequency clock (FFCLK) after being
synchronized to the bus clock. It can be selected as clock source to the FTM
modules. The frequency of the ICSFFCLK is determined by the setting of the ICS.
• LPOCLK — This clock is generated from an internal low power oscillator (≈1 kHz)
that is completely independent of the ICS module. The LPOCLK can be selected as
the clock source to the RTC or WDOG modules.
• OSCOUT — This is the direct output of the external oscillator module and can be
selected as the clock source for RTC, WDOG and ADC.
• TCLK0 — This is an optional external clock source for the FTM0 module. The
TCLK0 must be limited to 1/4th frequency of the bus clock for synchronization.
• TCLK1 — This is an optional external clock source for the FTM1 module. The
TCLK1 must be limited to 1/4th frequency of the bus clock for synchronization.
VDD and VSS are the primary power supply pins for the MCU. This voltage source
supplies power to all I/O buffer circuitry and to an internal voltage regulator. The internal
voltage regulator provides a regulated lower-voltage source to the CPU and to the MCU's
other internal circuitry.
Typically, application systems have two separate capacitors across the power pins. In this
case, there should be a bulk electrolytic capacitor, such as a 10 µF tantalum capacitor,
that provides bulk charge storage for the overall system and a 0.1 µF ceramic bypass
capacitor located as near to the paired VDD and VSS power pins as practical to suppress
high-frequency noise.
30NXP Semiconductors
Figure 2-4. Power supply bypassing
MC9S08PA4 Reference Manual, Rev. 5, 08/2017
Loading...
+ 371 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.