(EN) MG32F02A032 DataSheet V1.21
(EN) MG32F02A032 DataSheet V1.21
MG32F02A032
Data Sheet
Version: 1.21
1. General Description
The MG32F02A is a single-chip 32-bit microcontroller based on a high performance Core ARM 32-bit
Cortex™-M0 CPU with embedded Nested Vectored Interrupt Controller (NVIC).
The MG32F02A has up to 32K bytes of embedded main flash memory for code and data, programmable
memory size of embedded system flash memory for boot load code and 64 bytes of embedded option-byte
flash memory for chip configuration. The all flash memory can be programmed either in serial writer mode (ICP,
In-Circuit-Programming). Also, the main flash memory can be programmed in ISP (In-System Programming)
mode or SRAM (Boot on SRAM) mode. ICP and ISP allow the user to download new code without removing
the microcontroller from the actual end product; IAP means that the device can write non-volatile data in the
flash memory while the application program is running. There needs no external high voltage for programming
due to its built-in charge-pumping circuitry.
The MG32F02A retains all features of the ARM 32-bit Cortex™-M0 with 4K bytes of SRAM, 4 I/O ports, 32
external interrupts source with 4-level interrupt controller and seven 8/16-bits timer/counters. In addition, the
MG32F02A has a System Tick Timer, two Watchdog Timers, three advance timer modules with IC/OC, four
Basic timer modules for universal using, on-chip crystal oscillator for 32.768 KHz to 25MHz, two high precision
internal oscillators IHRCO for 11.059/12MHz and ILRCO for 32 KHz, one 12-bit ADC and two analog
comparators with programmable threshold.
Also, the MG32F02A support multiple and flexible communicate interface for production application. It
provides alternate function pins those are including of GPIO, I2C, SPI, KBI, UART, SmartCard, LIN and
SWD(on chip debug). It has maximum 44 GPIO pins and provides programmable IO type - quasi-bidirectional ,
push-pull output , open-drain output , input only(Hi-z) with optional pull-high. In addition, it is built-in internal de-
bounce circuit to deglitch noise for worse signals.
One direct memory access (DMA) controller is used to improve data transfer between peripherals and
memory and memory to memory. The data can be transfer by DMA controller and does not cost any CPU time.
For power management and reset control, the MG32F02A is built-in a power supervisor including of a Low
Voltage Detector(LVD), two Brown-out Detectors(BOD0/BOD1), a Power-On Reset(POR) , a Low-voltage
Reset(LVR). The MG32F02A has multiple power-down modes to reduce the power consumption: Sleep mode
and Stop mode.
In the Sleep mode the CPU is frozen while the peripherals and the interrupt system are still operating. In
the Stop mode the RAM and SFRs’ value are saved and all other functions are inoperative; most importantly, in
the Sleep mode the chip can be waked up by many interrupt or reset sources(POR/LVR/BOD0/BOD1).
2. Order Information
Please contact the megawin sales for available options (memory size, package …) and more information
about this device.
Figure 2-1. Part Numbering
MG 32 F 0 2A xxx yy zz
megawin
Device family
32 = 32-bit MCU
Application family
F = Mainstream
L = Low Power
MCU Series
0 = ARM Cortex-M0
Device Series
Package type
AD = LQFP
AY = QFN
AT = TSSOP
Pin count
48 = 48 pins
32 = 32 pins
20 = 20 pins
SRAM 4KB
Internal Clock Source ILRCO+IHRCO 12MHz(default) & 11.059MHz option for IHRCO
IO Number 44/29/17
RTC yes
3. Block Diagram
3.1. System Function Block
The following diagram is showing the system function block for application.
Xtal
OSC/
Optional Xtal TM0x
Clock OSC Trigger
Source Capture
IHRCO Compare Output
Optional External OSC/Clock ILRCO TM1x TM3x PWM Output
Compare Out PWM
Analog Signal
General Purpose
I/O Control
AP/Boot Power
SRAM
Memory Flash Control
Control
Hardware Reset
GPL
Option Control
PAx
unctionSel
Port A I/O
AlternateF
IO Bus IO Bus
BOD0
SPIx RTC
APB Bus
I2Cx TM0x
XIN
OSC
XOUT
IO Bus
TM1x
AMUX
CMPx_In
CMP_Cn COMPx APB
4. Pin Description
PA3/ADC3
PA2/ADC2
PA1/ADC1
PA0/ADC0
VREF+
PD10
VDD
VSS
VR0
PD9
PD8
PD7
48
47
46
45
44
43
42
41
40
39
38
37
ADC8/PA8 1 36 PD3/TM01CK
ADC9/PA9 2 35 PD2/TM00CK
ADC10/PA10 3 34 PD1/TM16CK
ADC11/PA11 4 33 PD0/TM10CK
ADC12/PA12 5 32 PC14/XOUT
ADC13/PA13 6
MG32F02A 31 PC13/XIN
ADC14/PA14 7 30 PC12
ADC15/PA15 8
LQFP48 29 PC11
NSS/PB0 9 28 PC10
MISO/PB1 10 27 PC9/RXD1
SCK/PB2 11 26 PC8/TXD1
MOSI/PB3 12 25 PC6/RSTN
13
14
15
16
17
18
19
20
21
22
23
24
TXD0/PC0
RXD0/PC1
PB13
PB14
PC2
PC3
SD3/PB8
SD2/PB9
SCL0/PB10
SDA0/PB11
SWDIO/PC5
SWCLK/PC4
2019_0118
Pin Group
GPIOA GPIOB
GPIOC GPIOD
Power/Ground Others
PA3/ADC3
PA2/ADC2
PA1/ADC1
PA0/ADC0
VDD
VSS
VR0
PD7
32
31
30
29
28
27
26
25
ADC8/PA8 1 24 PD2/TM00CK
ADC9/PA9 2 23 PD1/TM16CK
ADC10/PA10 3 22 PD0/TM10CK
MISO/PB1 6 19 PC9/RXD1
SCK/PB2 7 18 PC8/TXD1
11
12
13
14
15
16
9
TXD0/PC0
RXD0/PC1
SD3/PB8
SD2/PB9
SCL0/PB10
SDA0/PB11
SWDIO/PC5
SWCLK/PC4
2019_0118
XIN/PC13 1 20 PC6/RSTN
XOUT/PC14 2 19 PC5/SWDIO
VSS 3 18 PC4/SWCLK
MG32F02A
TSSOP20
VR0 4 17 PC1/RXD0
VDD 5 16 PC0/TXD0
ADC8/PA8 6 15 PB11/SDA0
ADC10/PA10 7 14 PB10/SCL0
NSS/PB0 8 13 PB9/SD2
MISO/PB1 9 12 PB8/SD3
SCK/PB2 10 11 PB3/MOSI
2019_0118
QFN32
TSSOP20
Type
Value
5. Memory Map
5.1. Memory Organization
There are 4K bytes of SRAM built in the chip. The chip has up to 32K bytes of embedded main flash
memory for code and data, programmable memory size of embedded system flash memory for boot load code
and 64 bytes of embedded option-byte (OB) flash memory for chip configuration. Others, there are many
module independent hardware control registers and locate at the memory space of AHB/APB devices.
User can configure the whole flash to store for his Application Program (AP) code, In-System-Program (ISP)
code and In-Application-Program (IAP) memory. User can adjust the size for the three flash memories.
5.2. CPU Memory Map
The following diagram is showing the memory map of CPU. There are separated eight memory blocks and
the memory size is 512M-byte for each block. The block is signed “XN” which is not able to execute code.
CPU
Figure 5-1. CPU Memory Map Memory Map
Block/Type CPU Address Linear Logical Address Size
Device
System Device 512MB
XN Space
Private Peripheral Bus
0xE000 0000
External
1GB
Device External Device Space
XN
0xA000 0000
1GB
External RAM External RAM Space
0x6000 0000
Peripheral 512MB
XN
AHB/APB Devices Space
0x4000 0000
512MB
SRAM
Space
0x2000 0000
SRAM
0x1FF4 0000
OB2 Flash
0x1FF3 0000
OB1 Flash
0x1FF2 0000
OB0 Flash
0x1FF1 0000
0x1FF0 0000 ISPD Flash
AP Flash
0x1800 0000
Relocated Boot
Memory Space
0x0000 0000 (no physical memory)
5 External XN 0xA000 0000 0xBFFF FFFF 512MB Reserved External memory (SRAM, Flash)
Device
4 External 0x8000 0000 0x9FFF FFFF 512MB Reserved External memory (SRAM, Flash)
RAM
External
3 RAM 0x6000 0000 0x7FFF FFFF 512MB Reserved External memory (SRAM, Flash)
2 Peripheral XN 0x4000 0000 0x5FFF FFFF 512MB APB/AHB APB/AHB modules
0x2000 1000 0x3FFF FFFF 512MB Reserved
1
0x2000 0000 0x2000 0FFF 4KB SRAM
0x1FF4 0000 0x1FFF FFFF 768KB Reserved
0x1FF3 0400 0x1FF3 FFFF 63KB Reserved
0x1FF3 0040 0x1FF3 03FF 960B
OB Flash-2
0x1FF3 0000 0x1FF3 003F 64B Hardware Option byte-2 (64-byte)
0x1FF2 0400 0x1FF2 FFFF 63KB Reserved
0x1FF2 0050 0x1FF2 03FF 944B
0x1FF2 0040 0x1FF2 004F 16B OB Flash-1 Random ID (16-byte)
0x1FF2 0000 0x1FF2 003F 64B Hardware Option byte-1 (64-byte)
0x1FF1 0400 0x1FF1 FFFF 63KB Reserved
0x1FF1 0040 0x1FF1 03FF 960B
OB Flash-0
0x1FF1 0000 0x1FF1 003F 64B Hardware Option byte-0 (64-byte)
0 Code 0x1FF0 0400 0x1FF0 FFFF 63KB Reserved
0x1FF0 0000 0x1FF0 03FF 1KB ISPD Flash ISP data flash
0x1C00 8000 0x1FEF FFFF 63MB Reserved
Boot Flash memory (configurable
0x1C00 0000 0x1C00 7FFF 32KB ISP Flash
size)
0x1A00 8000 0x1BFF FFFF 32MB Reserved
Data Flash memory (configurable
0x1A00 0000 0x1A00 7FFF 32KB IAP Flash
size)
0x1800 8000 0x19FF FFFF 32MB Reserved
Application Flash memory
0x1800 0000 0x1800 7FFF 32KB AP Flash
(configurable size by chip option)
0x0000 8000 0x17FF FFFF 384MB Reserved
Relocated memory Interrupt Vector
0x0000 0000 0x0000 7FFF 32KB
space 0x0000 00C0~0x0000 0000
XN : eXecute Never , 1 Block = 512MB
Relocated memory space : Main flash memory, Boot flash memory or SRAM depending on BOOT configuration
6. Functional Description
6.1. CPU Core
6.1.1. Introduction
The chip is embedded a CPU core of Cortex™-M0 processor. The processor is a configurable, multistage,
32-bit RISC processor. It has an AMBA AHB-Lite interface and includes an NVIC component. It also has
optional DAP hardware debug functionality.
The processor can execute Thumb code and is compatible with other Cortex-M profile processor. The
profile supports two modes -Thread mode and Handler mode. Handler mode is entered as a result of an
exception. An exception return can only be issued in Handler mode. Thread mode is entered on Reset, and can
be entered as a result of an exception return.
6.1.2. CPU Features
ARM 32-bit Cortex-M0 CPU
Operation frequency up to 48MHz
Built-in one NVIC for 32 external interrupt inputs with 4-level priority
Built-in one 24-bit system tick timer
Built-in one single-cycle 32-bit multiplier
Built-in one SWD serial wire debugger with 2 watch points and 4 breakpoint
The ARMv6-M Thumb® instruction set
6.1.3. ARM Cortex-M0 Processor
The following diagram is showing the block of ARM Cortex-M0 Processor.
CK_AHB
Clock Gating Control
Cortex-M0 Components
Clock Domain
Cortex-M0 Processor
FCLK SCLK HCLK DCLK SWCLKTCK
DAP
Debug
Nested
Interrupts SWD
Vectored Cortex-M0 Breakpoint
and SWCLKTCK
Interrupt Processor
Controller Core Watchpoint
(NVIC) Unit
6.7. GPIO
6.7.1. Introduction
The chip has following I/O ports: PA[0:3][8:15], PB[0:3][8:11][13:14], PC [0:6][8:14], PD[0:3][7:10].
Support maximum 44 GPIO pins for LQFP48 package. RSTN pin is an alternated function pin on PC6. If select
6.8. Interrupt
6.8.1. Introduction
After reset, the CPU begins execution from the location of reset interrupt vector (0x00000004) addressing,
where should be the starting of the user’s application code. To service the interrupts, the interrupt service
12~13 - Reserved -
Interrupt Priority
The priority scheme for servicing the interrupts has four interrupt levels. The priority bits in CPU registers,
IPR0-7, SHPR2 and SHPR3, determine the priority level of each interrupt.
The interrupt priority registers provide an 8-bit priority field for each interrupt and each register holds four
priority fields. The processor implements only bits [7:6] of each field, bits [5:0] read as zero and ignore writes.
Higher-priority interrupt will be not interrupted by lower-priority interrupt request. If two interrupt requests of
different priority levels are received simultaneously, the request of higher priority is serviced. If interrupt
requests of the same priority level are received simultaneously, an internal polling sequence determine which
request is serviced. The table of “interrupt sources” shows the internal polling sequence in the same priority
level and the interrupt vector address. The lower exception number gets the higher priority.
6.8.4. Nested Vectored Interrupt Controller
The Cortex-M0 processor integrates a configurable Nested Vectored Interrupt Controller (NVIC) that
supports low latency interrupt processing and includes a non-mask interrupt (NMI). The NVIC provides a zero-
jitter interrupt option and four interrupt priority levels.
Interrupt handlers do not require any assembler wrapper code, removing any code overhead from the ISRs.
Tail-chaining optimization also significantly reduces the overhead when switching from one ISR to another.
To optimize low-power designs, the NVIC integrates with sleep mode. Optionally, sleep mode support can
include a deep sleep function that enables the entire device to be rapidly powered down.
6.8.5. Wakeup Interrupt Controller
The chip includes a Wakeup Interrupt Controller (WIC) which can detect an interrupt or wakeup event from
EXIC and wake the processor from deep sleep mode. The WIC is enabled only when the DEEPSLEEP bit in
the CPU register of SCR is set to 1. The WIC is not programmable, and does not have any registers or user
interface. It operates entirely from hardware signals.
6.8.6. External Interrupt Controller
The External Interrupt Controller (EXIC) includes four external port interrupt blocks (EXINT) to manage the
external pin input interrupt events, one wakeup control block for wakeup event control and control the
NMI/RXEV events. The EXIC also do as the interface controller between internal modules and NVIC for the
interrupt and wakeup events management
6.12. ADC
6.12.1. Introduction
The chip builds in one ADC0 module which embeds one 12-bit successive approximation ADC (analog-to-
digital converter), one PGA (programmable gain amplifier) with gain 1~4 and digital logic for output code control.
It supports the configurable multiplexed channels those include 12 external and 4 internal sources. The analog-
to-digital conversion can be performed in one-shot, continuous, one-loop scan or continuous loop scan modes.
6.12.2. Features
12-bit SAR ADC with 800Ksps
▬ Configurable resolution : 12/10/8-bit
▬ Configurable sampling time
Provide external 12 channels and internal 4 channels input
▬ Internal channel source : VBG, VSSA, LDO VR0 output, ADC Reference Voltage
Support auto-sampling and trigger by external pin , internal events and software bit
Data alignment for output code left/right justify
Built-in input buffer stage with bypass option
Programmable offset
Programmable gain : 1~4
Interrupt generation at the end of sampling, end of conversion, end of scan conversion
Support voltage window detect
▬ Two level programmable window threshold
Built-in one hardware accumulator for ADC output code
Support one-shot/channel scan/loop scan
ADC data are buffered with DMA capability
Support wait mode
▬ Prevents ADC overrun in application with low frequency
6.12.3. ADC Control Block
The ADC control block consists of an analog multiplexer (AMUX) with 16 input channels, a 800Ksps/12-bit
SAR (successive-approximation-register) ADC, reference voltage circuit, ADC conversion trigger start control
block and change scan control block.
ADC Input Channels
The analog multiplexer (AMUX) selects the inputs to the ADC, allowing any of the input pins to be
measured in single-ended mode.
The analog input pins used for the A/D converters also have its I/O pins for digital input and output function.
In order to give the proper analog performance, a pin that is being used with the ADC should have its digital
output as disabled. It is done by putting the port pin into the input-only mode. And when an analog signal is
applied to the ADC_I[15:8][3:0] pin and the digital input from this pin is not needed, software could set the
corresponding pin to AIO mode to turn off the digital input buffer to reduce power consumption.
Single-End Input Mode
The ADC supports single-end input operation modes. The ADC can convert the ADC output to unsigned
code.
ADC Sampling Time
6.14. IWDT
6.14.1. Introduction
The chip has one independent Watch-dog timer to use as a recovery method in situations where the CPU
may be subjected to software upset. It will trigger system reset when the counter reaches a given timeout value.
6.14.2. Features
8-bit down counter with 12-bit prescaler and clocked by its own CK_ILRCO
Operating capability in SLEEP and STOP modes
Selectable reset or interrupt when the counter underflow
Support two early wakeup comparators with interrupt
Support register key-protected and reset-locked functions
6.14.3. IWDT Control
The IWDT watch-dog timer consists of a 12-bit prescaler and an 8-bit timer. When the watch-dog timer is
enabled, software should always reset the timer before the timer is timeout. When the watch-dog timer is reset,
the timer will be reloaded 0xFF value to restart counting.
If the chip is out of control by any disturbance, the firmware may miss to reset the timer and the timer
timeout will be coming. It makes the IWDT generating a reset event and sends it to Reset Source Controller
(RST) to do as the warm reset events or cold reset events.
The IWDT is able to record default initialized value in hardware option byte (OB) about IWDT on/off, input
clock divider value, IWDT registers write protection.
The IWDT is able to operate in STOP mode and the APB clock is stopped and the module is asynchronous
control for all logic.
The IWDT supports to wakeup chip in STOP mode by the events of watch-dog timer underflow and early
wakeup-0/1 detection. When the chip is entering STOP mode and any of these IWDT wakeup events is
happened, the IWDT will send the wakeup event to Power Controller (PW) to do as the system wakeup events.
6.15. WWDT
6.15.1. Introduction
The system window watchdog is used to detect the occurrence of a software fault which causes the
application program abnormal. The watchdog circuit generates a system reset when the counter reaches a
given timeout value.
The WWDT has a configurable time-window that can be programmed to detect abnormally late or early
application behavior.
6.15.2. Features
10-bit counter with 1 or 256 divider , 1/2/4~/128 divider
Configurable time-window to detect abnormally late or early application behavior
Selectable reset or interrupt when the counter is underflow or reloaded outside the window
Support warning interrupt
Support register key-protected and reset-locked functions
6.15.3. WWDT Control
The WWDT watch-dog timer consists of one /1 or /256 clock prescaler, one 7-bit clock divider and one 10-
6.16. RTC
6.16.1. Introduction
The real-time clock is an independent 32-bit timer. The RTC provides a time clock with programmable
alarm interrupt. User can use as a calendar with software programmable alarm seconds, minutes, hours, day,
and date.
The RTC provides a wakeup flag to perform auto wakeup from power down mode with interrupt.
6.16.2. Features
Built-in 32-bit counter with selectable clock source
Support alarm function with 32-bit programmable compare register
Support time-stamp function for event saving
Support wakeup from Stop mode
Support register key-protected and reset-locked functions
6.16.3. RTC Control
The RTC supports an alarm function and one register to sets the RTC alarm compare value. When the
RTC timer value is matched with RTC alarm compare value, the RTC alarm flag is asserted and generates an
interrupt. Also the RTC can capture from the 32-bit timer value or reload value to the 32-bit timer.
The RTC supports a time stamp function by external input. User can select input trigger edge of rising edge,
falling edge or dual-edge. When an external input signal is matched, the RTC time stamp flag is asserted and
generates an interrupt.
One RTC_OUT output is able to output the RTC internal signals to internal modules or external pin. There
are four signals of timer overflow signal toggle output, time stamp trigger event, timer input periodic clock signal
and alarm compare output event which can be selected and sent from RTC_OUT output.
The RTC is able to operate in STOP mode and the APB clock is stopped and the module is asynchronous
control for all logic.
The RTC supports to wakeup chip in STOP mode by the events of timer overflow, timer input periodic clock
and alarm compare output. When the chip is entering STOP mode and any of these RTC wakeup events is
happened, the RTC will send the wakeup event to Power Controller (PW) to do as the system wakeup events.
6.17. Timer
6.17.1. Introduction
The chip has five Timer/Counter modules: TM00, TM01, TM10, TM16 and TM36. All of them can be
configured as timers or event counters.
TM0x has an 8-bit timer/counter with 8-bit prescaler. TM1x has a 16-bit timer/counter with 16-bit prescaler.
TM36 has a 16-bit timer/counter with 16-bit prescaler and embeds four input capture/output compare channels.
6.17.2. Features
Provide seven timers/counters : TM00,TM01,TM10,TM16,TM36
Timer module common functions
▬ Selectable Full-counter , Cascade , Separate modes
▬ Multiple internal and external signals as timer clock source or trigger source
▬ Internal timer events output to pin or other modules as input trigger event
▬ Support timer reset , trigger start and clock gating for trigger source function
▬ Timer overflow as clock output to external pin output
▬ Programmable counter auto-stop mode
6.18. I2C
6.18.1. Introduction
The I2C interface is a two-wire, bi-directional serial bus. It is ideally suited for typical microcontroller
applications. The I2C protocol allows the systems designer to interconnect up to 128 different devices using
only two bi-directional bus lines, one for clock (SCL) and one for data (SDA). The I2C bus provides control of
SDA, SCL generation and synchronization, arbitration logic, and START/STOP control and generation. The
only external hardware needed to implement this bus is a single pull-up resistor for each of the I2C bus lines.
All devices connected to the bus have individual addresses, and mechanisms for resolving bus contention are
inherent in the I2C protocol.
The I2C module builds in the shadow buffer and data register to improve transmit and receive communication
performance.
6.18.2. Features
Provide one identical I2c module : I2C0
I2C module common functions
▬ Support master and slave mode
▬ Support programmable clock rate control and clock rate up to 1 MHz
▬ Support programmable high/low period control for master mode
6.19. UART
6.19.1. Introduction
The UART module support full-duplex transmission, meaning it can transmit and receive simultaneously.
The module builds in the shadow buffer and data register by transmit and receive independently to improve
transmit and receive communication performance. It can commence reception of a second byte before a
previously received byte has been read from the register. However, if the first byte still hasn’t been read by the
time reception of the second byte is complete, one of the bytes will be lost.
The module can operate in multiple modes: asynchronous communication, synchronous communication,
SPI master, SmartCard, LIN, multi-processor mode. The asynchronous communication operates as a full-
duplex Universal Asynchronous Receiver and Transmitter (UART), which can transmit and receive
simultaneously and at different baud rates.
6.19.2. Features
Provide two identical UART modules : URT0,URT1
UART module common functions
▬ Support UART , Synchronous , SPI master , SmartCard , LIN , Multi-processor mode
▬ Provide precise UART baud-rate control by programmable oversampling rate
▬ Support baud rate up to 6 Mbit/s
▬ Programmable data word length - 7 or 8 bits
▬ Selectable MSB or LSB first data order
▬ Configurable stop bits - 0.5,1,1.5 or 2 stop bits
▬ Hardware parity checking and parity generation
▬ Programmable 4~32 oversampling rate
▬ Swappable TX/RX pin configuration
▬ Separate signal polarity control for transmission and reception
▬ Support a timeout timer for Idle/RX/Break/Calibration timeout detection
▬ Support 4-byte data buffer and 32-bit data register for high speed communication
▬ Received and transmitted data are buffered with DMA capability
▬ Receive baud rate up to 6 Mbit/s
▬ Support auto baud-rate detection and calibration
6.20. SPI
6.20.1. Introduction
The chip provides a high-speed serial peripheral interface (SPI). SPI is a full-duplex, high-speed and
synchronous communication bus with two operation modes: Master mode and Slave mode. SPI clock rate can
be supported up to 24 MHz in Master mode or up to 16 MHz in Slave mode under a 48MHz system clock.
The SPI module builds in the shadow buffer and data register by transmit and receive independently to
7. Application Notes
7.1. Power Supply Circuit
To have the chip work with power supply varying from 1.8V to 5.5V, adding some external decoupling and
bypass capacitors is necessary, as shown in following figure.
(close chip)
(close chip)
10uF 0.1uF 0.1uF 4.7uF
Ground
VSS
Megawin MCU
VDD VDD
(optional)
10uF 0.1uF
47K RExT (Internal (Internal
(optional)
RSTN RSTN
4.7uF CExT
VSS VSS
R1
OSC_OUT
C1 (optional)
(Internal
Crystal
Rf feedback
resister)
C2
(close chip) OSC_IN
C1/C2 = 10~33pF
R1 : drive limit resister Megawin MCU
The following table lists the suggested C1 & C2 value for the different frequency crystal application. Refer
the capacitor load value in Xtal manufacture specification for the final matching capacitor of C1 & C2.
MCU
C
VREF+
(close chip)
(R/C decide by
application)
MCU
8. Electrical Characteristics
8.1. Parameter Glossary
Table 8-1. Parameter Glossary
8.3. DC Characteristics
Table 8-3. DC Characteristics
VDD=5.0V±10%, VSS=0V, TA = 25 °C and execute NOP for each CPU cycle (unless otherwise specified)
Limits
Symbol Parameter Conditions Unit
Min Typ Max
Input/Output Characteristics
VIH Input High voltage Except RSTN,XIN/XOUT pins 2.4 Volt
VIH_XOSC Input High voltage (XIN) XIN pin GPIO mode 3 Volt
VIL Input Low voltage Except RSTN,XIN/XOUT pins 1.2 Volt
VIL_XOSC Input Low voltage (XIN) XIN pin GPIO mode 1.3 Volt
IIH Input High Leakage current VPIN = VDD 0 0.1 uA
Logic 0 input current (quasi-bidirectional
IIL1 0 0.001 uA
mode or input mode with on-chip pull-up
Limits
Parameter Conditions Unit
Min Typ Max
Supply Voltage 1.8 5.0 5.5 Volt
Input Clock Frequency Range TA = -40℃ to +105℃ 5 (*1) 7 (*1) MHz
PLL Locking Time TA = -40℃ to +105℃ 4 (*2) us
PLL Power Consumption TA = +25℃, VDD=5.0V 0.45 mA
CTL='10
PLL Peak-Peak Jitter 500 1000 pS
TA = -40℃ to +105℃
(*1) Data guaranteed by design, not tested in production.
(*2) Data based on characterization results, not tested in production.
Limits
Parameter Conditions Unit
Min Typ Max
Supply Voltage 1.8 5.0 5.5 Volt
IHRCO0 Frequency TA = +25℃ 12 MHz
IHRCO1 Frequency TA = +25℃ 11.0592 MHz
IHRCO0 Frequency Deviation TA = +25℃ -1.0 +1.0 %
(factory calibrated) TA = -40℃ to +105℃ -2.0(*1) +2.0(*1) %
IHRCO1 Frequency Deviation TA = +25℃ -1.0 +1.0 %
(factory calibrated) TA = -40℃ to +105℃ -2.0(*1) +2.0(*1) %
IHRCO Start-up Time TA = 25℃ 6(*1) us
IHRCO Power Consumption TA = +25℃, VDD=5.0V 0.35 mA
(*1) Data based on characterization results, not tested in production.
Limits
Parameter Conditions Unit
Min Typ Max
Supply Voltage 1.8 5.0 5.5 Volt
ILRCO Frequency TA = +25℃ 32 KHz
ILRCO Frequency Deviation TA = +25℃, VDD=5.0V -8 +8 %
(factory calibrated) TA = -40℃ to +105℃ -15(*1) +15(*1) %
ILRCO Power Consumption TA = +25℃, VDD=5.0V 5 uA
(1) Data based on characterization results, not tested in production.
Limits
Symbol Parameter Conditions Unit
Min Typ Max
Supply Range
VDDA PWR Source Voltage 2.7 5.0 5.5 Volt
DC Characteristics
VDDA=5.0V, VIN= VDDA/2; VOUT=VDDA/2
GAIN<5:0>=00000b, Gain=x1
I_Q Ground Current 1050 uA
(RFB=120KΩ current Not included when
Gain=x1)
AC Characteristics
UGF PGA Bandwidth Frequency (*1) Normal Operation 10 MHz
(*1) The UGF will be divided by the GAIN setting. (ex: Ideal UGF will be 10MHz/4 when PGA gain=4)
9. Package Dimension
9.1. LQFP-48
Symbols Dimensions in mm
Min. Mom. Max.
A --- --- 1.60
A1 0.05 --- 0.15
A2 1.35 1.40 1.45
b 0.17 0.22 0.27
c 0.09 --- 0.20
D 9.00 BSC
D1 7.00 BSC
E 9.00 BSC
E1 7.00 BSC
e 0.50 BSC
L 0.45 0.60 0.75
L1 1.00 REF
ɵ 0° 3.5° 7°
Symbols Dimensions in mm
JEDEC MO-220
PKG WQFN(X532)
Symbols Min. Nom. Max.
A 0.70 0.75 0.80
A1 0.00 0.02 0.05
A3 0.203 REF.
b 0.18 0.25 0.30
D 5.00 BSC
E 5.00 BSC
e 0.50 BSC
L 0.35 0.40 0.45
K 0.20 ---- ----
E2 D2 LEAD FINISH
JEDEC
Min. Nom. Max. Min. Nom. Max. Pure
PAD SIZE PPF CODE
Tin
114x114MIL 2.60 2.70 2.75 2.60 2.70 2.75 X V W(V)HHD-2
134x134MIL 3.10 3.20 3.25 3.10 3.20 3.25 V V W(V)HHD-2
153x153MIL 3.15 3.25 3.30 3.15 3.25 3.30 V V W(V)HHD-5
Unit mm inch
Symbols Min. Nom. Max. Min. Nom. Max.
A ---- ---- 1.20 ---- ---- 0.047
A1 0.05 ---- 0.15 0.001 ---- 0.005
A2 0.80 0.90 1.05 0.031 0.035 0.041
b 0.19 ---- 0.30 0.007 ---- 0.011
C 0.09 ----- 0.20 0.003 ----- 0.007
D 6.40 6.50 6.60 0.251 0.255 0.259
E1 4.30 4.40 4.50 0.169 0.173 0.177
E 6.40 BSC 0.251 BSC
e 0.65 BSC 0.025 BSC
L1 1.00 REF 0.039 REF
L 0.50 0.60 0.75 0.019 0.023 0.029
S 0.20 ---- ---- 0.007 ---- ----
ɵ 0° ---- 8° 0° ---- 8°
4 Remove “Octal SPI mode with bidirectional data transfer” function for SPI module. 6.20.2
Add UART synchronous mode (SPI master mode) timing electrical in “Table 8-14. UART
5 8.14
Characteristics”.
Revision V1.00 (2019_0614) Chapter
1 Released version.
1 Initial version
11. Disclaimers
Herein, Megawin stands for “Megawin Technology Co., Ltd.”
Life Support — This product is not designed for use in medical, life-saving or life-sustaining applications, or
systems where malfunction of this product can reasonably be expected to result in personal injury. Customers
using or selling this product for use in such applications do so at their own risk and agree to fully indemnify
Megawin for any damages resulting from such improper use or sale.
Right to Make Changes — Megawin reserves the right to make changes in the products - including circuits,
standard cells, and/or software - described or contained herein in order to improve design and/or performance.
When the product is in mass production, relevant changes will be communicated via an Engineering Change
Notification (ECN).