C bus AC waveforms and measurement circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
not connected to V
REF+
). . . . . . . . . . . . . . 56
DDA
5/64
IntroductionSTM32F101xx
1 Introduction
This datasheet contains the description of the STM32F101xx access line family features,
pinout, Electrical Characteristics, Mechanical Data and Ordering information.
For information on programming, erasing and protection of the internal Flash memory
please refer to the STM32F10x Flash Programming Reference Manual
For information on the Cortex™-M3 core please refer to the Cortex™-M3 Technical
Reference Manual.
2 Description
The STM32F101xx access line family incorporates the high- performance ARM Cortex™-M3
32-bit RISC core operating at a 36 MHz frequency, high-speed embedded memories (Flash
memory up to 128Kbytes and SRAM up to 16 Kbytes), and an extensive ran ge of enhanced
peripherals and I/Os connected to tw o APB bu ses. All de vices off er standard comm unication
interfaces (two I
purpose 16-bit timers.
2
Cs, two SPIs, a nd up to three USARTs), one 12-bit ADC and three g ener al
The STM32F101 family oper at es in the −40 to +85°C temperature range , from a 2.0 to 3. 6 V
power supply. A comprehensive set of power-saving mode allows to design low-power
applications.
The complete STM32F101xx access line family includes devices in 3 different package
types: from 48 pins to 100 pins. Depending on the device chosen, different sets of
peripherals are included, the description below gives an overview of the complete range of
peripherals proposed in this family.
These features make the STM32F101xx access line microcontroller family suitable for a
wide range of applications:
●Application control and user interface
●Medical and handheld equipment
●PC peripherals, gaming and GPS platforms
●Industrial applications: PLC, inverters, printers, and scanners
●Alarm systems, Video intercom, and HVAC
Figure 1 shows the general block diagram of the device family.
6/64
STM32F101xxDescription
2.1 Device overview
Table 2.Device features and peripheral counts (STM32F101xx access line)
CPU frequency36 MHz
Operating voltage2.0 to 3.6 V
Operating temperature-40 to +85 °C
PackagesLQFP48LQFP64LQFP100
7/64
DescriptionSTM32F101xx
2.2 Overview
ARM® CortexTM-M3 core with embedded Flash and SRAM
The ARM Cortex™-M3 processor is the latest generation of ARM processors for embedded
systems. It has been de v eloped t o prov ide a low- cost platform that meets the needs of MCU
implementation, with a reduced pin count and low-power consumption, while delivering
outstanding computational performance and an advanced system response to interrupts.
The ARM Cortex™-M3 32-bit RISC processor features exceptional code-efficiency,
delivering the high-performance expected from an ARM core in the memory size usually
associated with 8- and 16-bit devices.
The STM32F101xx access line family having an embedded ARM core, is therefore
compatible with all ARM tools and software.
Embedded Flash memory
Up to 128 Kbytes of embedded Flash is available for storing programs and data.
Embedded SRAM
Up to 16 Kbytes of embedded SRAM accessed (read/write) at CPU clock speed with 0 wait
states.
Nested vectored interrupt controller (NVIC)
The STM32F101xx access line embeds a nested vectored interrupt controller able to handle
up to 43 maskable interrupt channels (not including the 16 interrupt lines of Cortex™-M3)
and 16 priority levels.
●Interrupt entry vector table address passed directly to the core
●Closely coupled NVIC core interface
●Allows early processing of interrupts
●Processing of late arriving higher priority inte r rupts
●Support for tail-chaining
●Processor state automatically saved
●Interrupt entry restored on interrupt exit with no instruction overhead
This hardware block provides flexible interrupt management features with minimal interrupt
latency.
8/64
STM32F101xxDescription
External interrupt/event controller (EXTI)
The external interrupt/event controller consists of 19 edge detectors lines used to generate
interrupt/event requests. Each line can be independently configured to select the trigger
event (rising edge , falling edge, both) and ca n be mask ed ind ependently. A pending register
maintains the status of the interrupt requests. The EXTI can detect external line with pulse
width lower than the Internal APB2 clock period. Up to 80 GPIOs are connected to the 16
external interrupt lines.
Clocks and startup
System clock selection is performed on startup, however the internal RC 8 MHz oscillator is
selected as default CPU clock on reset. An external 4-16 MHz clock can be selected and is
monitored for failure. During such a scenario, it is disabled and software interrupt
management follo ws . Similarly, full interrupt management of the PLL clock entry is av ailable
when necessary (for example with failure of an indirectly used external oscillator).
Several prescalers allow the configuration of the AHB frequency, the High Speed APB
(APB2) and the low Speed APB (APB1) domains. The maximum frequency of the AHB and
the APB domains is 36 MHz.
Boot modes
At startup, boot pins are used to select one of five boot options:
●Boot from User Flash
●Boot from System Memory
●Boot from SRAM
The boot loader is located in System Memory. It is used to reprogram the Flash memory by
using the USART.
Power supply schemes
●V
●V
●V
= 2.0 to 3.6 V: External power sup ply for I/Os and the internal regulator.
DD
Provided externally through V
, V
SSA
and PLL. In V
BAT
= 2.0 to 3.6 V: External analog power sup plies for ADC, Reset b loc ks , RCs
DDA
range (ADC is limited at 2.4 V).
DD
= 1.8 to 3.6 V: Power supply for RTC, external clock 32 kHz oscillator and backup
registers (through power switch) when V
DD
pins.
is not present.
DD
Power supply supervisor
The device has an integrated power on reset (POR)/power down reset (PDR) circuitry. It is
always active, and ensures proper operation starting from/down to 2 V. The device remains
in reset mode when V
external reset circuit.
The device features an embedded Programmable voltage detector (PVD) that monitors the
V
power supply and compares it to the V
DD
when V
drops below the V
DD
interrupt service routine can then generate a warning message and/or put the MCU into a
safe state. The PVD is enabled by software.
Refer to Table 9: Embedded reset and power control block characteristics for the values of
V
POR/PDR
and V
PVD
is below a specified threshold, V
DD
and/or when VDD is higher than the V
PVD
PVD
.
POR/PDR
, without the need for an
threshold. An interrupt can be generated
threshold. The
PVD
9/64
DescriptionSTM32F101xx
Voltage regulator
The regulator has three operation modes: ma in (M R ), low power (LPR) and power down.
●MR is used in the nominal regulation mode (Run)
●LPR is used in the Stop modes
●Power down is used in Standby Mode: the regulator output is in high impedance: the
kernel circuitry is powered-down, inducing zero consumption (but the contents of the
registers and SRAM are lost)
This regulator is always enabled after RESET. It is disabled in Standby Mode, providing high
impedance output.
Low-power modes
The STM32F101xx access line supports three low-power modes to achieve the best
compromise between low power consumption, short startup time and available wakeup
sources:
●Sleep mode
In Sleep mode, only the CPU is stopped. All peripherals continue to operate and can
wake up the CPU when an interrupt/event occurs.
●Stop mode
Stop mode allows to achieve the lowest po we r consumption while re taining the co ntent
of SRAM and registers. All clocks in the 1.8 V domain are stopped, the PLL, the HSI
and the HSE RC oscillators are disabled. The voltage regulator can also be put either in
normal or in low power mode.
The device can be wok en up from Stop mode by any of the EXTI line. The EXTI line
source can be one of the 16 external lines, the PVD output or the RTC alarm.
●Standby mode
The Standby mode allows to achieve the lo west power consumption. The internal
voltage regulator is switched off so that the entire 1.8 V domain is powered off. The
PLL, the HSI and the HSE RC oscillators are also switched off. After entering Standby
mode, SRAM and registers content are lost except for registers in the Backup domain
and Standby circuitry.
The device exits Standby mode when an external reset (NRST pin), a IWDG reset, a
rising edge on the WKUP pin, or an RTC alarm occurs.
Note:The RTC , the IWDG, and t he corresponding cloc k sources ar e not stopped by e ntering Stop
or Standby mode.
DMA
The flexible 7-channel general-purpose DMA is able to manage memory-to-memory,
peripheral-to-memory and memory-to-peripheral transfers. The DMA controller supports
circular buffer management avoiding the generation of interrupts when the controller
reaches the end of the buffer.
Each channel is connected to dedicated hardware DMA requests, with support for software
trigger on each channel. Configuration is made by software and transfer sizes between
source and destination are independent.
The DMA can be used with the main peripherals: SPI, I
TIMx and ADC.
10/64
2
C, USART, general purpose timers
STM32F101xxDescription
RTC (real-time clock) and backup registers
The RTC and the bac kup registers are supplied through a switch that takes po wer either on
V
supply when present or through the V
DD
can be used to store data when V
power is not present.
DD
pin. The backup registers (ten 16-bit registers)
BAT
The Real-Time Clock provides a set of continuously running counters which can be used
with suitable software to provide a clock calendar function, and provides an alarm interrupt
and a periodic interrupt. It is clocked by an external 32.768 kHz oscillator, the internal low
power RC oscillator or the high-speed external clock divided by 128. The internal low pow er
RC has a typical frequency of 32 kHz. The RTC can be calibrated using an external 512Hz
output to compensate for any natural quartz deviation. The RTC features a 32-bit
programmable counter for long term measurement using the Compare register to generate
an alarm. A 20-bit prescaler is used for the time base clock and is by default configured to
generate a time base of 1 second from a clock at 32.768 kHz.
Independent watchdog
The independent watchdog is based on a 12-bit downcounter and 8-bit prescaler. It is
clocked from an independent 32 kHz internal RC and as it operates independently from the
main clock, it can operate in Stop and Standby modes. It can be used as a watchdog to
reset the device when a problem occurs, or as a free running timer for application time out
management. It is hardware o r software configurable through the option bytes. The counter
can be frozen in debug mode.
Window watchdog
The window watchdog is based on a 7-bit downcounter that can be set as free running. It
can be used as a watchdog to reset the de vice when a prob lem occurs . It is clock ed from the
main clock. It has an early warning interrupt capability and the counter can be frozen in
debug mode.
SysTick timer
This timer is dedicated for OS, but could also be used as a standard down counter. It
features:
●A 24-bit down counter
●Autoreload capability
●Maskable system interrupt generation whe n th e co un te r re ach e s 0.
●Programmable clock source
General purpose timers (TIMx)
There are up to 3 synchronizable standard timers embedded in the STM32F101xx access
line devices. These timers are based on a 16-bit auto-reload up/down counter, a 16-bit
prescaler and feature 4 in dependent channels each f or input captu re, output compa re, PWM
or one pulse mode output. This give s u p to 12 input ca ptur es / o utpu t compar es / PWMs on
the largest packages. They can work together via the Timer Link feature for synchronization
or event chaining.
The counter can be frozen in debug mode.
Any of the standard timers can be used to generate PWM outputs. Each of the timers has
independent DMA request generations.
11/64
DescriptionSTM32F101xx
I²C bus
Up to two I²C bus interf aces can oper ate in multi-maste r and slav e modes . They can sup port
standard and fast modes.
They support dual slave addressing (7-bit only) and both 7/10-bit addressing in master
mode. A hardware CRC generation/verification is embedded.
They can be served by DMA and they support SM Bus 2.0/PM Bus.
The available USART interfaces communicate at up to 2.25 Mbit/s. They provide hardware
management of the CTS and RTS signals, support IrDA SIR ENDEC, are ISO 7816
compliant and have LIN Master/Slave capability.
The USART interfaces can be served by the DMA controller.
Serial peripheral interface (SPI)
Up to two SPIs are able to communicate up to 18 Mbits/s in slave and master modes in fullduplex and simplex communication modes. The 3-bit prescaler gives 8 master mode
frequencies and the frame is configurable from 8-bit to 16-bit. The hardware CRC
generation/ve rification supports basic SD Card/MMC modes.
Both SPIs can be served by the DMA controller.
GPIOs (general purpose inputs/outputs)
Each of the GPIO pins can be configured b y softw are as output ( push-pull or open-dr ain), as
input (with or without pull-up or pull-down) or as Peripheral Alternate Function. Most of the
GPIO pins are shared with digital or analog alternate functions. All GPIOs are high currentcapable.
The I/Os alternate function configuration can be locked if needed following a specific
sequence in order to avoid spurious writing to the I/Os registers.
ADC (analog to digital converter)
The 12-bit Analog to Digital Converter has up to 16 external channels and performs
conversions in single-shot or scan modes. In scan mode, automatic conversion is performed
on a selected group of analog inputs.
The ADC can be served by the DMA controller.
An analog watchdog f eatur e allo ws very precise monitoring of the converted voltage of one ,
some or all selected channels. An interrupt is generated when the converted voltage is
outside the programmed thresholds.
Temperature sensor
The temperature sensor has to generate a linear voltage with any variation in temperature.
The conversion range is between 2V < V
connected to the ADC_IN16 input channel which is used to convert the sensor output
voltage into a digital value.
< 3.6V. The temperature sensor is internally
DDA
12/64
STM32F101xxDescription
Serial wire JTAG debug port (SWJ-DP)
The ARM SWJ-DP Interface is embedded. and is a combined JTAG and serial wire debug
port that enables either a serial wire debug or a JTAG probe to be connected to the target.
The JTAG TMS and TCK pins are shared respectively with SWDIO and SWCLK and a
specific sequence on the TMS pin is used to switch between JTAG-DP and SW-DP.
Figure 1.STM32F101xx access line block diagram
JNTRST
JTDI
JTCK/SWCLK
JTMS/SWDIO
JTDO
as AF
80AF
PA[15:0]
PB[15:0]
PC[15:0]
PD[15:0]
PE[15:0]
MOSI,MISO,
SCK,NSS as AF
RX,TX, CTS, RTS,
SmartCard as AF
16AF
V
REF+
V
REF-
NRST
VDDA
VSSA
JTAG & SWD
Cortex M3 CPU
F
max
NVIC
NVIC
7 channels
SUPERVISION
POR / PDR
EXTI
WAKEUP
GPIOA
GPIOB
GPIOC
GPIOD
GPIOE
SPI1
USART1
@VDDA
12bit ADC1
Temp sensor
: 36 MHz
GP DMA
@VDDA
SUPPLY
PVD
IF
pbus
Dbus
System
Rst
Int
Ibus
= 36 MHz
max
APB2 : F
BusMatrix
Controller
AHB2
APB2
Trace
=36 MHz
max
AHB:F
obl
FLASH 128 KB
Interface
Flash
SRAM
16 KB
PCLK1
PCLK2
HCLK
FCLK
RC 8 MHz
RC 32 kHz
@VDDA
AHB2
APB1
64 bit
CLOCK
MANAGT
PLL &
=24 / 36 MHz
max
APB1 : F
@VBAT
Backup interface
2x(8x16bit)
POWER
VOLT. REG.
3.3V TO 1.8V
@VDD
@VDD
XTAL OSC
4-16 MHz
IWDG
Standby
interface
XTAL 32 kHz
Backup
RTC
AWU
TIM2
TIM3
TIM4
USART2
USART3
SPI2
I2C1
I2C2
W W D G
reg
V
= 2 to 3.6V
DD
V
SS
OSC_IN
OSC_OUT
V
BAT
OSC32_IN
OSC32_OUT
ANTI_TAMP
4 Channels
4 Channels
4 Channels
RX,TX, CTS, RTS,
SmartCard as AF
RX,TX, CTS, RTS,
SmartCard as AF
MOSI,MISO,SCK,NSS
as AF
SCL,SDA,SMBAL
as AF
SCL,SDA
as AF
1. AF = alternate function on I/O port pin.
2. TA = –40 °C to +85 °C (junction temperature up to 125 °C).
1. I = input, O = output, S = supply, HiZ= high impedance.
2. FT= 5 V tolerant.
3. Function availability depends on the chosen device. Refer to Table 2 on page 7.
4. PC13, PC14 and PC15 are supplied through the power switch, and so their use in ouptut mode is limited: they can be used
only in output 2 MHz mode with a maximum load of 30 pF and only one pin can be put in output mode at a time.
5. Available only on devices with a Flash memory density equal or higher than 64 Kbytes.
6. For the LQFP48 and LQFP64 packages, the pins number 5 and 6 are configured as OSC_IN/OSC_OUT after reset,
however the functionality of PD0 and PD1 can be remapped by software on these pins.
7. This alternate function can be remapped by software to some other port pins (if available on the used package). For more
details, refer to the Alternate function I/O and debug configuration section in the STM32F10xxx reference manual,
UM0306, available from the STMicroelectronics website: www.st.com.