MagnaChip HMS39C7092 User Manual

32bit embedded flash mcu
Table of Contents

Advertisement

Quick Links

 
 
 
 
HMS39C7092 
32Bit Embedded Flash MCU 
Userís Manual
 
 
 
 
 
 
 
 
 
 
 
Version 1.2 
 

Advertisement

Table of Contents
loading

Summary of Contents for MagnaChip HMS39C7092

  • Page 1     HMS39C7092  32Bit Embedded Flash MCU      Userís Manual   Version 1.2                       ...
  • Page 2 ARM7TDMI is designed by ARM Ltd.      The information contained herein is subject to change without notice.    The information contained herein is presented only as a guide for the applications of our products. No  responsibility  is  assumed  by  Magnachip  for  any  infringements  of  patents  or  other  rights  of  the  third  parties which may result from its use. No license is granted by implication or otherwise under any patent  or patent rights of Magnachip or others.    These  Magnachip  products  are  intended  for  usage  in  general  electronic  equipment  (office  equipment,  communication equipment, measuring equipment, domestic electrification, etc.).   ...
  • Page 3: Table Of Contents

        Flash MCU(HMS39C7092)        Contents      Chapter 1 .............................13 Introduction ..........................13 General Description ..................14 Feature......................15 Pin Descriptions ....................16 Operation Mode description................21 Memory Map ....................25 Chapter 2 .............................27 ARM7TDMI Core........................27 General Description ..................28 Feature......................28 Core Block Diagram ..................29 Instruction Set ....................30 2.4.1 ARM Instruction..................30 2.4.2 THUMB Instruction ................33 2.4.3 The Program Status Registers ..............36 2.4.3.1 The condition code flags..............37...
  • Page 4         Flash MCU(HMS39C7092)    Power Management Unit .....................67 General Description ..................68 Operation Modes ..................69 5.2.1 Introduction....................69 5.2.2 Reset and Operation Modes ..............69 Power Management Unit Register Map ............71 Register Description..................72 Signal Timing Diagram..................75 5.5.1 Power on Reset..................75 5.5.2 Watch Dog Timer Overflow ..............75 5.5.3 Soft-Reset .....................76 Chapter 6 .............................77 The Interrupt Controller ......................77 About the Interrupt controller ................78 6.1.1 Interrupt sources ...................79 6.1.2 Interrupt Control ..................79 Interrupt Controller Registers................81...
  • Page 5     Flash MCU(HMS39C7092)        Features ......................121 Signal Description ..................121 Internal Block Diagram................122 Registers Description..................123 UART Operations..................134 9.6.1 FIFO Interrupt Mode Operation............134 9.6.2 FIFO Polled Mode Operation ..............135 Register Summary ..................136 Chapter 10..........................137 GPIO (General Purpose Input Output)................137 10.1 General Description ..................138 10.2 GPIO Registers ...................139 10.2.1 Register Memory Map .................139 10.3.1 Register Description ................140 10.3 Functional Description ................141 Chapter 11 ..........................143 On-Chip SRAM ........................143...
  • Page 6         Flash MCU(HMS39C7092)    Chapter 14 ..........................186 Electrical Characteristics....................186 14.1 Absolute Maximum Ratings ................187 14.2 Recommended Operating Conditions:............187 14.3 DC Characteristics ..................188 14.4  AC Characteristics ..................189 14.4 AD Conversion characteristics..............191 14.5 Operational Timing..................192 14.5.1 Clock Timing ....................192 14.5.2 Reset Timing....................192 14.5.3 Bus Timing ....................193   Appendix    A-1  Package Dimension    6     ...
  • Page 7 Flash MCU(HMS39C7092)        Figures    Figure 1.1    Package Outline....................14 Figure 1.2    HMS39C7092 Block Diagram ................15 Figure 1.3    HMS39C7092 Memory Map................25 Figure 1.4    Memory Map of Mode 3 ...................25 Figure 1.5    Memory Map of when Mode 4 and Mode 5 .............26 Figure 1.6    Memory Map of Mode 6 and Mode 7 ...............26 Figure 2.1    ARM7TDMI Core Block Diagram ..............29 Figure 2.2    ARM instruction set formats ................30 Figure 2.3    Register Organization in ARM state ..............32 Figure 2.4 ...
  • Page 8         Flash MCU(HMS39C7092)    Figure 8.2    Free-Running Counter Operation ..............109 Figure 8.3    Periodic Counter Operation................110 Figure 8.4    Example of 0 Output/1 Output ............... 111 Figure 8.5    Example of Toggle Output................112 Figure 8.6    Compare Match Signal Output Timing ............112 Figure 8.7    Input Capture Operation................. 113 Figure 8.8    Synchronized Operation Example ..............114 Figure 8.9    PWM Mode Operation Example 1 ..............115 Figure 8.10 ...
  • Page 9 Table 1.1    Pin Descriptions....................16 Table 1.1    Pin Descriptions (Continued) ................17 Table 1.1    Pin Descriptions (Continued) ................18 Table 1.1    Pin Descriptions (Continued) ................19 Table 1.1    Pin Descriptions (Continued) ................20 Table 1.2    HMS39C7092 Operation modes ...............21 Table 1.3    Pin assignment by mode ...................22 Table 1.3    Pin assignment by mode (continued) ..............23 Table 1.3    Pin assignment by mode (continued) ..............24 Table 2.1    The ARM Instruction set ..................31 Table 2.2    THUMB instruction set opcodes ................34 Table 2.3 ...
  • Page 10         Flash MCU(HMS39C7092)    Table 12.10    Setting for Flash PROM read/write..............169 Table 12.11    DC Characteristics ..................172 Table 12.12    AC Characteristics ..................172 Table 13.1    A/D Converter Pins ..................175 Table 13.2    Summarizes the A/D converterís registers............176 Table 14.1    Absolute Maximum Ratings ................187 Table 14.2    Recommended Operating Conditions ............187 Table 14.3    DC Characteristics..................188 Table 14.4    IO Circuits with pull-ups .................188 Table 14.5 ...
  • Page 11     Flash MCU(HMS39C7092)                11     ...
  • Page 12         Flash MCU(HMS39C7092)    12     ...
  • Page 13: Chapter 1

        Flash MCU(HMS39C7092)    Introduction                             Chapter 1  Introduction        13     ...
  • Page 14: General Description

    Introduction      Flash MCU(HMS39C7092)    1.1  General Description  The 16bit MCU with embedded flash memory for optical storage is the first member  of  Magnachip  Semiconductor  16/32bit  MCU  Family  of  high  performance  microcontroller units (MCUs). This family includes a series of peripherals from which  numerous  MCUs  are  assembled.  This  MCU  contains  extensive  peripherals  :  192Kbytes flash memory, 4K bytes SRAM, 6 channel 16bit Timer, Watch Dog Timer,  2  channel  UART,  Programmable  Priority  Interrupt  Controller,  75bits  GPIO,  BUS  Controller including Chip select logic, which is On-Chip Modular Architecture (AMBA).   ...
  • Page 15: Feature

        FlashROM  Power Management  (192KB)  Unit      Interrupt Controller  RAM  (4KB)  GPIO  PIN MUX    APB  Bridge    WDT      16bit Timer/PWMx6  UARTx2      10bit ADC 5ch  BUS Controller  PORT 8  PORT 7 PORT 6 PORT 5    Figure 1.2    HMS39C7092 Block Diagram        15     ...
  • Page 16: Pin Descriptions

        Introduction      Flash MCU(HMS39C7092)      1.3  Pin Descriptions  Table 1.1    Pin Descriptions  PIN  SYMBOL  DIR  DESCRIPTION  1  VDD  -  Power Supply 3.3V    O  External Chip Selection Number 7  2  TCIOA   I/O  PWM output, Compare match output of Reg.A and signal capture input of Timer Ch3    I/O  General purpose input output of port B bit0    O  External Chip Selection Number 6  3  TCIOB   I/O  PWM output, Compare match output of Reg.B and signal capture input of Timer Ch3 ...
  • Page 17: Table 1.1    Pin Descriptions (Continued)

        Flash MCU(HMS39C7092)    Introduction   Table 1.1    Pin Descriptions (Continued)  PIN  SYMBOL  DIR  DESCRIPTION  22  VSS  -  Power ground    D   I/O  External Data Bus bit 4  23    I/O  General purpose input output or port 4 bit 4    D   I/O  External Data Bus bit 5  24    I/O  General purpose input output or port 4 bit 5    D   I/O  External Data Bus bit 6 ...
  • Page 18: Table 1.1    Pin Descriptions (Continued)

        Introduction      Flash MCU(HMS39C7092)    Table 1.1    Pin Descriptions (Continued)  PIN  SYMBOL  DIR  DESCRIPTION    A   O  External Address Bus bit 11  48    I/O  General purpose input output or port 2 bit 3    A   O  External Address Bus bit 12  49    I/O  General purpose input output or port 2 bit 4    A   O  External Address Bus bit 13  50    I/O ...
  • Page 19: Table 1.1    Pin Descriptions (Continued)

        Flash MCU(HMS39C7092)    Introduction   Table 1.1    Pin Descriptions (Continued)  PIN  SYMBOL  DIR  DESCRIPTION  78    I  ADC Channel 0 input  79    I  ADC Channel 1 input  80    I  ADC Channel 2 input  81    I  ADC Channel 3 input  82    I  ADC Channel 4 input  83  VSS  -  Power ground (internally associate with AVSS)    TIOCA  ...
  • Page 20: Table 1.1    Pin Descriptions (Continued)

        Introduction      Flash MCU(HMS39C7092)    Table 1.1    Pin Descriptions (Continued)  PIN  SYMBOL  DIR  DESCRIPTION    O  External Address Bus bit 22  98    TIOCB   I/O  PWM output, Compare match output of Reg.B and signal capture input of Timer Ch1    I/O  General purpose input output of port A bit 5    O  External Address Bus bit 21  99    TIOCA   I/O  PWM output, Compare match output of Reg.A and signal capture input of Timer Ch2    I/O  General purpose input output of port A bit 6    O ...
  • Page 21: Operation Mode Description

    MODE  pin  or  configuring  the  PIN  MUX  registers.  The  pin  assignment  by  mode  is  shown  in  Table  1.3.  Especially  changing  mode  causes  memory  remap  for  appropriate mode. Figure 1.3 shows default memory map and the memory maps of  respective modes are shown in Figure 1.4, Figure 1.5 and Figure 1.6.  The Mode definition is listed as follows:    Table 1.2    HMS39C7092 Operation modes  MODE  MODE DESCRIPTION  0,1  Reserved for Test  2  External 8-bit data bus with 16MBytes of Address Range ...
  • Page 22: Table 1.3    Pin Assignment By Mode

        Introduction      Flash MCU(HMS39C7092)    Table 1.3    Pin assignment by mode  PIN  MODE 2  MODE 3  MODE 4  MODE 6  MODE 5  MODE 7  External  External  Flash boot mode UART boot mode  Flash boot mode  UART boot mode  8bit BUS  16bit BUS  with 16bit BUS  with 16bit BUS  (MICOM mode)  (MICOM mode)    1          VDD         ...
  • Page 23: Table 1.3    Pin Assignment By Mode (Continued)

        Flash MCU(HMS39C7092)    Introduction   Table 1.3    Pin assignment by mode (continued)  PIN  MODE2  MODE3  MODE4  MODE6  MODE5  MODE7  No.  External  External  Flash boot mode  UART boot mode  Flash boot mode  UART boot mode  8bit BUS  16bit BUS  with 16bit BUS  with 16bit BUS  (MICOM mode)  (MICOM mode)  41          A5  P15         ...
  • Page 24: Table 1.3    Pin Assignment By Mode (Continued)

        Introduction      Flash MCU(HMS39C7092)    Table 1.3    Pin assignment by mode (continued)   PIN  MODE2  MODE3  MODE4  MODE6  MODE5  MODE7  No.  External  External  Flash boot mode  UART boot mode  Flash boot mode  UART boot mode  8bit BUS  16bit BUS  with 16bit BUS  with 16bit BUS  (MICOM mode)  (MICOM mode)  81            AN3     ...
  • Page 25: Memory Map

    B U S C   0x 0 9 0 0 0 10 0 0x 09 0 0 0 0F F M C UC   0x 0 9 0 0 0 00 0 Figure 1.3    HMS39C7092 Memory Map    0x07FF FFF F 0x07F F FFFF 0x07F F F FFF 0x07F F FFFF...
  • Page 26: Figure 1.5    Memory Map Of When Mode 4 And Mode 5

        Introduction      Flash MCU(HMS39C7092)    0x07FF FFFF 0x07FF FFFF 0x07FF FFFF 0x07FF FFFF nCS7  nCS7  0x0700 0000 0x0700 0000 0x06FF FFFF 0x06FF FFFF Reserved  Reserved  nCS6  nCS6  0x0600 0000 0x0600 0000 0x0080 0000 0x0080 0000 0x05FF FFFF 0x05FF FFFF nCS5  nCS5  0x007F FFFF 0x007F FFFF 0x0500 0000 0x0500 0000 nCS7  nCS7  0x0070 0000 0x0070 0000 0x04FF FFFF 0x04FF FFFF 0x006F FFFF 0x006F FFFF...
  • Page 27: Chapter 2

        Flash MCU(HMS39C7092)    ARM7TDMI Core                             Chapter 2    ARM7TDMI Core        27     ...
  • Page 28: General Description

        BUS Controller      Flash MCU(HMS39C7092)      2.1  General Description  The  ARM7TDMI  is  a  member  of  the  ARM  family  of  general-purpose  32bit  microprocessors, which offers high performance for very low power consumption and  price.  This  processor  employs  a  unique  architectural  strategy  known  as  THUMB,  which makes it ideally suited to high volume applications with memory restrictions or  applications where code density is an issue.  The  key  idea  behind  THUMB  is  a  super  reduced  instruction  set.  Essentially,  the ...
  • Page 29: Core Block Diagram

        Flash MCU(HMS39C7092)    ARM7TDMI Core     2.3  Core Block Diagram      ScanChain2 A  [ 31:0] DBGRQI Scan BREAKPTI DBGACK Control RANGEOUT0 ECLK nEXEC Address Register RANGEOUT1 ISYNC BL [3:0] Breaker ESTERN1 MCLK Address EXTERN0 nWAIT Incrementer Instruction Decoder nIRQ MAS [1:0]...
  • Page 30: Instruction Set

        BUS Controller      Flash MCU(HMS39C7092)      2.4  Instruction Set    2.4.1  ARM Instruction        31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Cond  0  0  I  Opcode  S ...
  • Page 31: Table 2.1    The Arm Instruction Set

        Flash MCU(HMS39C7092)    ARM7TDMI Core   Table 2.1    The ARM Instruction set  Mnemonic  Instruction  Action  ADC  Add with carry  Rd := Rn + Op2 + Carry  ADD      Add  Rd := Rn + Op2  AND  AND  Rd := Rn AND Op2  B  Branch  R15 := address  BIC  Bit Clear  Rd := Rn AND NOT Op2      BL  Branch with Link  R14 := R15, R15 := address  BX  Branch and Exchange  R15 := Rn, T bit := Rn[0]  CDP  Coprocessor Data Processing  (Coprocessor-specific) ...
  • Page 32: Figure 2.3    Register Organization In Arm State

        BUS Controller      Flash MCU(HMS39C7092)      ARM state General Registers and Program Counter    System & User    FIQ    Supervisor  Abort  IRQ    Undefined  R0    R0    R0  R0  R0    R0  R1    R1    R1  R1  R1    R1  R2    R2 ...
  • Page 33: Thumb Instruction

        Flash MCU(HMS39C7092)    ARM7TDMI Core   2.4.2  THUMB Instruction      15  14  13  12  11 10 9  8  7  6  5   1  0  0  0    Offset5  Rs  Rd  Move shifted register  2  0  0  0  1  1 I Op  Rn/offset3 ...
  • Page 34: Table 2.2    Thumb Instruction Set Opcodes

        BUS Controller      Flash MCU(HMS39C7092)    Table 2.2    THUMB instruction set opcodes        Mnemonic  Instruction Lo reg. oper. Hi reg. oper Condition code set         Add with Carry V                                Arithmetic Shift Right  ...
  • Page 35: Figure 2.5    Register Organization In Thumb State

        Flash MCU(HMS39C7092)    ARM7TDMI Core        THUMB state General Registers and Program Counter    System & User    FIQ    Supervisor  Abort  IRQ    Undefined  R0    R0    R0  R0  R0    R0  R1    R1    R1  R1  R1    R1  R2   ...
  • Page 36: The Program Status Registers

        BUS Controller      Flash MCU(HMS39C7092)    Table 2.3    Condition code summary  Code  Suffix  Flags  Meaning    0000  EQ  Z  set equal  0001  NE  Z    clear not equal   0010  CS  C  set unsigned higher or same 0011  CC  C    clear unsigned lower   0100  MI  N  set negative 0101 ...
  • Page 37: The Condition Code Flags

        Flash MCU(HMS39C7092)    ARM7TDMI Core   2.4.3.1  The condition code flags    The  N,Z,C  and  V  bits  are  the  condition  code  flags.    These  may  be  changed  as  a  result of arithmetic and logical operations, and may be tested to determine whether  an instruction should be executed.    In ARM state, all instructions may be executed conditionally : see table 2.3 in chapter  2.4.2.    In THUMB state, only the Branch instruction is capable of conditional execution        2.4.3.2  The control bits    The bottom 8 bits of   a PSR(incorporating I,F,T and M[4:0]) are known collectively as ...
  • Page 38: Table 2.4    Psr Mode Bit Values

        BUS Controller      Flash MCU(HMS39C7092)      Table 2.4    PSR mode bit values  M[4:0]  Mode  Visible  THUMB  state  Visible  ARM  state  registers  registers  10000  User  R7..R0,    R14..R0,    LR, SP,    PC, CPSR  PC, CPSR  10001  FIQ  R7..R0,    R7..R0,    LR_fiq, SP_fiq,    R14_fiq...R8_fiq,   ...
  • Page 39: Arm Instructions

        Flash MCU(HMS39C7092)    ARM7TDMI Core     2.4.4  ARM Instructions    Refer to ARM7TDMI Datasheet (ARM DDI 0029E).        39     ...
  • Page 40     BUS Controller      Flash MCU(HMS39C7092)    40     ...
  • Page 41: Chapter 3

        Flash MCU(HMS39C7092)    BUS Controller                             Chapter 3  BUS Controller        41     ...
  • Page 42: Overview

        BUS Controller      Flash MCU(HMS39C7092)    3.1  Overview  The HMS39C7092 has an on-chip bus controller that manages the external address  space  divided  into  eight  areas,  which  can  attaches  SRAM,  ROM,  Flash-memory  or  off-chip peripheral devices. The bus specifications, such as bus width and number of  access states, can be set independently for each area, enabling multiple memories to  be connected easily.        3.1.1  Features  The features of the bus controller are listed below.    • 8-bit access or 16-bit access can be selected for each area      (In THUMB mode, only 16-bit accessing of external code memory is allowed)  • Active low chip select signals (nCS  to nCS ) can be output for area 0 to 7  • Bus specifications can be set independently for each area ...
  • Page 43: Pin Configuration

        Flash MCU(HMS39C7092)    BUS Controller   3.1.2  Pin Configuration  Table 3.1 summarizes the input/output pins of the bus controller.    Table 3.1    Bus Controller Pins  Name  I/O  Function    O  Strobe signals selecting areas 0 to 7  nAS  O  Strobe  signal  indicating  valid  address  output  on  the  address bus  nRD  O  Strobe  signal  indicating  reading  from  the  external  address ...
  • Page 44: Bus Controller Registers

        BUS Controller      Flash MCU(HMS39C7092)    3.2  Bus Controller Registers  The  base  address  for  the  BUS  Controllerís  registers  is  0x0900_0100.    Each  configuration registers (BCR0~7) are assigned to chip selected area, CS0~CS7.    Table 3.2    BUS Controller Register Map  I/O  Initial  Reg.  Dir.  Description  Offset Value  BCR0  0x0100 R/W  CS0 Bus Configuration Register  0x10F*  BCR1  0x0104 R/W ...
  • Page 45: Configuration Registers

        Flash MCU(HMS39C7092)    BUS Controller   3.2.1  Configuration Registers    The configuration register (BCR0~7) is a 16-bit read-write register.    BCR0~7          Bus Configuration Register (0x0900_0100 to 0x0900_011C R/W)      b15    -    b10  b9  b8  b7  b3  b2  b1  b0  BCRn  Reserved  ExtWaitEn  MemWidth Reserved Reserved  Normal Wait  Reset  0000000 ...
  • Page 46: Operation

        BUS Controller      Flash MCU(HMS39C7092)    3.3  Operation    3.3.1  Area Division  The external address space is divided into area 0 to 7. Each area has a size of 16- Mbyte  modes,  or  1-Mbyte  modes.  Figure  3.2  shows  a  general  view  of  the  memory  map.      0x07FF FFFF 0x07FF FFFF  nCS7            0x0700 0000 Reserved ...
  • Page 47: Area Division

        Flash MCU(HMS39C7092)    BUS Controller   3.3.2  Area Division  The  external  space  bus  specifications  consist  of  two  elements:  (1)  bus  width,  (2)    number of wait states.  The  bus  width  and  number  of  access  states  for  on-chip  memory  and  registers  are  fixed, and are not affected by the bus controller.    Bus  Width:  A  bus  width  of  8  or  16  bits  can  be  selected  with  MemWidth  bit-field  in ...
  • Page 48: Basic Bus Interface

        BUS Controller      Flash MCU(HMS39C7092)    3.4  Basic Bus Interface    3.4.1  Overview  The HMS39C7092 has only a basic interface that allows direct connection of ROM,  SRAM, off-chip peripheral devices and so on.    3.4.2  Byte Lane Write Control  Data  size  for  the  CPU  and  other  internal  masters  are  byte(8-bit),  half-word(16-bit),  word(32-bit). The bus controller has a data alignment function, and when accessing  external space, controls whether the upper data bus (D  to D ) or lower data bus (D   to D ) is used according to the bus specifications for the area being accessed (8-bit  access area or 16-bit access area) and the data size.    8-Bit Access Areas: Figure 3.3 shows data alignment control for 8-bit access space.  With 8-bit access space, the lower data bus (D  to D...
  • Page 49: Figure 3.4    Access Size And Data Alignment Control (16-Bit Access Area)

        Flash MCU(HMS39C7092)    BUS Controller   16-Bit  Access  Areas:  Figure  3.4  shows  data  alignment  control  for  16-bit  access  areas. With 16-bit access areas, the lower data bus (D  to D ) and higher data bus   to D ) are used for accesses. The amount of data that can be accessed at one  time  is one  byte  or  one half-word,  and  a  word  access  is  executed  as two  half-word  accesses.      Even Address Lower Byte ...
  • Page 50: Basic Bus Control Signal Timing

        BUS Controller      Flash MCU(HMS39C7092)    3.4.3  Basic Bus Control Signal Timing  16-Bit  1-Wait-Access  Areas:  Figure  3.5  shows  the  write  timing  of  bus  control  signals  for  a  16-Bit  1-wait-access  area  (in  case  of  32-bit  word  access).  Figure  3.6  shows the read timing of bus control signals for a 16-Bit 1-wait-access area (In case  of 32-bit word access). In this case the NormWait value in BCR of this area is ë 0í.    Note: Sequential read access keeps nRD signal to LOW state. ...
  • Page 51: Figure 3.7    Bus Control Signal Write Timing For 16-Bit, 1-Wait (Half-Word Access)

        Flash MCU(HMS39C7092)    BUS Controller   Figure  3.7  shows  the  write  timing  of  bus  control  signals  for  a  16-Bit  1-wait-access  area (In case of half-word access). Figure 3.8 shows the read timing of bus control  signals for a 16-Bit 1-wait-access area (In case of half-word access).            Address     Data Valid ë 1í    nHWR   nLWR ë 1í ...
  • Page 52: Figure 3.9    Bus Control Signal Write Timing For 16-Bit, 1-Wait (Byte Access)

        BUS Controller      Flash MCU(HMS39C7092)    Figure  3.9  shows  the  write  timing  of  bus  control  signals  for  a  16-Bit  1-wait-access  area  (In  case  of  byte  access).  Figure  3.10  shows  the  read  timing  of  bus  control  signals for a 16-Bit 1-wait-access area (In case of byte access).       ...
  • Page 53: Figure 3.11    Bus Control Signal Write Timing For 16-Bit, 2-Wait (Word Access)

        Flash MCU(HMS39C7092)    BUS Controller   Figure 3.11 shows the write timing of bus control signals for a 16-Bit 2-wait-access  area  (In  case  of  word  access).  Figure  3.12  shows  the  read  timing  of  bus  control  signals for a 16-Bit 2-wait-access area (In case of word access).              n + 2 Address   Data Valid Valid    nHWR     nLWR ë...
  • Page 54: Figure 3.13    Bus Control Signal Write Timing For 16-Bit, 2-Wait (Half-Word Access)

        BUS Controller      Flash MCU(HMS39C7092)    Figure 3.13 shows the write timing of bus control signals for a 16-Bit 2-wait-access  area (In case of half-word access). Figure 3.14 shows the read timing of bus control  signals for a 16-Bit 2-wait-access area (In case of half-word access).              Address   Data Valid   nHWR     nLWR ë 1í      Figure 3.13    Bus Control Signal Write Timing for 16-Bit, 2-Wait (Half-Word Access)                Address  ...
  • Page 55: Figure 3.15    Bus Control Signal Write Timing For 16-Bit, 2-Wait (Byte Access)

        Flash MCU(HMS39C7092)    BUS Controller   Figure 3.15 shows the write timing of bus control signals for a 16-Bit 2-wait-access  area  (In  case  of  byte  access).  Figure  3.16  shows  the  read  timing  of  bus  control  signals for a 16-Bit 2-wait-access area (In case of byte access).              Address   Data   Valid ë 1í    nHWR   nLWR ë...
  • Page 56: Wait Control

    Flash MCU(HMS39C7092)    3.4.4  Wait Control  When  accessing  external  space,  the  HMS39C7092  can  extend  the  bus  cycle  by  inserting  wait  states  (Tw).  There  are  two  ways  of  inserting  wait  states:  (1)  program  wait insertion and (2) pin wait insertion using the nWAIT pin.    Program  Wait  Insertion:  From  1  to  16  wait  states  can  be  inserted  automatically ...
  • Page 57: Bus Arbiter

    External Bus Master: The HMS39C7092 can be always released to an external bus  master. The external bus master has highest priority, and requests the bus right from  the bus arbiter driving the nBREQ signal low. Once the external bus master acquires  the  bus,  it  keeps  the  bus  until  the  nBREQ  signal  goes  to  high.  While  the  bus  is  released  to  an  external  bus  master,  the  HMS39C7092  chip  holds  the  address  bus,  data bus, bus control signals (nAS, nRD, nHWR, and nLWR), and chip select signals  (nCS0 to 7), and holds the nBACK pin in the low output state.    The  bus  arbiter  samples  the  nBREQ  pin  at  the  rise  of  the  system  clock  (XIN).  If ...
  • Page 58: Figure 3.18    Example Of External Bus Master Operation

        BUS Controller      Flash MCU(HMS39C7092)    Figure  3.18  shows  the  timing  when  the  bus  right  is  requested  by  an  external  bus  master during a read cycle in a 1-wait-state access area. There is a minimum interval  of three states from when the nBREQ signal goes low until the bus is released.        CPU Cycle External Bus Cycle        T0  T3        nBREQ    ...
  • Page 59: Chapter 4

        Flash MCU(HMS39C7092)    MCU controller                             Chapter 4    MCU Controller        59     ...
  • Page 60: General Description

        MCU controller      Flash MCU(HMS39C7092)    4.1  General Description  The  MCU  Controller  (MCUC)  is  composed  of  11 multi-function  pin  multiplex  control  signal registers and device code register.      4.2  Pin Function Description    Table 4.1 shows Pin function description.    Table 4.1    Pin Function Descriptions  Port  Port  NAME  Multiplexed functions  NAME Multiplexed functions  No.  No.  Port A ...
  • Page 61: Register Description

        Flash MCU(HMS39C7092)    MCU controller   4.3    Register Description    4.3.1  Register Memory Map  Table  4.2  is  the  memory  map  of  the  MCU  Controller.  The  base  address  of  MCU  control Register is 0x0900_0000. Table 4.3 shows the initial value in each mode. The  initial values are different by operation mode.    Table 4.2    Memory map of the MCU Controller  I/O  Dir. Description  Reg.  OFFSET  PAMR  0x0000 ...
  • Page 62: Pinmux Register

        MCU controller      Flash MCU(HMS39C7092)    4.3.2  PINMUX Register    PAMR  Port A Multiplex Register (0x0900_0000 R/W)      b31          b14  b13  b12  b11  b10 b3  b2  b1  PAMR  Reserved  PA7  PA6  PA5  PA4  PA3  PA2  PA1  PA0 Initial value : depend on operating mode (refer to Table 4.3)     ...
  • Page 63     Flash MCU(HMS39C7092)    MCU controller   P1MR  Port 1 Multiplex Register (0x0900_0008 R/W)      b31                                                                                      b8 b3 ...
  • Page 64     MCU controller      Flash MCU(HMS39C7092)    P4MR  Port 4 Multiplex Register (0x0900_0014 R/W)      b31                                                                                      b8 b3 ...
  • Page 65     Flash MCU(HMS39C7092)    MCU controller   P7MR  Port 7 Multiplex Register (0x0900_0020 R/W)      b31                                                                        b9 ...
  • Page 66: Mcu Device Code Register (0X0900_002C Read Only)

        MCU controller      Flash MCU(HMS39C7092)    4.3.3  MCU Device Code Register      (0x0900_002C Read Only)   This Register is read only. Device Code Value is ë 0x3943_7092í                                66     ...
  • Page 67: Chapter 5

        Flash MCU(HMS39C7092)    Power Management Unit                             Chapter 5    Power Management Unit      67 ...
  • Page 68: General Description

        Power Management Unit      Flash MCU(HMS39C7092)        5.1  General Description  The PMU block provides:    • Clock distribution of all over system  • Reset, RUN and Power down modes control                                    CLKIN SCLK XIN  SCLK_GEN BCLK Internal System  MUX  Module Clock ...
  • Page 69: Operation Modes

        Flash MCU(HMS39C7092)    Power Management Unit     5.2  Operation Modes    5.2.1  Introduction  The  PMU  is  consisted  of  clock  controller  and  reset  controller.  User  can  control  internal  clocks  those  are  embedded  peripherals  and  main  clock  of  MCU  by  setting  the registers of PMU. The MCU has three reset sources those are external power-on  reset, soft-reset of PMU, soft-reset of WDT and overflow reset of WDT. And PMU has ...
  • Page 70: Figure 5.2    Reset And Power Management State Machine

        Power Management Unit      Flash MCU(HMS39C7092)        Overflow and Soft-Reset of Watchdog timer    The  watchdog  timer  can  generate  reset  signal,  when  timer  overflows  or  sets  the  register value. Detailed information are in the watchdog timer manual, please refer to  it.    Power-Down Mode    When MCU system is in the Powe-Down State, PMU block disables all of the blocks  in  the  ASB  and  APB,  so  the  power  consumption  of  system  is  dramatically  low. ...
  • Page 71: Power Management Unit Register Map

        Flash MCU(HMS39C7092)    Power Management Unit     5.3  Power Management Unit Register Map  The start address of the PMU(Power Management Unit) is 0x0900_1000.      Table 5.1    Register Map of the PMU  Name  I/O Offset Description  PMUCR  0x1000  W  PMU operation mode controls register.    PMUSR  0x1000  R  PMU  status  register  shows  the  just  previous  PMU state.  PCLKCR  0x1008  Peripheral clock control register.  MEMSR  0x100C  R ...
  • Page 72: Register Description

        Power Management Unit      Flash MCU(HMS39C7092)        5.4  Register Description  The  PMU  supplies  the  clock  to  all  of  the  blocks  in  the  MCU.  The  start  address  of  register is 0x0900_1000.      PMUCR  PMU Control Register (0x0900_1000 Write-Only)      b31    -    b8 ...
  • Page 73     Flash MCU(HMS39C7092)    Power Management Unit     PCLKCR  Clock Control Register (0x0900_1008 R/W)      b31 - b16  b15  b14  b13  b12 b11 b10 b4  b3  b2  b1  PCLKCR  Reserved  WU_SEL INTC_CC  WDT_CC  UART_Clk UART_CC  TIMER_CC  ADC_CC  Reset  -  0  0  0  0  0  0  0 ...
  • Page 74     Power Management Unit      Flash MCU(HMS39C7092)        MEMCR    Memory map Control Register (0x0900_1010 Write-Only)  MEMSR    Memory map Status Register (0x0900_100C Read-Only)      b31    -    b3  b2  b1  b0  MEMCR    Reserved  SM  On-Flash REMAP  MEMSR  Reset  -  0  0  0  Initial value : 0x-0     ...
  • Page 75: Signal Timing Diagram

        Flash MCU(HMS39C7092)    Power Management Unit     5.5  Signal Timing Diagram  The PMU signal timing is as shown below.    5.5.1  Power on Reset        BCLK        nRESET    32 clks    Internal Reset      Figure 5.3    Power on Reset Timing Diagram    5.5.2  Watch Dog Timer Overflow      BCLK      WDTOVF IN   ...
  • Page 76: Soft-Reset

        Power Management Unit      Flash MCU(HMS39C7092)        5.5.3  Soft-Reset  There are two Soft-Reset cases. The first Soft-Reset operation is switched by          MAN_RST signal from WDT.    Another case is from PMU reset control register.            Manual   Reset     Internal    512 clks Reset      Figure 5.5    Soft Reset (from WDT) Timing Diagram    BCLK  ...
  • Page 77: Chapter 6

        Flash MCU(HMS39C7092)    Interrupt controller                             Chapter 6  The Interrupt Controller     77 ...
  • Page 78: About The Interrupt Controller

        Interrupt controller      Flash MCU(HMS39C7092)        6.1  About the Interrupt controller  The interrupt controller has the following features :    • Asynchronous interrupt controller  • 8 external interrupt sources  • 13 internal interrupt sources  • Low interrupts latency  • Selection of the active modes of all interrupts source inputs    (Level or Edge trigger)  • Mask-able for each interrupt source and output signal  • Selection of the output paths (IRQ or FIQ for each interrupt source)                      Status Request  Source Mask  Trigger Mode Polarity Direction   Control Control  ...
  • Page 79: Interrupt Sources

        Flash MCU(HMS39C7092)    Interrupt controller   6.1.1  Interrupt sources  The interrupt controller provides interface between multiple interrupt sources and the  processor.  The  interrupt  controller  supports  internal  and  external  interrupt  sources.  Internally  there  are  11  peripheral  interrupt  sources.  Externally  there  are  8  interrupt  sources.  Therefore  certain  interrupt  bits  can  be  defined  for  the  basic  functionality ...
  • Page 80     Interrupt controller      Flash MCU(HMS39C7092)      The interrupt modes are configurable by interrupt trigger mode register and interrupt  trigger  polarity  register.  And  Interrupt  direction  register  indicates  whether  each  interrupt source drives IRQ or FIQ.    The  FIQ  and  IRQ  status  register  is  used  to  reflect  the  status  of  all  channels  set  to  produce  an  FIQ  interrupt  or  IRQ  interrupt.  And  the  status  registers  are  cleared  by ...
  • Page 81: Interrupt Controller Registers

        Flash MCU(HMS39C7092)    Interrupt controller   6.2  Interrupt Controller Registers  The  start  address  of  the  interrupt  controller  is  0x0900_1200.  The  offset  of  any  particular  register  from  the  start  address  is  fixed.    The  following  registers  are  provided for both FIQ and IRQ interrupt controllers:    Table 6.2    Memory Map of the Interrupt Controller  REG. ...
  • Page 82: Table 6.3    Interrupt Source Trigger Mode

        Interrupt controller      Flash MCU(HMS39C7092)        TPR        Trigger Polarity Register (0x0900_1208 R/W)      b31                -                b21  b20 b19 b18 b17 b16 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6  b5  b4  b3  b2  b1  b0 TPR ...
  • Page 83     Flash MCU(HMS39C7092)    Interrupt controller   FSR        FIQ Status Register (0x0900_1210 Read Only)      b31                -                b21  b20 b19 b18 b17 b16 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6  b5  b4  b3  b2  b1  b0 FSR ...
  • Page 84     Interrupt controller      Flash MCU(HMS39C7092)      IMR          IRQ Mask Register (0x0900_121C R/W)      b31                -                b21  b20 b19 b18 b17 b16 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6  b5  b4  b3  b2  b1  b0 IMR ...
  • Page 85: Chapter 7

        Flash MCU(HMS39C7092)    Watchdog Timer                             Chapter 7    Watchdog Timer      85 ...
  • Page 86: General Description

        Watchdog Timer      Flash MCU(HMS39C7092)        7.1  General Description  The watchdog timer has:    • watchdog timer mode and interval timer mode  • interrupt signal WDT Interrupt to interrupt controller in the watchdog timer mode &  interval timer mode  •  output  signal  Internal  RESET  and  Manual  RESET  to  PMU(Power  Management  Unit)    • eight counter clock sources  • selection whether to reset the chip internally or not  • two types of reset signal : power-on reset and manual reset                 ...
  • Page 87: Watchdog Timer Introduction

      Flash MCU(HMS39C7092)    Watchdog Timer   7.2  Watchdog Timer Introduction  The  HMS39C7092  has  a  one-channel  watchdog  timer(WDT)  for  monitoring  system  operations. If a system becomes uncontrolled and the timer counter overflows without  being rewritten correctly by the CPU, a reset signal is output to PMU.      When  this  watchdog  function  is  not  needed,  the  WDT  can  be  used  as  an  interval  timer. In the interval timer operation, an interval timer interrupt is generated at each  counter overflow.     ...
  • Page 88: Watchdog Timer Operation

        Watchdog Timer      Flash MCU(HMS39C7092)        7.3  Watchdog Timer Operation    The Watchdog Timer Mode    To use the WDT as a watchdog timer, set the WT/nIT and TMEN bits of the WTCR to  1. Software must prevent WTCNT overflow by rewriting the TCNT value(normally by  writing 0x00) before overflow occurs. If the WTCNT fails to be rewritten and overflow  due to a system crash or the like, WDT Interrupt signal and Internal/Manual RESET  signal are output. The INT_WDT signal is not output if INTEN is disabled (INTEN = 0).        WTCNT  value  WT/nIT = 1  0xFF  0x00  Time  0x00 written in  WTCNT TMEN = 1  WTOVF = 1  FAULT and internal reset generated    Figure 7.2    Operation in the Watchdog Timer Mode    If the RSTEN bit in the WTCR is set to 1, a signal to reset the chip will be generated  internally  when  TCNT  overflows.  Either  a  power-on  reset  or  a  manual  reset  can  be ...
  • Page 89: Timing Of Setting And Clearing The Overflow Flag

        Flash MCU(HMS39C7092)    Watchdog Timer   The Interval Timer Mode    To  use  the  WDT  as  an  interval  timer,  clear  WT/nIT  to  0  and  set  TMEN  to  1.  A  watchdog  timer  interrupt  (WDT  Interrupt)  is  generated  each  time  the  timer  counter  overflows.  This  function can  be  used  to  generate  interval  timer  interrupts  at  regular ...
  • Page 90: Watchdog Timer Memory Map

        Watchdog Timer      Flash MCU(HMS39C7092)      7.4  Watchdog Timer Memory Map  The WDT has five registers. They are used to select the internal clock source, switch  to  the  WDT  mode,  control  the  reset  signal,  and  test  it.  The  start  address  of  the  watchdog timer is fixed to 0x0900_1100 and the offset of any particular register from  the base address is fixed.    Table 7.1    Memory Map of the Watchdog Timer APB Peripheral  Name  I/O Offset DIR  Description  WTCR  0x1100  R/W ...
  • Page 91: Watchdog Timer Register Descriptions

        Flash MCU(HMS39C7092)    Watchdog Timer   7.5  Watchdog Timer Register Descriptions  The following registers are provided for watchdog timer:      WTCR      Watchdog Timer Control Register ( 0x0900_1100 R/W )    b31    -    b8  b7  b6  b5  b4  B3  b2  b1  b0  WTCR  Reserved  INTEN  WT/nIT  TMEN  RSTEN RSTSEL CKSEL  Reset  -  0 ...
  • Page 92: Table 7.2    Internal Counter Clock Sources

        Watchdog Timer      Flash MCU(HMS39C7092)      The following functions are provided :    • Selecting the timer mode  • Selecting the internal clock source  • Selecting the reset mode  • Setting the timer enable bit  • Being enable interrupt request  • Being enable reset signal occurrence    The clock signals are obtained by dividing the frequency of the system clock.    Table 7.2    Internal Counter Clock Sources  OVERFLOW INTERVAL  CKSEL  CLOCK SOURCE  33 MHZ  50 MHZ  000  SYSCLK / 2  15.5 us  10.2 us  001  SYSCLK / 8  62.0 us  40.9 us  010  SYSCLK / 32  248.2 us  163.8 us  011 ...
  • Page 93     Flash MCU(HMS39C7092)    Watchdog Timer     WTCNT  Watchdog Timer Counter ( 0x0900_1108 R/W )    b31    -    b8  b7  b6  b5  b4  b3  b2  b1  b0  WTCNT  Reserved  I7  I6  I5  I4  I3  I2  I1  I0  Reset  -  0  0  0  0  0 ...
  • Page 94: Examples Of Register Setting

        Watchdog Timer      Flash MCU(HMS39C7092)        7.6  Examples of Register Setting    7.6.1    Interval Timer Mode        WTCNT = 0x00  WTCR = 0xA0          WDT CLK WTCNT FE  13  14  WRSR 00  00  WTCR A0  WDT  Interrupt Read WRSR Register  Internal ë 0í...
  • Page 95: Watchdog Timer Mode With Internal Reset Disable

        Flash MCU(HMS39C7092)    Watchdog Timer   7.6.2  Watchdog Timer Mode with Internal Reset Disable    WTCNT = 0x00 (normally)  WTCR = 0xE0      BCLK WDT CLK WTCNT WRSR WTCR  Interrupt Read WRSR Register ë 0í Internal  Reset Manual  ë 0í Reset WDT OVF     Figure 7.5    Interrupt Clear in the Watchdog Timer Mode with Reset  Disable      95 ...
  • Page 96: Watchdog Timer Mode With Power-On Reset

        Watchdog Timer      Flash MCU(HMS39C7092)      7.6.3  Watchdog Timer Mode with Power-on Reset    WTCNT = 0x00  WTCR = 0xF0      BCLK   WDT CLK WTCNT FE  00  00  WRSR WTCR ë 0  Interrupt Reset Internal Reset Manual ë 0  Reset WDT OVF     Figure 7.6    Interrupt Clear in the Watchdog Timer Mode with Power-on Reset ...
  • Page 97: Watchdog Timer Mode With Manual Reset

        Flash MCU(HMS39C7092)    Watchdog Timer     7.6.4  Watchdog Timer Mode with Manual Reset    WTCNT = 0x00  WTCR = 0xF8      BCLK WDT CLK WTCNT FE  WRSR 00  WTCR ë 0  Interrupt Internal  ë 0í Reset Manual  Reset WDT OVF     Figure 7.7    Interrupt Clear in the Watchdog Timer Mode with Manual Reset        97 ...
  • Page 98     Watchdog Timer      Flash MCU(HMS39C7092)                                98   ...
  • Page 99: Chapter 8

        Flash MCU(HMS39C7092)    General Purpose Timer                             Chapter 8  The General Purpose Timer        99 ...
  • Page 100: About The General Purpose Timer Unit

        General Purpose Timer    Flash MCU(HMS39C7092)      8.1  About the General Purpose Timer Unit    The general-purpose timer unit has:  • Six channels with 16bit counter    • 12 different pulse outputs and 12 different pulse inputs    • Independent function with 12 general registers    • Compare match waveform output function  • Input capture function  • Counter-clearing function at compare match or input capture mode  • Synchronizing mode  • PWM mode  • 18 interrupt sources  • Selectable 4 internal clock sources and 4 external clock sources                TCLKA - TCLKD Clock Clock TINT0 - TINT5  Generation Selection BCLK  TIOCA0 ñ TIOCA5 Control   ...
  • Page 101: General Purpose Timer Unit Introduction

        Flash MCU(HMS39C7092)    General Purpose Timer   8.1.1  General Purpose Timer Unit Introduction  The HMS39C7092 has a general-purpose timer unit (GPTU) with six channels of 16- bit timer. There are two counter operation modes: a free running mode and a periodic  mode.  And  each  channel  has  independent  operating  modes.  There  are  common  functions for each channel: counter operation, input capture, compare match, PWM,  and synchronized clear and write.    It is possible to select one of eight counter clock sources for all channels.  • Internal clock : counting at falling edge  BCLK / 2  BCLK / 4  BCLK / 16  BCLK / 64  • External clock: counting at falling edge.    There  are  five  particular  operation mode  which  can  be  configured  respectively.  The ...
  • Page 102: General Purpose Timer Unit Memory Map

        General Purpose Timer    Flash MCU(HMS39C7092)      8.2  General Purpose Timer Unit Memory Map    8.2.1  Register Assignment  The base address of the general-purpose timer unit is 0x0900_1300 and the offset of  any particular register from the base address is fixed.    Table 8.1    Timer Global Control Register Map  I/O  DESCRIPTION  REG.  DIR.  OFFSET  TSTARTR  0x1300  R/W  Timer Start Register  TSYNCR  0x1304  R/W  Timer Sync. Register  TPWMR  0x1308  R/W  Timer PWM Mode Register  -  0x130C  W  (test only)  - ...
  • Page 103: General Purpose Timer Unit Register Descriptions

        Flash MCU(HMS39C7092)    General Purpose Timer   8.2.2  General Purpose Timer Unit Register Descriptions  The  base  address  of  the  general-purpose  timer  unit  is  0x0900_1300.  The  following  registers are provided for general purpose timer unit :      8.2.2.1  Timer Global Control Registers    TSTARTR  Timer Start Register (0x0900_1300 R/W)      b31                                  b8 ...
  • Page 104: Timer Channel Control Registers

        General Purpose Timer    Flash MCU(HMS39C7092)      8.2.2.2  Timer Channel Control Registers    TCR0  Timer 0 Control Register (0x0900_1320 R/W)      0 x1340 for Timer 1,0x1360 for Timer 2, 0x1380 for Timer 3, 0x13A0 for Timer 4, 0x13D0 for Timer 5      b31                                  b8  b7  b6  b5  b4 ...
  • Page 105     Flash MCU(HMS39C7092)    General Purpose Timer   TIOCR0  Timer 0 I/O Control Register (0x0900_1324 R/W)      0 x1344 for Timer 1,0x1364 for Timer 2, 0x1384 for Timer 3, 0x13A4 for Timer 4, 0x13D4 for Timer 5      b31                                  b8  b7  b6  b5  b4  b3  b2  b1  b0 ...
  • Page 106     General Purpose Timer    Flash MCU(HMS39C7092)        TIER0  Timer 0 Interrupt Enable Register (0x0900_1328 R/W)        0 x1348 for Timer 1,0x1368 for Timer 2, 0x1388 for Timer 3, 0x13A8 for Timer 4, 0x13D8 for Timer 5      b31                                  b8  b7  b6  b5  b4  b3 ...
  • Page 107     Flash MCU(HMS39C7092)    General Purpose Timer     TCNT0  Timer 0 Counter (0x0900_1330 R/W)      0 x1350 for Timer 1,0x1370 for Timer 2, 0x1390 for Timer 3, 0x13B0 for Timer 4, 0x13E0 for Timer 5      b31                              b16  B15  b14  b13 b12 b11 b10 b9 b4  b3  b2  b1  b0 TCNT0 ...
  • Page 108: General Purpose Timer Unit Operation

        General Purpose Timer    Flash MCU(HMS39C7092)      8.3  General Purpose Timer Unit Operation  There  are  five  particular  operation mode  which  can  be  configured  respectively.  The  operation modes are described below.    •  Free Running Mode  •  Compare Match Mode  •  Input Capture Mode  •  Synchronized Clear and Write Mode  •  PWM(Pulse-Width-Modulation) Mode    108   ...
  • Page 109: Free Running Mode

        Flash MCU(HMS39C7092)    General Purpose Timer   8.3.1  Free Running Mode  A reset of the counters for channels 0 - 5 leaves them all in the free-running mode.  When  a  corresponding  bit  in  the  TSR  is  set  to  1,  the  corresponding  timer  counter  operates as a free-running counter and begins to increment. When the count wraps  round  from  0xFFFF  to  0x0000,  the  overflow  flag  (OVFI)  in  the  timer  status  register  (TSR)  is  set  to  1.  If  the  OVFIE  bit  in  the  timerís  corresponding  interrupt  enable ...
  • Page 110: Figure 8.3    Periodic Counter Operation

        General Purpose Timer    Flash MCU(HMS39C7092)          Counter cleared by TCNT value GR compare match 0x0000 Time STR0-STR4   Figure 8.3    Periodic Counter Operation    110   ...
  • Page 111: Compare Match Mode

        Flash MCU(HMS39C7092)    General Purpose Timer   8.3.2  Compare Match Mode  Each channel has 2 general registers and user can read or write from/to the registers.  If user wrote some values to general register, and the counter reached that value, the  channel  generates  interrupt  and  external  output  by  user's  setting.  The  output  value  can be '1', '0', or toggle value. The counter can be cleared by user's setting when the  match with general register is detected.    TCNT value 0xFFFF Time TIOCB Does not change Does not change 1 output TIOCA 0 output Does not change Does not change   Figure 8.4    Example of 0 Output/1 Output ...
  • Page 112: Figure 8.5    Example Of Toggle Output

        General Purpose Timer    Flash MCU(HMS39C7092)      Counter cleared at TCNT value GRB compare match Time Toggle TIOCB output Toggle TIOCA output     Figure 8.5    Example of Toggle Output      TCNT input clock TCNT N  N + 1  N  Compare match signal TIOCA TIOCB   Figure 8.6    Compare Match Signal Output Timing  112   ...
  • Page 113: Input Capture Mode

        Flash MCU(HMS39C7092)    General Purpose Timer   8.3.3  Input Capture Mode  When  set  to  input  capture  mode,  At  the  rising/falling  edge  of  either  capture  input  TIOCA or TIOCB, the counter value is transferred to GRA or GRB respectively. Also  setting the MCIAE or MCIBE in TIER the interrupt can be generated by the external  capture  event.  The  capture  data  and  interrupt  are  generated  after  2  timer  clocks.  If  CCR field in TCR is appropriately set, The counter can be cleared when the edge of  TIOCA or TIOCB is detected. ...
  • Page 114: Synchronized Clear And Write Mode

        General Purpose Timer    Flash MCU(HMS39C7092)      8.3.4  Synchronized Clear and Write Mode  When some channels are set to synchronization mode, and one of them is cleared by  compare match or input capture, the other channels can be cleared simultaneously.  When  some  channels  are  set  to  synchronization  mode  and  user  would  write  any  value  to  one  of  them,  the  other  channels  can  be  written  with  same  value  simultaneously.   ...
  • Page 115: Pwm Mode

        Flash MCU(HMS39C7092)    General Purpose Timer   8.3.5  PWM Mode  The  PWM  mode  is  controlled  using  both  the  GRA  and  GRB  in  pairs.  The  PWM  waveform is output from the TIOCA output pin. The PWM waveformís 1 output timing  is set in GRA and the 0 output timing is set in GRB. A PWM waveform with duty cycle  between 0% and 100% can be output from the TIOCA pin by having either compare  match  GRA  or  GRB  be  the  counter  clear  source  for  the  timer  counter.  All  five ...
  • Page 116: Figure 8.10    Pwm Mode Operation Example 2

        General Purpose Timer    Flash MCU(HMS39C7092)      Figure  8.10  shows  examples  of  PWM  waveforms  output  with  0%  and  100%  duty  cycles. A 0% duty waveform can be obtained by setting the counter clear source to  GRB and then setting GRA to a larger value than GRB. A 100% duty waveform can  be  obtained  by  setting  the  counter  clear  source  to  GRA  and  then  setting  GRB  to  a  larger value than GRA   ...
  • Page 117: Figure 8.11    Reset-Synchronized Pwm Mode Operation Example

        Flash MCU(HMS39C7092)    General Purpose Timer     TCNT0 value  Synchronized clear on GRA1 compare match  GRA1,2,3  GRB1  GRB2  GRB3  Time  TIOCA1  TIOCA2  TIOCA3    Figure 8.11    Reset-Synchronized PWM Mode Operation Example    Reset-Synchronized PWM Mode Operation:  Figure  8.11  shows  an  example  of  operation  in  the  reset-synchronized  PWM  mode.  TCNT1  operates  as  an  upcounter  that  is  cleared  to  0x0000  at  compare  match  with ...
  • Page 118     General Purpose Timer    Flash MCU(HMS39C7092)                                118   ...
  • Page 119: Chapter 9

        Flash MCU(HMS39C7092)    UART                             Chapter 9    UART (Universal Asynchronous  Receiver/Transmitter)      119 ...
  • Page 120: General Description

        UART    Flash MCU(HMS39C7092)      9.1  General Description  This module is an Universal Asynchronous Receiver/Transmitter(UART) with FIFOs,  and  is  functionally  identical  to  the  16550.  The  UART  can  be  put  into  an  alternate  mode (FIFO mode) to relieve the CPU of excessive software overhead.    In this mode internal FIFOs are activated allowing 16 bytes plus 3 bit of error data per  byte in the RCVR FIFO, to be stored in both receive and transmit modes. All the logic  is on the chip to minimize the system overhead and maximize system efficiency.    The UART performs serial-to-parallel conversion on data characters received from a  peripheral device and parallel-to-serial conversion on data characters received from  the CPU. The CPU can read the complete status of the UART at any time during the  functional operation. Status information includes the type and condition of the transfer  operations  performed  by  the  UART,  as  well  as  any  error  conditions(parity,  overrun, ...
  • Page 121: Features

        Flash MCU(HMS39C7092)    UART   9.2  Features  • Capable of running all existing 16550 software.  • After reset, all registers are identical to the 16450 register set.  • The FIFO mode transmitter and receiver are each buffered with 16 byte FIFOís to  reduce the number of interrupts presented to the CPU.  • Adds or deletes standard asynchronous communication bits (start, stop, and parity)  to or from the serial data.  •  Hold  and  shift  registers  in  the  16450  mode  eliminate  the  need  for  precise  synchronization between the CPU and serial data.  • Independently controlled transmit, receive, line status and data set interrupts.  • Programmable baud generator divides any input clock by 1 to 65535 and generates  16x clock  • Input clock divider by setting 8-bit divider register.  • Independent receiver clock input.  • Fully programmable serial-interface characteristics:   5-, 6-, 7- or 8-bit characters   Even, odd, or no-parity bit generation and detection   1-, 1.5- or 2-stop bit generation and detection   Baud generation (DC to 256k baud)  • False start bit detection. ...
  • Page 122: Internal Block Diagram

        UART    Flash MCU(HMS39C7092)        9.4  Internal Block Diagram  RECEIVER F IFO PWD ATA[7:0] RECEIVER D ATA RECEIVER SH IFT BUFFER REGISTER BUFFER REGISTER PRDATA[7:0] LINE RECEIVER CON TRO L TIM IN G REGISTER & CON TRO L DIV ISOR...
  • Page 123: Registers Description

        Flash MCU(HMS39C7092)    UART   9.5  Registers Description  There  are  two  UARTs  implemented  in  the  design,  the  base  addresses  are  0x0900_1400 in UART0 and 0x0900_1500 in UART1.    Table 9.2    UART Register Address Map (0x1500 in UART1)  Reg.  I/O  Dir,  Description  Name  Offset  RBR  0x1400  R  Receiver Buffer (DLAB = 0)  THR  0x1400  W  Transmitter Holding (DLAB = 0)  IER ...
  • Page 124     UART    Flash MCU(HMS39C7092)      CLKCR  Clock Control Register (0x1420 R/W)      b31                                  b8  b7  b6  b5  B4  b3  b2  b1  b0  CLKCR  Reserved  Reserved ...
  • Page 125     Flash MCU(HMS39C7092)    UART   LCR  Line Control Register (0x1400 ReadOnly)      b31                                  b8  b7  b6  b5  b4  b3  b2  b1  b0  LCR  Reserved  DLAB  BREAK...
  • Page 126     UART    Flash MCU(HMS39C7092)      transmitted  to  the  receiving  UART.  When  it  is  set  to  ë 1í,  the  serial  output  (TxD) is forced to be the Spacing (logic 0) state. The break is disabled by  setting bit 6 to ë 0í. The Break Control bit acts only on TxD and has no effect  on the transmitter logic.      **  Note  :  This  feature  enables  the  CPU  to  alert  a  terminal  in  a  computer  communications  system.  If  the ...
  • Page 127: Table 9.4A    Divisor Values For Each Baud Rate (Clk=33Mhz)

        Flash MCU(HMS39C7092)    UART   Table 9.4a    Divisor Values for each Baud rate (CLK=33MHz)    33 MHz  Desired  Decimal  Prescaler  Error  Baud Rate  Divisor Value Value  Percentage  1200  191  9  0.0145%  2400  172  5  0.0726%  4800  86  5  0.0726%  9600  43  5  0.0726%  19200  12  9  0.53%  38400 ...
  • Page 128     UART    Flash MCU(HMS39C7092)      LSR  Line Status Register (0x1414 ReadOnly)      b31                                  b8  b7  b6  b5  b4  b3  b2  b1  b0  LSR  Reserved  FIFOE ...
  • Page 129     Flash MCU(HMS39C7092)    UART   Status  Register.  In  the  FIFO  mode  this  error  is  associated  with  the  particular character in the FIFO where it applies to. This error is revealed to  the CPU when its associated character is at the top of the FIFO. The UART  will try to resynchronize after a framing error. To do this, it assumes that the  framing error was due to the next start bit, so it samples this ìstartî bit twice  and then takes it in the ìdataî.  BI    This  bit  is  the  Break  Interrupt  indicator.  Bit  4  is  set  to  ë 1í  whenever  the ...
  • Page 130     UART    Flash MCU(HMS39C7092)      FCR  FIFO Control Register (0x1408 WriteOnly)      b31                                  b8  b7  b6  b5  b4  b3  b2  b1  b0  FCR  Reserved  FIFODEPTH ...
  • Page 131     Flash MCU(HMS39C7092)    UART   IIR  Interrupt Identification Register (0x1408 ReadOnly)      b31                                  b8  b7  b6  b5  b4  b3  b2  b1  b0  IIR  Reserved  FIFO  Res ...
  • Page 132: Table 9.5    Interrupt Control Functions

        UART    Flash MCU(HMS39C7092)      Table 9.5    Interrupt Control Functions      FIFO  Interrupt  Priority  Mode  Interrupt Set and Reset Functions  Identification Register Level  Only    Bit 3  Bit 2 Bit 1  Bit 0  Interrupt  Interrupt Source  Interrupt  Type  Reset Control  -  0  0  0  1  None  None  -  Highest  0 ...
  • Page 133     Flash MCU(HMS39C7092)    UART   to ë 1í.  RLSIE  This bit enables the Receiver Line Status Interrupt when it is set to ë 1í.      LTR  Loop Test Control Register (0x1410 R/W)      b31                                  b8  b7  B6  b5  b4  b3 ...
  • Page 134: Uart Operations

        UART    Flash MCU(HMS39C7092)      9.6  UART Operations    9.6.1  FIFO Interrupt Mode Operation    When the RCVR FIFO and receiver interrupts are enabled (FIFOEN = 1, DRIE =  1), RCVR interrupts occur as follows :    The received data available interrupt will be issued to the CPU when the FIFO has  reached its programmed trigger level; it will be cleared as soon as the FIFO drops  below its programmed trigger level.    The IIR receive data available indication also occurs when the FIFO trigger level is  reached, and like the interrupt it is cleared when the FIFO drops below the trigger  level.    The receiver line status interrupt (IIR=0x06), as before, has higher priority than the  received data available (IIR=0x04) interrupt.    The data ready bit (DR) is set as soon as a character is transferred from the shift  register to the RCVR FIFO. It is reset when the FIFO is empty.    When  RCVR  FIFO  and  receiver  interrupts  are  enabled,  RCVR  FIFO  timeout ...
  • Page 135: Fifo Polled Mode Operation

        Flash MCU(HMS39C7092)    UART   been  at  least  two  bytes  at  the  same  time  in  the  transmit  FIFO  since  the  last  THRE  =  1.  The  first  transmitter  interrupt  affect  changing  FIFOEN  will  be  immediate if it is enabled.      Character  timeout  and  RCVR  FIFO  trigger  level  interrupts have  the  same  priority ...
  • Page 136: Register Summary

        UART    Flash MCU(HMS39C7092)      9.7  Register Summary    Table 9.6    Summary of Registers  Reg.  Bit Field  Offset  Dir. cf.  Name  Bit 7  Bit 6  Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0  RBR  0x00  R  RBR  DLAB=0  THR  0x00  THR  DLAB=0  IER  0x04    RLSIE THREIE ...
  • Page 137: Chapter 10

        Flash MCU(HMS39C7092)    GPIO                             Chapter 10.    GPIO (General Purpose Input Output)      137 ...
  • Page 138: General Description

        GPIO    Flash MCU(HMS39C7092)        10.1  General Description  The GPIO is an APB peripheral which provides 75 bits of programmable input /output  divided into 11 ports ; port A, port B, port 1, port 2, port 3, port 4, port 5, port 6, port 7,  port 8 and port 9. Each pin is configurable as either input or output.    At system reset,  port A, 1, 3, 5, 8, 9 set their defaults to input and port B, 2, 4, 6, 7 set their defaults to  output.          E P A [7 :0 ] P o r t     A   P A [7 :0 ] D a ta  ...
  • Page 139: Gpio Registers

        Flash MCU(HMS39C7092)    GPIO   10.2  GPIO Registers    The following user registers are provided:    PnDR*  Port n Data Register. Values written to this read/write register will be input  on port A pins if the corresponding data direction bits are set to HIGH (port  input).  Values  read  from  this  register  reflect  the  external  states  of  port  n,  not necessarily the value should be written to it.  All bits are cleared by a  system reset.    PnDDR*  Port n Data Direction Register. Bits set in this read/write register will select  the corresponding pins in port n to become an input, clearing a bit sets the  pin to output. All bits are cleared by a system reset.      *n is: A, B, 1, 2, 3, 4, 5, 6, 7, 8 or 9     ...
  • Page 140: Register Description

        GPIO    Flash MCU(HMS39C7092)        10.3.1  Register Description  Each GPIO port have their own Data register and Data Direction register.    All those  ports are not 8-bit register.      PnDR  Port n Data Register (R/W, n is A,B,1,2,3,4,5,6,7,8 or 9)      b31    -    b8  b7  b6  b5  b4  b3  b2  b1  b0  P n DR  Reserved  D7  D6  D5 ...
  • Page 141: Functional Description

        Flash MCU(HMS39C7092)    GPIO   10.3  Functional Description  All block registers are cleared during power on reset.    This  sets  input  modes  for  port  A,  1,  3,  5,  8  and  9  and  sets  output  modes   for port B, 2, 4, 6 and 7 to  drive  ë Lowí.  So  users  make  sure  that  the  ports  are  pr operly ...
  • Page 142     GPIO    Flash MCU(HMS39C7092)                                  142   ...
  • Page 143: Chapter 11

        Flash MCU(HMS39C7092)    On-Chip SRAM                             Chapter 11    On-Chip SRAM      143 ...
  • Page 144: General Description

    11.1  General Description  The  HMS39C7092  has  4Kbytes  of  high  speed  static  RAM  on-chip.  The  RAM  is  connected  to  the  CPU  by  a  32-bit  ASB  (Advanced  System  Bus)  bus.  The  CPU  accesses  byte  data,  half-word  data,  and  word  data  in  one  cycle,  making  the  RAM ...
  • Page 145: Chapter 12

        Flash MCU(HMS39C7092)    On-chip Flash memory                             Chapter 12    On-chip Flash Memory      145 ...
  • Page 146: General Description

      On-chip Flash memory    Flash MCU(HMS39C7092)        12.1  General Description  The  HMS39C7092  has  192-Kbytes  of  on-chip  flash  memory.  The  flash  memory  is  connected to the CPU by a 16-bit data bus. The CPU accesses both half-word and  word data in several states depending on the wait register value.    The  on-chip  flash  memory  booting  option  is  enabled  and  disabled  by  setting  the  mode pins (MD  to MD ) as shown in Table 12.1. ...
  • Page 147: Table 12.1    Operating Mode

        Flash MCU(HMS39C7092)    On-chip Flash memory       Table 12.1    Operating mode    MD   Mode Description  1  0  M2  External 8-bit data bus and 16-Mbyte address mode  1  1  M3  External 16-bit data bus and 16-Mbyte address mode  0  0  M4  Flash memory boot with external 16-bit data bus mode  0  1  M5  Flash memory boot mode(microcomputer mode)  1  0  M6  UART booting mode with external 16-bit data bus  1  1  M7  UART booting mode with microcomputer mode ...
  • Page 148: Block Diagram

        On-chip Flash memory    Flash MCU(HMS39C7092)      12.3  Block Diagram  FTVPPD BCLK BA[31:0] BD[31:0] Decoder BSIZE[1:0] MODE[2:0] nRESET DSEL DSELReg Flash Array Bus Interface/ (96K x 16 bits) Controller Wait Control [16:0] WAITREG BWRITE BWAIT Test Logic BERROR /Controller BLAST     Figure 12.1    Block Diagram of Flash Memory  148   ...
  • Page 149: Table 12.2    Signal Description Of Figure 12.1(Bus Interface)

        Flash MCU(HMS39C7092)    On-chip Flash memory     Table 12.2    Signal description of Figure 12.1(BUS Interface)  Name  I/O  Function  nRESET  I  These signal indicate the reset status of the ASB  BCLK  I  The ASB clock timing all bus transfers  DSELREG I  When  this  signal  is  HIGH,  it  indicates  that  the  Flash  Memory  configuration  Internal  registers  are  selected.  (When  BA[31:0]  is  set  to ...
  • Page 150: Flash Memory Register Description

        On-chip Flash memory    Flash MCU(HMS39C7092)        12.4  Flash Memory Register Description    The registers used to control the on-chip flash memory when enabled are shown in  Table  12.3.  The  base  address  of  the  flash  memory  register(FMU_base)  is  0x0900_0200.        Table 12.3    Flash Memory Registers  I/O  Initial  Reg.  Dir.  Description  Offset  Value  FMWR  0x0200  Wait Register ...
  • Page 151 R/W    Register  for  storing  data  that  is  programmed  to  Flash  Memory  Address  of  FMAR  value in Program mode.    Each bit is corresponded to each cell one by one and if itís  0,  cell  can  be  programmed,  else  not  programmed.  Flash  Memory  of  HMS39C7092  can be programmed 16 bits at one time.  After reset, Data register output value is all reset to 0xFFFF and the other registers  are reset to ë 0í.  Users  can  write  this  register  directly  at  mode1(PROM  Mode).  In  this  Mode,  if ...
  • Page 152: Table 12.4    Control Register

        On-chip Flash memory    Flash MCU(HMS39C7092)        FMCR  Control Register    Bit  7  6  5  4  3  2  1  0    -  -  ER_VFY  PGM_VFY ERSE  PGM  ER_PWR  PGM_PWR Initial Value  -  -  0  0  0  0  0  0  Read/Write  - ...
  • Page 153: Table 12.5    Erase  Sector Register

        Flash MCU(HMS39C7092)    On-chip Flash memory     FESR  Erase Sector Select Register    Bit  7  6  5  4  3  2  1  0    SEC7  SEC6  SEC5  SEC4  SEC3  SEC2  SEC1  SEC0  Initial Value  0  0  0  0  0  0  0  0  Read/Write  R/W  R/W ...
  • Page 154: Table 12.6    Fmpr (Status & Power Register)

        On-chip Flash memory    Flash MCU(HMS39C7092)        Table 12.6    FMPR (Status & Power Register)  Bit  Name  Function  8  HVEEI  Itís  1,  when  the  ë ER_PWRí  in  FMCR  is  1  and  VEEI(Negative  Gate  pump output voltage) is below ñ7V(i.e. ñ7.1V)  7  LVEEI  Itís 1 when VEEI voltage is risen over ñ1V to discharge.  6  LVCC  Itís 1 when Pump is running (PGM_PWR=1 or ER_PWR=1) and VDD  becomes below 2.9V.  5,4  VEEI[1:0]  These  bits  define  VEEI  (Negative  Gate  Pump  output  voltage)  when ...
  • Page 155: On-Board Programming Mode

        12.5.1    Boot Mode  When  mode  pins  are  set  to  6  or  7  and  reset-start  is  executed,  the  HMS39C7092  enters  the  Boot  Mode  programming  state  in  which  on-chip  flash  memory  programming, erasing, verifying can be carried out. There are two operating modes  in this mode ñ mode 6 is extended mode, mode 7 is one-chip micro-controller mode.  This  device  has  Internal  ROM  area  for  booting.    This  ROM  area  locates  in ...
  • Page 156: Figure 12.3    Boot Mode Execution Procedure

    Figure 12.3    Boot Mode Execution Procedure      When  boot  mode  is  initiated,  the  HMS39C7092  measures  the  low  period  of  the  asynchronous  communication  data  transmitted  continuously  from  the  host.  The  UART  transmit/receive  format  should  be  set  as  8-bit  data,  1  stop  bit,  no  parity.  To ...
  • Page 157     Flash MCU(HMS39C7092)    On-chip Flash memory     Application example (Boot Mode)      1. Download Application Program                                                                  Data ...
  • Page 158: 12.5.2    User Program Mode

    1  1.  Set  the  mode  pins  to  an  on-chip    Set Mode pins to mode4,5  flash memory enable mode    (mode 4,5)          2.  Start  the  HMS39C7092  with  a    2  Reset-Start  reset.    3.  Execute  transfer  program  in  flash    memory.  program/erase  control   ...
  • Page 159     Flash MCU(HMS39C7092)    On-chip Flash memory     Application example (User Program Mode)      1. Download Application Program                                                                  Data ...
  • Page 160: Flash Memory Programming/Erasing

        On-chip Flash memory    Flash MCU(HMS39C7092)      12.6  Flash Memory Programming/Erasing  A software method, using the CPU, is employed to program and erase flash memory  in the on-board programming modes. There are five flash memory operation modes:  pre-program/program  mode,  erase  mode,  pre-program/program-verify  mode,  and  erase  verify  mode.  The  transitions  to  these  modes  are  made  by  setting  FMCR  register.  The flash memory cannot be read while being programmed or erased. Therefore, the  program (user program) that controls flash memory program/erase should be located  and executed in on-chip RAM or external memory.      12.6.1  Program & Program-Verify Mode  When  writing  data  or  programs  to  flash  memory,  the  program  flowchart  shown  in ...
  • Page 161: Figure 12.5    Flash Program & Program Verify Sequence

        Flash MCU(HMS39C7092)    On-chip Flash memory     Trial Count=0  ptr start address  (ptr) 0xffff  Program Phase  FMPR=0x02  wait for 2us  FMCR=0x01  wait for 10us  FMCR=0x05  (ptr) data  wait for 10us  ptr+=2  ptr==endaddress? (flash addr) 0xffff  FMCR=0x00  wait for 10us  Verify Phase  ptr start address  FMCR=0x10  wait for 10us  (ptr) 0xffff  wait for 2us  ptr+=2  (ptr)==data  &&ptr<endaddress? FMCR=0x00  FMPR=0x00 ...
  • Page 162: 12.6.2    Pre-Program & Pre-Program Verify Mode

        On-chip Flash memory    Flash MCU(HMS39C7092)        12.6.2    Pre-program & Pre-program Verify Mode  This  is  the  first  step  of  flash  memory  erase  algorithm.  Pre-program  &  Pre-program  Verify must be done before block erase.  The  difference  between  Program  and  Pre-program  is  that  the  purpose  of  Pre- program is programming not-programmed cell in a certain block that will be erased.    Due  to  Pre-programming  before  block  erase,  every  cell  in  the  block  that  will  be ...
  • Page 163: Figure 12.6    Flash Pre-Program & Pre-Program Verify Sequence

        Flash MCU(HMS39C7092)    On-chip Flash memory     Trial Count=0  ptr start of block  (ptr) 0xffff  Pre-program Phase FMPR=0x02  wait for 2us  FMCR=0x01  wait for 10us  FMCR=0x05  (ptr) 0x0000  wait for 10us  ptr+=2  ptr==end of block? (flash addr) 0xffff  FMCR=0x00  wait for 10us  Verify Phase  ptr start of block  FMCR=0x10  wait for 10us  (ptr) 0xffff  wait for 2us  ptr+=2  (ptr)==0x0000  &&ptr<end of block? FMCR=0x00  FMPR=0x00 ...
  • Page 164: 12.6.3    Erase & Erase Verify Mode

        On-chip Flash memory    Flash MCU(HMS39C7092)        12.6.3    Erase & Erase Verify Mode  Flash memory erase operation are performed block by block. To erase flash memory,  make a setting for the flash memory area to be erased in erase sector register(FESR).    If multiple bits of FESR register are set, multiple sectors are erased at one time. The  Maximum number of blocks that can be erased at one time is four.    After Erase, it is  necessary  to  do  Erase  verify  read  to ensure  that every  cell  in  the  block  are erased  successively. When Erase verify read mode, verify address must start at first address  of  block  to  be  erased,  and  increase  by  2  to  the  last  address  of  that  block.    The ...
  • Page 165: Figure 12.7    Flash Erase & Erase Verify Sequence

        Flash MCU(HMS39C7092)    On-chip Flash memory     Trial Count=0  FMPR=0x12  wait for 2us  Erase Phase  FMCR=0x02  wait for 10us  FEBR=erase sector  FMCR=0x0A  wait for T_ERASE  FMCR=0x00  FMPR=0x00  wait for 20us  Verify Phase  ptr start of block  FMCR=0x10  wait for 10us  (ptr) 0xffff  wait for 2us  ptr+=2  (ptr)==0xFFFF  &&ptr<end of block?   FMCR=0x00  wait for 2us  Trial Count++  ptr==endaddress? Trial Count<20?  (verify is OK?) Fail  OK  *T_ERASE = min 100us ...
  • Page 166: 12.6.4    Erase Algorithm

        On-chip Flash memory    Flash MCU(HMS39C7092)      12.6.4    Erase Algorithm  When erasing flash memory, the sequence of Figure 12.8 should be followed.  It is composed of pre-program & pre-program verify, erase & erase-verify.      start  Pre-Program/  PrePGM Verify  Yes  PrePGM Fail Erase/Erase Verify  Change Sector  Yes  Erase Fail Next  Block  Erase end  Fail    Figure 12.8    Flash Erase Algorithm  166   ...
  • Page 167: Flash Memory Prom Mode

        Flash MCU(HMS39C7092)    On-chip Flash memory     12.7  Flash Memory PROM Mode    The HMS39C7092 has a PROM mode as well as the on-board programming modes  for programming and erase flash memory. In PROM mode, the on-chip flash memory  can be programmed using a 7092 PROM writer.    12.7.1    PROM Mode Setting  By setting FR_SEL signal, internal register of flash memory are directly write or read  through  FD[15:0]  as  Table  12.7.  When  value  of  FR_SEL[2:0]  is  set  and  FWEB  =  rising-edge,  FD[15:0]  signals  are  passed  into  the  register  that  FR_SEL  select.   ...
  • Page 168: 12.7.2    Memory Map

        On-chip Flash memory    Flash MCU(HMS39C7092)        12.7.2    Memory Map  The memory map of PROM mode are shown at Table 12.9  At  PROM  mode,  on-chip  flash  is  96K  x  16  memory.    Therefore,  In  order  to  access  very next 16bit data to the currently accessed address, address should be changed  by  ë 1í(not  by  ë 2í),    Erase  operation  is  performed  by  sector,  and  corresponding ...
  • Page 169: 12.7.4    Timing Diagram And Ac/Dc Characteristics

        Flash MCU(HMS39C7092)    On-chip Flash memory     Table 12.10    Setting for Flash PROM read/write      1íst Cycle  2índ Cycle  3írd Cycle  Operation  FR_SEL Mode  Address FR_SEL Mode Address FR_SEL  Mode  Address Data  Data  Data  Memory  000  R  RA              Normal Read  Dout ...
  • Page 170: Figure 12.10    Timing Diagram Of Pre-Program/Program

        On-chip Flash memory    Flash MCU(HMS39C7092)        T rs t T p u p T p g m T p d w F R S T B D o n ít C a re A d d r ( X X XX X h ) D o n ít C a re A d d r ( X X XX X h )
  • Page 171: Figure 12.12    Timing Diagram Of Pre-Program/Program Verify

        Flash MCU(HMS39C7092)    On-chip Flash memory       Tvfy Tpdw Tdout Trst FRSTB FA[16:0] RA(Valid) Tces FCEB Tw ep FWEB FOEB FR_SEL[2:0] 000b 101b 011b 001b Tds Tdh FD[15:0] 0001h Dout 0010h 3írd  Read  2índ  1íst  Cycle Cycle Cycle Cycle Figure 12.12 ...
  • Page 172: Table 12.11    Dc Characteristics

        On-chip Flash memory    Flash MCU(HMS39C7092)        Table 12.11    DC Characteristics   = 3.3V±10%, Vss = 0V, Vss = 0V, FTVPPD = 5V±10%, Ta = 25∞ C ±10%)  Item   Symbol Min  Typ  Max  Unit  Test  Condition    Input high voltage  Vih  0.7x ---   +0.5 V      Input low voltage  Vil  -0.5  ---  0.3x V V      Output high voltage ...
  • Page 173: Chapter 13

        Flash MCU(HMS39C7092)    A/D Converter                             Chapter 13  A/D Converter      173 ...
  • Page 174: Overview

    Flash MCU(HMS39C7092)      13.1  Overview  The  HMS39C7092  has  a  10-bit  successive-approximations  A/D  converter  with  a  selection of up to five analog input channels. The A/D converter has multiplexed five  input  channels.  The  serial  output  is  configured  to  interface  with  standard  shift  registers. The differential analog voltage input allows for common-mode rejection or  offset  of  the  analog  zero  input  voltage  value.  The  voltage  reference  input  can  be ...
  • Page 175: Pin Configuration

        Flash MCU(HMS39C7092)    A/D Converter   13.1.2  Pin Configuration    Table 13.1 summarizes the A/D converterís input pins. AV  and AV  are the power  supply  for  the  analog  circuits  in  the  A/D  converter.  V   is  the  A/D  conversion  reference voltage.      Table 13.1    A/D Converter Pins  Pin Name  I/O  Function    Input  Analog power supply   ...
  • Page 176: A/D Converter Registers

        A/D Converter    Flash MCU(HMS39C7092)      13.2  A/D Converter Registers  The  registers  used  to  control  the  A/D  converter  when  enabled  are  shown  in  Table  13.2. The base address of the A/D converter is 0x0900_1700.    Table 13.2    Summarizes the A/D converterís registers.  I/O  Reg.Name  Name  Initial Value  Offset ADSR  0x1700 Control & Status Register  0x00  ADCR  0x1704 Control Register ...
  • Page 177     Flash MCU(HMS39C7092)    A/D Converter     ADF  A/D end flag (Indicates end of A/D conversion)    0 : [Clearing condition] Read when ADF=1,        then write 0 in ADF.    1 : [Setting condition] Automatically set when        conversion end    ADCSR  is  the  control  and  status  register  for  AD  converter.  ACH[2:0]  is  used  for  selection  of  the  analog  input  channel.  CKS[1:0]  is  used  for  selection  of  the  AD ...
  • Page 178     A/D Converter    Flash MCU(HMS39C7092)        ADDR0~4  A/D Data Register 0 to 4 (0x0900_1708 ~ 0x0900_1718 R)    Bit  b15  b14  b12  b11  b10  b9  b8  b7  b6  b5  b4  b3  B2  b1  b0    AD9  AD8  AD6  AD5  AD4  Reserved  Init. Val.  0  0  0  0  0 ...
  • Page 179: Operation

        Flash MCU(HMS39C7092)    A/D Converter   13.3  Operation   The  A/D  converter  operates  by  successive  approximations  with  10-bit  resolution.  Figure 13.2 show the operation of A/D converter.        AIOSTO CALEN   Analog  REF  ADCLK  fsample   Conversion Time  INT_AD Output Data DATAn    Figure 13.2    A/D converter Operation   ...
  • Page 180: Interrupts

        A/D Converter    Flash MCU(HMS39C7092)      13.4  Interrupts   The  A/D  converter  generates an  interrupt  (INT_ADC)  at  the  end  of  A/D conversion.  The INT_ADC interrupt request can be enabled or disabled by the ADIE bit in ADCSR.      180   ...
  • Page 181: Usage Notes

        Flash MCU(HMS39C7092)    A/D Converter   13.5  Usage Notes  When using the A/D converter, note the following points:    1. Analog Input Voltage Range: During A/D conversion, the voltages input to the      ≤ analog input pins AN  should be in the range AV  ≤    AN .  n        2. Relationships of AV  and AV  to V  and V : AV , AV , V , and V  should  be related as follows: AV  = V . AV  and AV  must not be left open, even if the  A/D converter is not used.   ...
  • Page 182: Figure 13.3    Example Of Analog Input Circuit

        A/D Converter    Flash MCU(HMS39C7092)            Analog      C2 C5 Reference  AVREF     Signal  .C1~C3:10uF    .C4~C6:2200pF    AVSS .DVSS=0V    AVDD .DVDD=3.3V    C3 C6 .AVREF=3.3V    . R1,R2 < 1KΩ    Ceramic       ...
  • Page 183: Figure 13.5    A/D Converter Accuracy Definitions (2)

        Flash MCU(HMS39C7092)    A/D Converter     Digital    Output        Ideal A/D conversion   characteristic     111      110      101      100      Quantization   011  error      010      001 ...
  • Page 184: Example

        A/D Converter    Flash MCU(HMS39C7092)      13.6  Example    AREA  ADDONE, CODE, READONLY  ENTRY    ldr  r0, =ADC_base  ; Make AOPSTOP to LOW to release power down mode,  add  r0, r0, #ADCR  ; then set normal operation mode.  mov  r1, #0  str  r1, [r0]    loop      ; Check whether CALEND is set to 1 or not.  ldr  r2, [r0]    ; (Check itís in the range of calibration time)  cmp  r2, #2  bne  loop    ldr  r0, =ADC_base ...
  • Page 185     Flash MCU(HMS39C7092)    Electrical Characteristics                                 185 ...
  • Page 186: Chapter 14

        Electrical Characteristics    Flash MCU(HMS39C7092)                                Chapter 14  Electrical Characteristics  186   ...
  • Page 187: Absolute Maximum Ratings

        Flash MCU(HMS39C7092)    Electrical Characteristics   14.1  Absolute Maximum Ratings  Table 14.1 lists the absolute maximum ratings(Note1 and 2).    Table 14.1    Absolute Maximum Ratings  Item  Symbol Value  Power supply voltage    -0.5V to 4.6V  DC Input Voltage (except I/O pins)    -0.5V to 6.0V  DC Output Voltage (Output in high or low state)    -0.5V to V +0.5V  DC Output Voltage (Output in 3-state)    -0.5V to +6.0V  Reference Voltage    -0.3V to AV +0.3  Analog Power supply voltage    -0.3V to 3.6V  Analog Input Voltage    -0.3V to AV +0.3 ...
  • Page 188: Dc Characteristics

        Electrical Characteristics    Flash MCU(HMS39C7092)      14.3  DC Characteristics  Table 14.3 lists the DC characteristics.    Table 14.3    DC Characteristics  SYMBO ITEM  MIN  MAX  UNIT TEST Conditions  L  Input Low    -0.5  0.3XV V  Normal  Voltage  VDD=3.0V to 3.6V  Input  Input High    0.7XV +0.5 V  Voltage  Input Low  Schmitt    0.9 ...
  • Page 189: Ac Characteristics

        Flash MCU(HMS39C7092)    Electrical Characteristics     14.4    AC Characteristics  Timing measurement conditions is following that unless otherwise specified:    VDD: 3.3V  Junction Temperature: 25 ∞ C  Process: Typical  Low-voltage input signal rising and falling edges switching time: 0.3ns    Clock timing parameters are listed in Table 14.6, control signal timing parameters in  Table 14.7, and bus timing parameters in Table 14.8.    Table 14.6    Clock Timing  Test    Item  Symbol  Min.  Max.  Units  Conditions  Clock cycle time    20  1000  ns  Clock pulse low width    10 ...
  • Page 190: Table 14.8    Bus Timing (Units: Ns)

        Electrical Characteristics    Flash MCU(HMS39C7092)          Table 14.8    Bus Timing                          (units: ns)  Test    Item  Symbol Min.  Max.  Conditions  Address delay time    -  20  Figure 14.3  Figure 14.4  Address hold time   ...
  • Page 191: Ad Conversion Characteristics

        Flash MCU(HMS39C7092)    Electrical Characteristics     14.4  AD Conversion characteristics  Table 14.9 lists the operation conditions of the AD Conversion    Table 14.9    Operating Conditions of the AD Conversion  Parameter  Symbol  Min.  Max.  Units  Power Supply  AVDD  3.0  3.6  V  Analog Input  AN  GND+0.2  AVREF-0.2  V  Clock Pulse Width    62.5    ns  Operating    ∞ C 0  100 ...
  • Page 192: Operational Timing

        Electrical Characteristics    Flash MCU(HMS39C7092)        14.5  Operational Timing       14.5.1 Clock Timing  Figure. 14.1 shows the settling time of the crystal oscillator.        XIN          nSTBY     OSC1    nRESET       Figure 14.1    The settling time of the crystal oscillator    14.5.2 Reset Timing   Figure 14.2 show the reset input timing and reset output timing.   ...
  • Page 193: 14.5.3 Bus Timing

        Flash MCU(HMS39C7092)    Electrical Characteristics     14.5.3 Bus Timing  Figure 14.3 and Figure 14.6 show the timing diagram of the bus controller.              XIN           to A     PCH1       PCH1      nHWR, nLWR   WSW1   WDS1   Data   (write)  ...
  • Page 194: Figure 14.5    Basic Bus Cycle With External Wait State

        Electrical Characteristics    Flash MCU(HMS39C7092)            T1  T3          nWAIT WTS            Address     Data   Valid (Read)   ë 1í  nHWR     ë 1í  nLWR  ...
  • Page 195     Flash MCU(HMS39C7092)    Electrical Characteristics       195 ...
  • Page 196     Electrical Characteristics    Flash MCU(HMS39C7092)      196   ...
  • Page 197: A-1 Package Dimension

        A-1    Flash MCU(HMS39C7092)    A-1 Package Dimension            197 ...

Table of Contents