C bus AC waveforms and measurement circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
not connected to V
REF+
connected to V
REF+
DDA
). . . . . . . . . . . . . . 57
DDA
). . . . . . . . . . . . . . . . . 57
5/67
IntroductionSTM32F103xx
1 Introduction
This datasheet provides the STM32F103xx performance line ordering information and
mechanical device characteristics.
For information on programming, erasing and protection of the internal Flash memory
please refer to the STM32F10xxx Flash pr og ra mming reference manual, pm0042 , available
from www.st.com.
For information on the Cortex-M3 core please refer to the Cortex-M3 Technical Reference
Manual.
2 Description
The STM32F103xx performance line family incorporates the high-performance ARM
Cortex-M3 32-bit RISC core operating at a 72 MHz frequency, high-speed embedded
memories (Flash memory up to 128Kbytes and SRAM up to 20 Kbytes), and an extensive
range of enhanced I/Os and peripherals connected to two APB buses. All devices offer two
12-bit ADCs, three general purpose 16-bit timers plus one PWM timer, as well as standard
and advanced communication interfaces: up to tw o I
and a CAN.
2
Cs and SPIs, three USARTs, an USB
The STM32F103xx performance line family operates in the −40 to +105 °C temperature
range, from a 2.0 to 3.6 V power supply. A comprehensive set of power-saving mode allo ws
to design low-power applications.
The complete STM32F103xx performance line f amily includes devices in 4 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 t he STM32F103xx performance line microcontroller family suitab le for
a wide range of applications:
●Motor drive and application control
●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/67
STM32F103xxDescription
2.1 Device overview
Table 2.Device features and peripheral counts (STM32F103xx performance line)
CPU frequency72 MHz
Operating voltage2.0 to 3.6 V
Operating temperature-40 to +85 °C / -40 to +105 °C
PackagesLQFP48LQFP64
LQFP100,
BGA100
7/67
DescriptionSTM32F103xx
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 STM32F103xx performance line family having an embedded ARM core, is therefore
compatible with all ARM tools and software.
Figure 1 shows the general block diagram of the device family.
Embedded Flash memory
●Up to 128 Kbytes of embedded Flash is available for storing programs and data.
Embedded SRAM
Up to 20 Kbytes of embedded SRAM accessed (read/write) at CPU clock speed with 0 wait
states.
Nested vectored interrupt controller (NVIC)
The STM32F103xx performance line embeds a Nested Vectored Interrupt Controller able to
handle up to 43 maskable interrupt channels (not including the 16 interrupt lines of CortexM3) 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.
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.
8/67
STM32F103xxDescription
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 available
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 High Speed APB domains is 72 MHz. The maximum allowed frequency of the Low
Speed APB domain is 36 MHz.
Boot modes
At startup, boot pins are used to select one of three 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 supply 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 supplies for ADC, Reset blocks, 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
for an e xternal 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 v alues of
V
POR/PDR
and V
PVD
.
is below a specified threshold, V
DD
threshold. An interrupt can be generated
and/or when VDD is higher than the V
PVD
PVD
POR/PDR
PVD
, without the need
threshold. The
9/67
DescriptionSTM32F103xx
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 alwa ys enabled after reset. It is disabled in Standby Mode, providing high
impedance output.
Low-power modes
The STM32F103xx performance 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 ou tp ut , the RTC alarm or the USB
wakeup.
●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 the cor responding cloc k sources are n ot stopped b y entering 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
advanced control timers TIMx and ADC.
10/67
2
C, USART, general purpose and
STM32F103xxDescription
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
registers) can be used to store data when V
pin. The backup registers (ten 16-bit
BAT
power is not present.
DD
The real-time clock provides a set of continuously running counters which can be used with
suitable software to pro vide a cloc k calendar funct ion, and prov ides 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 power RC
has a typical frequency of 32 kHz. The RTC can be calibrated using an external 512 Hz
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 either as a watchdog
to reset the device when a prob lem occurs , or as a free running timer f or applicati on 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 STM32F103xx
performance line devices. These timers are based on a 16-bit auto -reloa d up/down counter,
a 16-bit prescaler and feature 4 independent channels each for input capture/output
compare, PWM or one pulse mode output. This gives up to 12 input captures / outpu t
compares / PWMs on the largest packages. They can work together with the Advanced
Control Timer 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/67
DescriptionSTM32F103xx
Advanced control timer (TIM1)
The advanced control timer (TIM1) can be seen as a three-phase PWM multiplexed on 6
channels. It can also be seen as a complete general-purpose timer. The 4 independent
channels can be used for
●Input Capture
●Output Compare
●PWM generation (edge or center-aligne d mo d es )
●One Pulse Mode output
●Complementary PWM outputs with programmable inserted dead-times.
If configured as a standard 16-bit timer, it has the same features as the TIMx timer. If
configured as the 16-bit PWM generator, it has full modulation capability (0-100%).
The counter can be frozen in debug mode.
Many features are shared with those of the standard TIM timers which have the same
architecture. The adv anced control timer can theref ore w ork together with the TIM timers via
the Timer Link feature for synchronization or e vent chaining.
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.
One of the USART interfaces is able to communicate at speeds of up to 4.5 Mbit/s. The
other available interfaces communicate at up to 2.25 Mbit/s. They provide hardware
management of the CTS and RTS signals, IrDA SIR ENDEC support, are ISO 7816
compliant and have LIN Master/Slave capability.
All 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.
Controller area network (CAN)
The CAN is compliant with specifications 2.0A and B (active) with a bit rate up to 1 Mbit/s. It
can receive and transmit standard frames with 11-bit identifiers as well as extended frames
with 29-bit identifiers. It has three transmit mailboxes, two receive FIFOs with 3 stages and
14 scalable filter banks.
12/67
STM32F103xxDescription
Universal serial bus (USB)
The STM32F103xx performance line embeds a USB device peripheral compatible with the
USB Full-speed 12 Mbs. The USB interface implements a full speed (12 Mbit/s) function
interface. It has software configurable endpoint setting and suspend/resume support. The
dedicated 48 MHz clock source is generated from the internal main PLL.
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 pe ripheral 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.
I/Os on APB2 with up to 18 MHz toggling speed
ADC (analog to digital converter)
Two 12-bit Analog to Digital Converters are embedded into STM32F103xx performance line
devices and each ADC shares up to 16 external channels, performing conversions in singleshot or scan modes. In scan mode, automatic conversion is performed on a selected group
of analog inputs.
Additional logic functions embedded in the ADC interface allow:
●Simultaneous sample and hold
●Interleaved sample and hold
●Single shunt
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.
The ev ents gener ated b y the sta ndard timer s (TIMx) and the Adv an ced Contro l timer (TIM 1)
can be internally connected to the ADC start trigger, injection trigger, and DMA trigger
respectively, to allow the application to synchronize A/D conversion and timers.
Temperature sensor
The temperature sensor has to generate a linear voltage with any variation in temperature.
The conversion range is between 2 V < V
< 3.6 V. The tem pe ratur e sen so r is inte rnally
DDA
connected to the ADC_IN16 input channel which is used to convert the sensor output
voltage into a digital value.
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.
13/67
DescriptionSTM32F103xx
Figure 1.STM32F103xx performance line block diagram
JNTRST
JTDI
JTCK/SWCLK
JTMS/SWDIO
JTDO
as AF
NRST
VDDA
VSSA
80AF
PA[15:0]
PB[15:0]
PC[15:0]
PD[15:0]
PE[15:0]
4 Channels
3 compl. Channels
Brk input
MOSI,MISO,
SCK,NSS as AF
RX,TX, CTS, RTS,
SmartCard as AF
16AF
V
REF+
V
REF-
JTAG & SWD
CORTEX M3 CPU
F
: 72 MHz
max
NVIC
GP DMA
7 channels
@VDDA
SUPPLY
SUPERVISION
POR / PDR
PVD
EXTI
WAKEUP
GPIOA
GPIOB
GPIOC
GPIOD
GPIOE
TIM1
SPI1
USART1
@VDDA
12bit ADC1
12bit ADC2
Temp sensor
Ibus
=48 / 72 MHz
APB2 : F
max
BusMatrix
Controller
AHB2
APB2
Trace
=48/72 MHz
max
AHB:F
obl
FLASH 128 KB
Interface
flash
SRAM
20 KB
PCLK1
PCLK2
HCLK
FCLK
RC 8 MHz
RC 32 kHz
@VDDA
AHB2
APB1
64 bit
PLL &
CLOCK
MANAGT
@VBAT
=24 / 36 MHz
max
APB1 : F
POWER
VOLT. REG.
3.3V TO 1.8V
@VDD
@VDD
XTAL OSC
4-16 MHz
IWDG
Standby
interface
XTAL 32 kHz
Backup
RTC
AWU
Backup interface
TIM2
TIM3
TIM 4
USART2
USART3
SPI2
2x(8x16bit)
I2C1
I2C2
bxCAN
USB 2.0 FS
SRAM 512B
WWDG
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
8 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
USBDP/CANTX
USBDM/CANRX
pbus
Dbus
System
Rst
Int
IF
IFIF
1. TA = –40 °C to +105 °C (junction temperature up to 125 °C).
2. AF = alternate function on I/O port pin.
14/67
ai14390
STM32F103xxPin descriptions
3 Pin descriptions
Figure 2.STM32F103xx performance line LQFP100 pinout
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. 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.
7. 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.
SS_3
DD_3
SV
SV
SS_3
DD_3
21/67
Loading...
+ 46 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.