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.). ...
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...
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). ...
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 ...
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 ...
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 ...
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 ...
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 ...
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...
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 ...
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) ...
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 ...
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 ...
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 ...
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 ...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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 ...
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...
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 ...
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. ...
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í ...
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). ...
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 ë...
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 ...
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 ë...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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. ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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) - ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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. ...
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. ...
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 ...
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 ...
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 ...
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, ...
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. ...
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...
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 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 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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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 )
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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. ...
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) ...