Ds Mm32spin05x Q en
Ds Mm32spin05x Q en
MM32SPIN05x
Version: 1.23_q
MindMotion reserves the right to change the relevant information without prior notification.
Content
1 General Introduction 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Product Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Specification 3
2.1 Device contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
® ®
2.2.1 Arm Cortex M0 with embedded flash memory and SRAM . . . . . . . . . . . . . . . . . 4
2.2.2 Embedded flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2.3 Embedded SRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2.4 Nested vectored interrupt controller (NVIC) . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2.5 Extended interrupt/event controller (EXTI) . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2.6 Clocks and startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2.7 Boot modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.8 Power supply schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.9 Power supply supervisors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.10 Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.11 Lowpower modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.12 Direct memory access controller (DMA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.13 Timers and watchdogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.14 Universal asynchronous receiver/transmitter (UART) . . . . . . . . . . . . . . . . . . . . . 11
2.2.15 I2C interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.16 Serial peripheral interface (SPI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.17 Generalpurpose inputs/outputs (GPIO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.18 Analogtodigital converter (ADC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2.19 Hardware Dvision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2.20 Temperature sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2.21 Serial wire debug port (SWDP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2.22 Comparator (COMP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3 Pin definition 14
4 Memory mapping 24
5 Electrical characteristics 26
5.1 Test condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.1.1 Typical value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.1.2 Typical curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.1.3 Load capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.1.4 Pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.1.5 Power scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.1.6 Current consumption measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.2 Absolute maximum rating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.3 Operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.3.1 General operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
1
5.3.2 Thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.3.3 Operating conditions at powerup/powerdown . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.3.4 Embedded reset and power control block characteristics . . . . . . . . . . . . . . . . . . . 30
5.3.5 Supply current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.3.6 External clock source characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.3.7 Internal clock source characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.3.8 Memory characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.3.9 EMC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.3.10 Absolute Maximum (Electrical Sensitivity) . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.3.11 I/O port characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.3.12 NRST pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.3.13 Timer characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.3.14 Communication interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.3.15 12bit ADC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.3.16 Temperature sensor characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.3.17 Comparator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
6 Package information 57
6.1 Packaging LQFP48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
6.2 LQFP32 Package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6.3 Packaging QFN32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6.4 QFN20 Package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.5 TSSOP20 Package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
7 Ordering information 67
8 Revision history 68
2
List of Figures
1 Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Clock tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3 LQFP48 packet pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4 LQFP32 packet pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5 QFN32 packet pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
6 QFN20 packet pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
7 TSSOP20 packet pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
8 Load condition of the pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
9 Pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
10 Power scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
11 Current consumption measurement scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
12 Typical current consumption in standby mode vs. temperature at VDD = 3.3V . . . . . . . . . . . . 32
13 Typical current consumption in stop mode vs. temperature at VDD = 3.3V . . . . . . . . . . . . . . 33
14 Highspeed external clock source AC timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . 35
15 Typical application with an 8 MHz crystal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
16 I/O AC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
17 Recommended NRST pin protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
18 I2C bus AC waveform and measurement circuit(1) . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
19 SPI timing diagramslave mode and CPHA = 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
20 SPI timing diagramslave mode and CPHA = 1(1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
21 SPI timing diagrammaster mode(1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
22 Typical connection diagram using the ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
23 Power supply and reference power supply decoupling circuit . . . . . . . . . . . . . . . . . . . . . 55
24 LQFP48 48pin lowprofile quad square flat package . . . . . . . . . . . . . . . . . . . . . . . . . 57
25 LQFP32 32pin lowprofile quad flat package outline . . . . . . . . . . . . . . . . . . . . . . . . . 59
26 QFN32 32pin quad flat noleads package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
27 QFN20 20pin quad flat noleads package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
28 TSSOP20 20lead thin shrink small outline package outline . . . . . . . . . . . . . . . . . . . . . 65
29 Ordering information scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3
List of Tables
1 MM32SPIN05x device features and peripheral counts . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Low power mode list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 Timer feature comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4 Pin definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5 Alternate functions for PA port AF0AF7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6 Alternate functions for PB port AF0AF7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
7 Alternate functions for PC port AF0AF7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
8 Alternate functions for PD port AF0AF7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
9 Memory mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
10 Voltage characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
11 Current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
12 General operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
13 Package thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
14 Operating conditions at powerup/powerdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
15 Embedded reset and power control block characteristics . . . . . . . . . . . . . . . . . . . . . . . 31
16 Typical and maximum current consumption in stop and standby modes(2) . . . . . . . . . . . . . . 32
17 Typical current consumption in Run mode, code executing from Flash . . . . . . . . . . . . . . . . 33
18 Typical current consumption in sleep mode, code executing from Flash . . . . . . . . . . . . . . . 34
19 Onchip peripheral current consumption(1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
20 Highspeed external user clock characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
21 HSE 8∼ 24 oscillator characteristics(1)(2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
22 HSI oscillator characteristics(1)(2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
23 LSI oscillator characteristics(1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
24 Lowpower mode wakeup timings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
25 Flash memory characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
26 Flash memory endurance and data retention(1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
27 EMS characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
28 MCU ESD characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
29 I/O static characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
30 Output voltage characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
31 I/O AC characteristics(1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
32 NRST pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
33 TIMx(1) characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
34 I2C characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
35 SPI characteristics(1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
36 ADC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
37 Maximum RAIN at fADC = 15MHz(1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
38 ADC Accuracy Limit Test Conditions(1)(2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
39 Temperature sensor characteristics(3)(4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
40 Comparator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
41 LQFP48 size description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
42 LQFP32 size description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
4
43 QFN32 size description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
44 QFN20 size description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
45 TSSOP20 size description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
46 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5
General Introduction
DS_MM32SPIN05x_q_Ver1.23
1 General Introduction
General Introduction
1.1 Introduction
This product incorporates a high performance 32bit microcontroller with the core of Arm®
Cortex® M0. The highest operating frequency is up to 72MHz, with builtin highspeed
memory, a rich set of I/O ports and peripherals connected to the external bus. This product
contains one 12bit ADC, one comparator, one 16bit generalpurpose timer, one 32bit
generalpurpose timer, three 16bit basic timers, one 16bit advanced timer, and standard
communication interfaces, including one I2C, two SPI and two UART interfaces.
The device works between 2.0V to 5.5V range. The regular temperature for the device is
40◦ C to +85◦ C and 40◦ C to +105◦ C extended temperature range are also available. A
comprehensive set of powersaving mode allows the design of lowpower applications.
The devices are available in 5 different packages: LQFP48, LQFP32, QFN32, QFN20
and TSSOP20.
The abundant peripherals make this microcontroller suitable for a variety of applications:
www.mm32mcu.com 1/68
General Introduction
DS_MM32SPIN05x_q_Ver1.23
www.mm32mcu.com 2/68
Specification
DS_MM32SPIN05x_q_Ver1.23
2 Specification
Specification
General purpose
4 4 4 4
(16 bit)
Timers
General purpose
1 1 1 1
(32 bit)
Advanced
1 1 1 1
control
UART 2 2 2 2
Common
I2C 1 1 1 1
interfaces
SPI 2 1 1 1
GPIOs 39 25 27 16
12bit Number 1 1 1 1
ADC Channel 13 13 13 9
Comparators 1
CPU frequency 72 MHz
Operating voltage 2.0V ∼ 5.5V
Packages LQFP48 LQFP32 QFN32 QFN20/TSSOP20
www.mm32mcu.com 3/68
Specification
DS_MM32SPIN05x_q_Ver1.23
System
CPU
AHB SRAM
Bus Matrix
DMA
DMA
DMA request
444076
2.2 Summary
2.2.1 Arm® Cortex® M0 with embedded flash memory and SRAM
The Arm® Cortex® M0 processor is configurable and has multilevel pipeline 32bit reduced
instruction set processor, and characterized by high performance and low power consump
tion.
www.mm32mcu.com 4/68
Specification
DS_MM32SPIN05x_q_Ver1.23
grammable priorities.
This module provides flexible interrupt management with minimal interrupt latency.
Multiple prescalers are used to configure AHB frequency and highspeed APB (APB2 and
APB1) domain. The maximum frequency of AHB and highspeed APB is 72MHz. Please
refer to the clock drive diagram in figure 2.
www.mm32mcu.com 5/68
Specification
DS_MM32SPIN05x_q_Ver1.23
The boot loader is stored in the system memory, and can reprogram the flash by UART1
www.mm32mcu.com 6/68
Specification
DS_MM32SPIN05x_q_Ver1.23
Additionally, the device features an embedded programmable voltage detector (PVD) that
monitors the VDD /VDDA power supply and compares it to the threshold VPVD . When VDD is
below or above the threshold VPVD , an interrupt can be generated. The interrupt handler
will send a warning message or switch the microcontroller to the safe mode. The PVD
function should be enabled by a program.
www.mm32mcu.com 7/68
Specification
DS_MM32SPIN05x_q_Ver1.23
Sleep mode
In the Sleep mode, only the CPU stops working. All peripherals continue to operate and
can wake up the CPU when an interrupt/event occurs.
Stop mode
The Stop mode minimizes the power consumption while retaining the content of SRAM
and registers. The HSI oscillator and HSE crystal oscillator are also shut down in the
Stop mode. The microcontroller can be woken up from the Stop mode by any of the EXTI
signals. The EXTI signal can be a wakeup signal from one of the 16 external I/O ports
and the output of the PVD.
Standby mode
The Standby mode can minimize the power consumption of the system. In the Standby
mode, the voltage regulator turns off when the CPU is in the deep sleep mode. The entire
1.5V power supply domain is disconnected. HSI and HSE oscillators are also turned
off. They can be woken up by the rising edge of WKUP pin, external reset of NRST pin
and IWDG reset. They also can be woken up by the watchdog timer without reset. The
contents of SRAM and registers will be lost.
Each channel has dedicated hardware DMA request logic, with support for software trigger
on each channel. The length, the source address and the destination address of the
transfer can be set separately by the software.
The DMA can be used with major peripherals: UART, I2C, SPI, ADC and generalpurpose,
basic, advanced control timer TIMx.
The following table compares the functions of advanced control timer, generalpurpose
timer and basic timer:
www.mm32mcu.com 8/68
Specification
DS_MM32SPIN05x_q_Ver1.23
• Input capture
• Output compare
• PWM generation (edge or center alignment mode)
• Single pulse output
If configured as a 16bit generalpurpose timer, it has the same features as a TIM2 timer.
If configured as a 16bit PWM generator, it has full modulation capability (0 ∼ 100%).
In the debug mode, the counter can be frozen and the PWM output is disabled to cut off
the switches controlled by these outputs.
Many features are shared with those of generalpurpose TIM timers which have the same
architecture. The advanced control timer can therefore work together with the TIM timers
via the Timer Link feature for synchronization or event chaining.
www.mm32mcu.com 9/68
Specification
DS_MM32SPIN05x_q_Ver1.23
generalpurpose timer has one 16/32bit autoload up/down counter, one 16bit prescaler
and four independent channels. Each channel can be used for input capture, output com
pare, PWM and single pulse mode output.
The generalpurpose timers can work together with the advanced control timer via the
Timer Link feature for synchronization or event chaining. Their counters can be frozen in
the debug mode. Any of the generalpurpose timer can be used to produce PWM outputs.
Each timer has independent DMA request mechanism.
These timers can also handle signals from incremental encoders and digital outputs from
1∼ 4 Hall sensors. Each timer can produce PWM outputs, or be seen as a simple time
reference.
Basic timer
TIM14
This timer is based on a 16bit autoreload upcounter and a 16bit prescaler. TIM14 fea
tures one single channel for input capture/output compare, PWM or onepulse mode out
put. Its counter can be frozen in debug mode.
TIM16/TIM17
Every timer is based on a 16bit autoreload upcounter and a 16bit prescaler. They
each have a single channel for input capture/output compare, PWM or onepulse mode
output. TIM16 and TIM17 have a complementary output with dead time generation and
independent DMA request generation. Their counters can be frozen in debug mode.
www.mm32mcu.com 10/68
Specification
DS_MM32SPIN05x_q_Ver1.23
SysTick timer
This timer is dedicated to realtime operating systems, but could also be used as a stan
dard downcounter. It features:
• A 24bit downcounter
• Autoreload capability
• Maskable system interrupt generation when the counter reaches 0
• Programmable clock source
Compatible with ISO7816 smart card mode. The UART interface supports output data
lengths of 5 bits, 6 bits, 7 bits, 8 bits, and 9 bits.
If required, the peripheral function of the I/O pins can be locked following a specific se
quence in order to avoid spurious writing to the I/O registers.
www.mm32mcu.com 11/68
Specification
DS_MM32SPIN05x_q_Ver1.23
The analog watchdog function allows to monitor one or all selected channels precisely.
An interrupt will occur when the monitored signal exceeds a preset threshold.
Events generated by generalpurpose timers (TIMx) and the advanced control timer can
be cascaded internally to the trigger of the ADC respectively. The application can syn
chronize the ADC conversion with the clock.
Each time the divisor register is written, the division operation is automatically triggered.
After the operation is completed, the result is written to the quotient and remainder regis
ters. If the reader register, remainder register, or status register is read before the end,
the read operation is suspended until the end of the operation.
www.mm32mcu.com 12/68
Specification
DS_MM32SPIN05x_q_Ver1.23
www.mm32mcu.com 13/68
Pin definition
DS_MM32SPIN05x_q_Ver1.23
3 Pin definition
11
BOOT0
PA15
PA14
VDD
VSS
PB9
PB8
PB7
PB6
PB5
PB4
PB3
48
47
46
45
44
43
42
41
40
39
38
37
NC 1 36 PD3
PC13 2 35 PD2
PC14 3 34 PA13
PC15 4 33 PA12
PD0-OSC_IN 5 32 PA11
PD1-OSC_OUT 6
LQFP48 31 PA10
nRST 7 30 PA9
VSSA 8 29 PA8
VDDA 9 28 PB15
PA0-WKUP 10 27 PB14
PA1 11 26 PB13
PA2 12 25 PB12
13
14
15
16
17
18
19
20
21
22
23
24
VSS
VDD
PA3
PA4
PA5
PA6
PA7
PB0
PB1
PB2
PB10
PB11
485629
www.mm32mcu.com 14/68
Pin definition
DS_MM32SPIN05x_q_Ver1.23
BOOT0-PB8
PA15
VSS
PB7
PB6
PB5
PB4
PB3
29
27
26
25
31
30
28
32
VDD 1 24 PA14
PD0-OSC_IN 2 23 PA13
PD1-OSC_OUT 3 22 PA12
nRST 4 21 PA11
LQFP32
VDDA 5 20 PA10
PA0-WKUP 6 19 PA9
PA1 7 18 PA8
PA2 8 17 VDD
10
11
12
13
14
15
16
9
PA3
PA4
PA5
PA6
PA7
PB0
PB1
VSS
580827
www.mm32mcu.com 15/68
Pin definition
DS_MM32SPIN05x_q_Ver1.23
BOOT0
PA15
PB 5
PB 6
PB 4
PB 3
PB7
PB8
32
31
30
29
28
27
26
25
VDD 1 24 PA14
PD0-OSC_IN 2 23 PA13
PD1-OSC_OUT 3 22 PA12
nRST 4 21 PA11
QFN32
VDDA 5 20 PA10
Exposed Pad PA9
PA0-WKUP 6 19
PA1 7 18 PA8
PA2 8 17 VDD
10
11
12
13
14
15
16
9
PA3
PA4
PA5
PA6
PA7
PB0
PB1
PB2
VSS
633802
PB6
PB4
PB3
PA6
20
19
18
17
16
nRST 1 15 PA14
PD0-OSC_IN 2 14 PA13
3
QFN20 13
PD1-OSC_OUT PB14
4 12
VSSA-VSS
- PB13
VCap 5 11 PB1
10
6
9
PA0-WKUP
PA5
VDD-VDDA
PA4
PB0
440673
www.mm32mcu.com 16/68
Pin definition
DS_MM32SPIN05x_q_Ver1.23
PB6 PB4
PB7 PB3
PA6 PA14
nRST PA13
PD0-OSC_IN PB14
TSSOP20
PD1-OSC_OUT PB13
VSSA-VSS PB1
VCAP PB0
VDD-VDDA PA5
PA0-WKUP PA4
628555
Annotate: VCap should be setted to float or connect to ground with 0.1uF0.01uF capacitor.
www.mm32mcu.com 17/68
Pin definition
DS_MM32SPIN05x_q_Ver1.23
Pin number
I/O Main Alternate Additional
LQFP LQFP QFN TSSOP QFN Pin name Type(1)
(2)
level function functions functions
48 32 32 20 20
UART2_RTS/ ADC1_VIN[1]/
11 7 7 PA1 I/O TC PA1
TIM2_CH2 COMP1_INP[0]
UART2_TX/
ADC1_VIN[2]/
12 8 8 PA2 I/O TC PA2 TIM2_CH3/
COMP1_INP[1]
SPI2_NSS
UART2_RX/ ADC1_VIN[3]/
13 9 9 PA3 I/O TC PA3
TIM2_CH4 COMP1_INP[2]
SPI1_NSS/
TIM1_BKIN/ ADC1_VIN[4]/
14 10 10 11 8 PA4 I/O TC PA4
TIM14_CH1/ COMP1_INP[3]
I2C1_SDA
SPI1_SCK/
TIM2_CH1_ETR/
ADC1_VIN[5]/
15 11 11 12 9 PA5 I/O TC PA5 TIM1_ETR/
COMP1_INM[0]
I2C1_SCL/
TIM1_CH3N
SPI1_MISO/
TIM3_CH1/
TIM1_BKIN/
UART2_RX/ ADC1_VIN[6]/
16 12 12 3 20 PA6 I/O TC PA6
TIM1_ETR/ COMP1_INM[1]
TIM16_CH1/
TIM1_CH3/
COMP1_OUT
SPI1_MOSI/
TIM3_CH2/
TIM1_CH1N/
ADC1_VIN[7]/
17 13 13 PA7 I/O TC PA7 TIM14_CH1/
COMP1_INM[2]
TIM17_CH1/
TIM1_CH2N/
TIM1_CH3N
TIM3_CH3/
TIM1_CH2N/
18 14 14 13 10 PB0 I/O TC PB0 ADC1_VIN[8]
TIM1_CH1N/
TIM1_CH3
www.mm32mcu.com 18/68
Pin definition
DS_MM32SPIN05x_q_Ver1.23
Pin number
I/O Main Alternate Additional
LQFP LQFP QFN TSSOP QFN Pin name Type(1)
(2)
level function functions functions
48 32 32 20 20
TIM14_CH1/
TIM3_CH4/
TIM1_CH3N/
TIM1_CH4/
19 15 15 14 11 PB1 I/O TC PB1 ADC1_VIN[9]
TIM1_CH2N/
MCO/
TIM1_CH2/
TIM1_CH1N
20 16 PB2 I/O FT PB2
I2C1_SCL/
21 PB10 I/O FT PB10 TIM2_CH3/
SPI2_SCK
I2C1_SDA/
22 PB11 I/O FT PB11
TIM2_CH4
23 16 0 7 4 VSS S VSS
24 17 17 9 6 VDD S VDD
SPI2_NSS/
SPI2_SCK/
25 PB12 I/O FT PB12 TIM1_BKIN/
SPI2_MOSI/
SPI2_MISO
SPI2_SCK/
SPI2_MISO/
TIM1_CH1N/
SPI2_NSS/
26 15 12 PB13 I/O FT PB13
SPI2_MOSI/
I2C1_SCL/
TIM1_CH3N/
TIM2_CH1
SPI2_MISO/
SPI2_MOSI/
TIM1_CH2N/
SPI2_SCK/
27 16 13 PB14 I/O FT PB14
SPI2_NSS/
I2C1_SDA/
TIM1_CH3/
TIM1_CH1
www.mm32mcu.com 19/68
Pin definition
DS_MM32SPIN05x_q_Ver1.23
Pin number
I/O Main Alternate Additional
LQFP LQFP QFN TSSOP QFN Pin name Type(1)
(2)
level function functions functions
48 32 32 20 20
SPI2_MOSI/
SPI2_NSS/
TIM1_CH3N/
28 PB15 I/O FT PB15 SPI2_MISO/
SPI2_SCK/
TIM1_CH2N/
TIM1_CH2
MCO/
TIM1_CH1/
29 18 18 PA8 I/O FT PA8
TIM1_CH2/
TIM1_CH3
UART1_TX/
TIM1_CH2/
UART1_RX/
30 19 19 PA9 I/O FT PA9 I2C1_SCL/
MCO/
TIM1_CH1N/
TIM1_CH4
TIM17_BKIN/
UART1_RX/
TIM1_CH3/
31 20 20 PA10 I/O FT PA10 UART1_TX/
I2C1_SDA/
TIM1_CH1/
SPI2_SCK
UART1_CTS/
SPI2_MOSI/
32 21 21 PA11 I/O FT PA11 TIM1_CH4/
I2C1_SCL/
COMP1_OUT
UART1_RTS/
TIM1_ETR/
33 22 22 PA12 I/O FT PA12 SPI2_MISO/
I2C1_SDA/
TIM1_CH2
www.mm32mcu.com 20/68
Pin definition
DS_MM32SPIN05x_q_Ver1.23
Pin number
I/O Main Alternate Additional
LQFP LQFP QFN TSSOP QFN Pin name Type(1)
(2)
level function functions functions
48 32 32 20 20
SWDIO/
SPI2_MISO/
34 23 23 17 14 PA13 I/O FT PA13 MCO/
TIM1_CH2/
TIM1_BKIN
35 PD2 I/O FT PD2
36 PD3 I/O FT PD3
SWDCLK/
37 24 24 18 15 PA14 I/O FT PA14 UART2_TX/
SPI1_NSS
SPI1_NSS/
38 25 25 PA15 I/O FT PA15 UART2_RX/
TIM2_CH1_ETR
SPI1_SCK/
TIM2_CH2/
UART1_TX/
39 26 26 19 16 PB3 I/O TC PB3 ADC1_VIN[10]
TIM2_CH3/
TIM1_CH1/
TIM2_CH1
SPI1_MISO/
TIM3_CH1/
UART1_RX/
40 27 27 20 17 PB4 I/O TC PB4 ADC1_VIN[11]
TIM17_BKIN/
TIM1_CH2/
TIM2_CH2
SPI1_MOSI/
TIM3_CH2/
TIM16_BKIN/
41 28 28 PB5 I/O FT PB5
MCO/
TIM1_CH3/
TIM2_CH3
UART1_TX/
I2C1_SCL/
42 29 29 1 18 PB6 I/O FT PB6
TIM16_CH1N/
TIM2_CH1
www.mm32mcu.com 21/68
Pin definition
DS_MM32SPIN05x_q_Ver1.23
Pin number
I/O Main Alternate Additional
LQFP LQFP QFN TSSOP QFN Pin name Type(1)
(2)
level function functions functions
48 32 32 20 20
UART1_RX/
I2C1_SDA/
43 30 30 2 19 PB7 I/O TC PB7 ADC1_VIN[12]
TIM17_CH1N/
UART2_TX
44 31 31 BOOT0 I FT BOOT0
I2C1_SCL/
45 31 32 PB8 I/O FT PB8 TIM16_CH1/
UART2_RX
I2C1_SDA/
TIM17_CH1/
46 PB9 I/O FT PB9
TIM1_CH4/
SPI2_NSS
47 32 0 4 VSS S VSS
48 1 1 6 VDD S VDD
1.5V
8 5 VCap S regulator
capacitor
www.mm32mcu.com 22/68
Pin definition
DS_MM32SPIN05x_q_Ver1.23
Pin
AF0 AF1 AF2 AF3 AF4 AF5 AF6 AF7
Name
PA11 UART1_CTS TIM1_CH4 SPI2_MOSI I2C1_SCL COMP1_OUT
PA12 UART1_RTS TIM1_ETR SPI2_MISO I2C1_SDA TIM1_CH2
PA13 SWDIO SPI2_MISO MCO TIM1_CH2 TIM1_BKIN
PA14 SWDCLK UART2_TX SPI1_NSS
TIM2_CH1
PA15 SPI1_NSS UART2_RX
_ETR
www.mm32mcu.com 23/68
Memory mapping
DS_MM32SPIN05x_q_Ver1.23
4 Memory mapping
Memory mapping
www.mm32mcu.com 24/68
Memory mapping
DS_MM32SPIN05x_q_Ver1.23
www.mm32mcu.com 25/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
5 Electrical characteristics
Electrical characteristics
C = 50 pF
230907
www.mm32mcu.com 26/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
VIN
984785
VCAP
VDD
VDD
1/2/3
Regulator
IO (CPU, Digital
GP I/Os & Memories)
IN Logic
5x100nF VSS
+1x4.7µF 1/2/3
VDD
VDDA
10nF Analog:
+1µF $'& RC, PLL, COMP ...
VSSA
782609
www.mm32mcu.com 27/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
I DD_VBAT
VBAT
I DD
VDD
VDDA
738329
If the load applied to the device exceeds the value given in the ”Absolute Group Maximum
Ratings” list (Table 10, Table 11), it may result in that the device is permanently damaged.
This is just to give the maximum load that can be tolerated, and does not mean that the
functional operation of the device is correct under these conditions. Longterm operation
of the device under maximum conditions can affect device reliability.
1. All power (VDD , VDDA ) and ground (VSS , VSSA ) pins must always be connected to the
external power supply within the permissible range.
2. VIN maximum must always be respected. For information about the maximum allowed
injected current values, please see the table below.
IVDD Total current into VDD /VDDA power lines (supply current) (1) 120
mA
www.mm32mcu.com 28/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
IVSS Total current out of VSS wire (outflow current) (1) 120
Output sink current on any I/O and control pins 20
IIO
Output current on any I/O and control pins 18
(2)(3)
IINJ(PIN) Injection current on NRST pin ±5 mA
Injection current on OSC_IN pin of HSE and OSC_IN pin
IINJ(PIN) (2)(3) ±5 mA
LSE
IINJ(PIN) (2)(3) injection current on other pins (4) ±5 mA
Σ IINJ(PIN) (4) Total injection current on all I/O and control pins (4) ±25 mA
1. All main power (VDD , VDDA ) and ground (VSS , VSSA ) pins must always be connected to
the external power supply within the permissible range.
2. TThis current consumption must be correctly distributed to all I/O and control pins. The
total output current must not be sunk/pulled between two consecutive power pins that
refer to LQFP package with dense pins.
3. The reverse injection current can interfere with the analog performance of the device.
4. A positive injection current is induced by VIN > VDDA while a negative injection current
is induced by VIN < VSS . IINJ(PIN) must never be exceeded.
5. When several inputs are submitted to a current injection, the maximum ΣIINJ(PIN) is the
absolute sum of the positive and negative injected currents (instantaneous values).
1. It is recommended to power VDD and VDDA from the same source. A maximum differ
www.mm32mcu.com 29/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
ence of 300 mV between VDD and VDDA can be tolerated during powerup and opera
tion.
PD max: Total chip power consumption, including the sum of internal and IO power con
sumption
1. All powerups need to start at 0V, to ensure that the chip can be powered up reliably.
www.mm32mcu.com 30/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
1. The product behavior is guaranteed by design down to the minimum value VPOR/PDR .
2. Guaranteed by design, not tested in production.
Note: The reset duration is measured from poweron (POR reset) to the time when the user appli
cation code reads the first instruction.
All Runmode current consumption measurements given in this section are performed with
a reduced code.
www.mm32mcu.com 31/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
Current consumption
The MCU is placed under the following conditions:
• All I/O pins are in analog input mode, and are connected to a static level — VDD or VSS
(no load)
• All peripherals are disabled except when explicitly mentioned
• The Flash memory access time is adjusted to the fHCLK (0 ∼ 24 MHz is 0 waiting period
, 24 ∼ 48 MHz is 1 waiting period, 48 ∼ 72 MHz is 2 waiting periods ).
• The instruction prefetching function is on. When the peripherals are enabled:
fHCLK = fPCLK1 = fPCLK2 .
Note:The instruction prefetching function must be set before setting the clock and bus divider.
Table 16. Typical and maximum current consumption in stop and standby modes(2)
Max(1)
Symbol Parameter Conditions Unit
TA =25◦ C
Supply current in Stop mode Enter the stop mode after reset 6
IDD Supply current in Standby µA
Enter the standby mode after reset 0.4
mode
90
80
70
60
50
40
30
20
10
0
TA = - 40°C TA = 25°C TA = 70°C TA = 105°C
148491
Figure 12. Typical current consumption in standby mode vs. temperature at VDD = 3.3V
www.mm32mcu.com 32/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
90
80
70
60
50
40
30
20
10
0
TA = - 40°C TA = 25°C TA = 70°C TA = 105°C
577187
Figure 13. Typical current consumption in stop mode vs. temperature at VDD = 3.3V
• All I/O pins are in analog input configuration, and are connected to a static level — VDD
or VSS (no load).
• All the peripherals are closed, unless otherwise specified.
• The Flash memory access time is adjusted to the fHCLK (0 ∼ 24 MHz is 0 waiting period
, 24 ∼ 48 MHz is 1 waiting period, 48 ∼ 72 MHz is 2 waiting periods ).
• The ambient temperature and VDD supply voltage conditions are summarized in Ta
ble 12.
• The instruction prefetching function is on. When the peripherals are enabled:
fHCLK = fPCLK1 = fPCLK2 ..
Note: The instruction prefetch function must be set before the clock is set and the bus is divided.
Table 17. Typical current consumption in Run mode, code executing from Flash
Typ(1)
Symbol Parameter Conditions fHCLK All peripherals Unit
All peripherals
disabled
enabled(2)
72MHz 14.4 8.78
Supply current
IDD Internal clock 48MHz 9.57 6.25 mA
in operating mode
8MHz 2.21 1.66
www.mm32mcu.com 33/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
Table 18. Typical current consumption in sleep mode, code executing from Flash
Typ(1)
Symbol Parameter Conditions fHCLK (2) All peripherals Unit
All peripherals
disabled
enabled(2)
72MHz 9.16 3.75
Supply current
IDD Internal clock 48MHz 6.44 2.71 mA
in sleep mode
8MHz 1.66 0.95
• All I/O pins are in analog input mode, and are connected to a static level — VDD or VSS
(no load) .
• All peripherals are disabled except when explicitly mentioned.
• The given value is calculated by measuring the current consumption.
– With all peripherals clocked OFF
– With only one peripheral clocked on
• Ambient operating temperature and supply voltage conditions VDD summarized in Ta
ble 12.
1. fHCLK = 72MHz, fAPB1 = fHCLK /2, fAPB2 = fHCLK , the prescale coefficient for each device
is the default value.
www.mm32mcu.com 34/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
VHSEH
90%
10%
VHSEL
tr(HSE) tf(HSE) tw(HSE) tw(HSE) t
THSE
External Clock IL
Source fHSE_ext OSC_IN
474122
www.mm32mcu.com 35/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
1. The characteristic parameters of the resonator are given by the crystal/ceramic res
onator manufacturer.
2. Drawn from comprehensive evaluation, not tested in production.
3. For CL1 and CL2 , it is recommended to use highquality external ceramic capacitors
in the 5 pF to 25 pF (typical value) range, designed for highfrequency applications.
A suitable crystal or resonator should also be carefully selected. Usually, CL1 and
CL2 have the same parameter. The crystal manufacturer typically specifies a load
capacitance which is the serial combination of CL1 and CL2 . When choosing CL1 and
CL2 , the capacitive reactance of the PCB and MCU pins should be taken into account
(the combined pin and the PCB board capacitance can be roughly estimated as 10pF).
4. The relatively low value of the RF resistor offers a good protection against issues re
sulting from use in a humid environment, due to the induced leakage and the bias
condition change. However, it is recommended to take this point into account if the
MCU is used in tough humidity conditions.
5. tSU(HSE) is the startup time, measured from the moment the software enables HSE to
a stable 8MHz oscillation is obtained. This value is measured for a standard crystal
resonator and it can vary significantly with the crystal manufacturer.
www.mm32mcu.com 36/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
CL1
OSC_IN fHSE
Bias
8MHz RF controlled
resonator gain
REXT OSC_OUT
CL2
*In the sample RF=510KΩ REXT=510Ω
860676
www.mm32mcu.com 37/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
All times are measured using ambient temperature and supply voltage in accordance with
common operating conditions.
1. The wakeup time is measured from the start of the wakeup event to the user program
to read the first instruction.
Flash memory
Table 25. Flash memory characteristics
www.mm32mcu.com 38/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
Endurance
NEND (erase 20000 K cycle
cycles)
Data TA = 105◦ C 20
tRET ◦
Year
retention TA = 25 C 100
• EFT:A Burst of Fast Transient voltage (positive and negative) is applied to VDD and VSS
through a 100 pF capacitor, until a functional disturbance occurs. This test is compliant
with the IEC6100044standard.
Therefore, it is recommended that users apply EMC software optimization and conduct
EMCrelated prequalification tests.
www.mm32mcu.com 39/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
Software recommendations
The software flowchart must include the management of runaway conditions such as:
Prequalification trials
Most of the common failures (unexpected reset and corrupted program counter) can be
reproduced by manually forcing a low level on NRST or a onesecond low level on the
crystal oscillator pins.
During ESD test, a voltage over the range of specification values can be directly applied to
the chip. When unexpected behavior is detected, the software needs to be strengthened
to prevent unrecoverable errors.
Static latchup
Two complementary static tests are required on six parts to assess the latchup perfor
mance:
www.mm32mcu.com 40/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
1. The leakage could be higher than the maximum value, if negative current is injected
on adjacent pins.
2. Pullup and pulldown resistors are MOS.
In the user application, the number of I/O pins which can drive current must be limited to
respect the absolute maximum rating specified in 5.2:
• The sum of the currents obtained from VDD for all I/O ports, plus the maximum operating
current that the MCU obtains on VDD , cannot exceed the absolute maximum rating IVDD .
• The sum of the currents drawn by all I/O ports and flowing out of VSS , plus the maximum
operating current of the MCU flowing out on VSS , cannot exceed the absolute maximum
rating IVSS .
www.mm32mcu.com 41/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
ambient temperature and VDD supply voltage in accordance with the condition of Table 12.
All I/O ports are CMOS compatible.
Table 30. Output voltage characteristics
www.mm32mcu.com 42/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
Input/output AC characteristics
The definitions and values of the input and output AC characteristics are given in figure 16
and Table 31, respectively.
Unless otherwise stated, the parameters listed in Table 31 are measured using the ambient
temperature and supply voltage in accordance with the condition Table 10.
Table 31. I/O AC characteristics(1)
1. The speed of the I/O port can be configured via MODEx[1:0]. See the description of
the GPIO Port Configuration Register in this chip reference manual.
2. The maximum frequency is defined in figure 16.
www.mm32mcu.com 43/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
90% 10%
50% 50%
90%
10%
The external output
Maximum frequency is achieved if ((tr + tf) ≤ 2/3)T, and if the duty cycle is (45 ~ 55%)
when loaded by C/(see the i/O AC characteristics definition)
868304
www.mm32mcu.com 44/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
(1)
External reset circuit VDD VDD
100kΩ RPU
NRST(2) Internal reset
Filter
1µF
368560
For details on the characteristics of the I/O multiplexing function pins (output compare,
input capture, external clock, PWM output) , see subsubsec 5.3.11.
www.mm32mcu.com 45/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
1 tTIMxCLK
tres(TIM) Timer resolution time
fTIMxCLK =
41.6 nS
24MHz
Timer external clock 0 fTIMxCLK
fEXT MHz
frequency on CH1 to CH4 fTIMxCLK =
0 24
24MHz
ResTIM Timer resolution 16 Bit
16bit counter clock cycle 1 65536 tTIMxCLK
tCOUNTER
when the internal clock is selected fTIMxCLK 24MHz 0.0417 2732 µS
65536 × 65536 tTIMxCLK
tMAX_COUNT The maximum possible count
fTIMxCLK 24MHz 178.9 S
The I2C interface conforms to the standard I2C communication protocol, but has the fol
lowing limitations: SDA and SCL are not true pins. When configured as opendrain output,
the PMOS transistor between the pin and VDD Was closed but still exists.
The I2C I/Os characteristics are listed in Table 34, the alternate function characteristics of
I/Os (SDA and SCL) refer to subsubsec 5.3.11.
Table 34. I2C characteristics
Standard I2C(1) Fast I2C (1)(2)
Symbol Parameter Unit
Min Max Min Max
tw(SCLL) SCL clock low time 4.7 1.3 µs
tw(SCLH) SCL clock high time 4.0 0.6 µs
tsu(SDA) SDA setup time 250 100
th(SDA) SDA data hold time 0(3) 0(4) 900(3)
ns
tr(SDA) tr(SDL) SDA and SCL rise time 1000 2.0+0.1Cb 300
tf(SDA) tf(SDL) SDA and SCL fall time 300 300
th(STA) Start condition hold time 4.0 0.6
tsu(STA) Start condition setup time 4.7 0.6
tsu(STO) Stop condition setup time 4.0 0.6 µs
Time from Stop condition to
tw(STO:STA) 4.7 1.3
Start condition
www.mm32mcu.com 46/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
VDD VDD
4.7KΩ 4.7KΩ
100 Ω
SDA
,&EXV 100 Ω
SCL
Start repeated
Start
t su(STA) Start
SDA
t f(SDA) t r(SDA) t su(SDA) t su(STA:STO)
Stop
t h(STA) t w (SCKL) t h(SDA)
SCL
t w (SCKH) t r(SCK) t f(SCK) t su(STO)
澳
130244
SPI characteristics
Unless otherwise specified, the parameters given in Table 35 are derived from tests per
formed under the ambient temperature, fPCLKx frequency and VDD supply voltage condi
tions summarized in Table 12.
Refer to subsubsec 5.3.11 for more details on the input/output alternate function charac
teristics (NSS, SCK, MOSI, MISO).
www.mm32mcu.com 47/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
Master mode 0 36
fSCK 1/tc(SCK) SPI clock frequency MHz
Slave mode 0 18
tr(SCK) SPI clock rise time Load capacitance: C = 30pF 8 ns
tf(SCK) SPI clock fall time Load capacitance: C = 30pF 8 ns
(2)
tsu(NSS) NSS setup time Slave mode 4tPCLK ns
(2)
th(NSS) NSS hold time Slave mode 73 ns
www.mm32mcu.com 48/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
NSS input
tsu(NSS) tc(SCK) th(NSS)
CPHA = 0
SCK input
CPOL = 0
tw(SCKH)
CPHA = 0 tw(SCKL)
CPOL = 1
tv(SO) tr(SCK)
tdis(SO)
th(SO)
ta(SO) tf(SCK)
MISO
OUTPUT MSB OUT BIT6 OUT LSB OUT
tsu(SI)
MOSI MSB IN BIT1 IN LSB IN
INPUT
th(SI)
679527
www.mm32mcu.com 49/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
NSS input
tsu(NSS) tc(SCK) th(NSS)
CPHA =1
SCK input
CPOL = 0
tw(SCKH)
CPHA = 1 tw(SCKL)
CPOL = 1
tv(SO) tr(SCK)
tdis(SO)
ta(SO) th(SO) tf(SCK)
MISO
OUTPUT MSB OUT BIT6 OUT LSB OUT
tsu(SI) th(SI)
MOSI MSB IN BIT1 IN LSB IN
INPUT
429658
www.mm32mcu.com 50/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
High
NSS INPUT
t c(SCK)
CPHA = 0
SCK Output
CPOL = 0
CPHA = 0
CPOL = 1
CPHA = 1
SCK Output
CPOL = 0
CPHA = 1
CPOL = 1
t w (SCKH) t r (SCK)
t su(MI ) t w (SCKL) t f (SCK)
t h(M )
t v(MO ) t h(MO )
184118
www.mm32mcu.com 51/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
Conversion voltage
VAIN (2) VSSA VDDA V
range(3)
External sample
RAIN (2) See Formulas 1 and Table 37 kΩ
and hold capactor
Sampling switch
RADC (2) 1 kΩ
resistance
Internal sample and
CADC (2) 10 pF
hold capacitor
fADC = 15MHz 0.1 16 µs
tS (2) Sampling time
1.5 239.5 1/fADC
(2)
tSTAB Stabilization time 1 µs
Total conversion fADC = 15MHz 1 16.9 µs
tconv (2)
time (including 15 ∼ 253 (sampling tS+ ) stepwise
1/fADC
Sampling time) approximation 13.5
TS
RAIN < − RADC
fADC × C ADC × (N + 3) × In(2)
The formula above (Equation 1) is used to determine the maximum external impedance
allowed for an error below 1/4 of LSB. Here N = 12 (from 12bit resolution) .
www.mm32mcu.com 52/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
1. ADC Accuracy vs Negative Injection Current: Injecting negative current on any of the
standard (nonrobust) analog input pins should be avoided as this significantly reduces
the accuracy of the conversion being performed on another analog input. It is recom
mended to add a Schottky diode (pin to ground) to standard analog pins which may
potentially inject negative current.
Any positive injection current within the limits specified for IINJ(PIN) and ΣIINJ(PIN) in sub
subsec 5.3.12 does not affect the ADC accuracy.
2. Guaranteed by comprehensive evaluation, not tested in production.
ET = Total unadjusted error: The maximum deviation between the actual and ideal trans
mission curves.
EO = Offset error: The deviation between the first actual conversion and the first ideal
conversion.
EG = Gain error: The deviation between the last ideal transition and the last actual transi
tion.
ED = Differential linearity error: The maximum deviation between the actual step and the
ideal value.
EL = Integral linearity error: The maximum deviation between any actual conversion and
the associated line of the endpoint.
www.mm32mcu.com 53/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
Parasi c
capacitance
439454
www.mm32mcu.com 54/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
VDDA
VDDA
1 µF // 10 nF
VSSA
澳
326818
Figure 23. Power supply and reference power supply decoupling circuit
www.mm32mcu.com 55/68
Electrical characteristics
DS_MM32SPIN05x_q_Ver1.23
Register
Symbol Parameter Min Type Max Unit
configuration
HYST Hysteresis 11 90 mV
OFFSET Offset voltage 00 0.091 0.213 0.358 mV
OFFSET Offset voltage 01 3.23 7.51 12.08 mV
OFFSET Offset voltage 10 9.79 15 20.8 mV
OFFSET Offset voltage 11 34.25 47.4 62.22 mV
(1)
DELAY Propagation delay 00 80 nS
(1)
DELAY Propagation delay 01 51 nS
(1)
DELAY Propagation delay 10 26 nS
(1)
DELAY Propagation delay 11 9 nS
(2)
Iq Operating current mean 00 4.5 uA
(2)
Iq Operating current mean 01 4.4 uA
(2)
Iq Operating current mean 10 4.4 uA
(2)
Iq Operating current mean 11 4.4 uA
1. The output flips 50% of the time and the time difference between the input and the flip.
2. Total current consumption, operating current.
www.mm32mcu.com 56/68
Package information
DS_MM32SPIN05x_q_Ver1.23
6 Package information
Package information
A3
A2
A
c
A1
R1
L2
R2
s
K
D L
A1
L1
D1
36 25
37 24
b
E1
E
b
b1
48 13
c1
c
PIN 1
IDENTIFICATION 1 12
591233
www.mm32mcu.com 57/68
Package information
DS_MM32SPIN05x_q_Ver1.23
www.mm32mcu.com 58/68
Package information
DS_MM32SPIN05x_q_Ver1.23
A3
A2
A
c
A1
R1
L2
R2
s
K
L
A1
D
L1
D1
24 17
25 16
b
E1
b
b1
32 9
c1
c
PIN 1
IDENTIFICATION 1 8
989913
www.mm32mcu.com 59/68
Package information
DS_MM32SPIN05x_q_Ver1.23
Millimeters
Symbol
Min Typ Max
D 8.80 9.00 9.20
D1 6.90 7.00 7.10
E 8.80 9.00 9.20
E1 6.90 7.00 7.10
e 0.70 0.80 0.90
H 8.14 8.17 8.20
L 0.50 0.70
L1 1.00REF
R1 0.08
R2 0.08 0.20
S 0.20
θ 0◦ C 3.5◦ C 7◦ C
θ1 11◦ C 12◦ C 13◦ C
θ2 11◦ C 12◦ C 13◦ C
www.mm32mcu.com 60/68
Package information
DS_MM32SPIN05x_q_Ver1.23
A2
D
e A1
A3
C2
R c1
e
E2 b
E1 E
H
1
L
32
L
PIN 1 Identifier
D2
978941
www.mm32mcu.com 61/68
Package information
DS_MM32SPIN05x_q_Ver1.23
MM
Label
Min Typ Max
e 0.5
H 0.30REF
K 0.35REF
L 0.35 0.40 0.45
R 0.09
c1 0.08
c2 0.08
N Number of pins = 32
www.mm32mcu.com 62/68
Package information
DS_MM32SPIN05x_q_Ver1.23
D
A
e A1
A3
K
b
C2
R c1
E2
E
b H
1
L
20
L
PIN 1 Identifier
D2
926545
www.mm32mcu.com 63/68
Package information
DS_MM32SPIN05x_q_Ver1.23
Millimeters
Symbol
Min Typ Max
e 0.30 0.40 0.50
H 0.35REF
K 0.40REF
L 0.25 0.35 0.45
R 0.075
N Number of pins = 20
www.mm32mcu.com 64/68
Package information
DS_MM32SPIN05x_q_Ver1.23
20 11
E1
c
1 10
PIN1
IDENTIFICATION
SEATING
PLANE
aaa C 0.25 mm
C GAUGE PLANE
A A2
k
b e L
A1
L1
618013
Figure 28. TSSOP20 20lead thin shrink small outline package outline
www.mm32mcu.com 65/68
Package information
DS_MM32SPIN05x_q_Ver1.23
Millimeters
Symbol
Min Typ Max
E 6.25 6.40 6.55
E1 4.35 4.40
e 0.55 0.65 0.75
L 0.45 0.60 0.75
L2 0.25BSC
L1 1.0REF
R 0.09
θ1 0◦ C 8◦ C
www.mm32mcu.com 66/68
Ordering information
DS_MM32SPIN05x_q_Ver1.23
7 Ordering information
Ordering information
MM32 SPIN 0 5 N T
Device family
MM32 = Arm-based 32-bit microcontroller
Product type
SPIN = Motor
Sub- family
0 = 0 Series
5 = 32K
Package
P = LQFP
N = QFN
T = TSSOP
Pin count
F = 48 Pins
T = 32 Pins
W = 20 Pins
896243
www.mm32mcu.com 67/68
Revision history
DS_MM32SPIN05x_q_Ver1.23
8 Revision history
Revision history
www.mm32mcu.com 68/68